query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { $mailService = new EmailService; \Log::info("Sending email to approvers"); $mailService->sendCouponApproval(); $mailService->sendGeneratedCoupons(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Retrieve Saleable Status Ids Default Product Enable status
public function getSaleableStatusIds() { return [self::STATUS_ENABLED]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function viewableAffiliateProductStatuses()\r\n {\r\n return array(\r\n Product::ACTIVE,\r\n Product::INACTIVE,\r\n );\r\n }", "public function GetStatus()\n\t{\treturn new ProductStatus($this->details['tstatus']);\t\n\t}", "public function viewableSellerProductStatuses()\r\n {\r\n return array(\r\n Product::FOR_COMPLETION,\r\n Product::ACTIVE,\r\n Product::INACTIVE,\r\n Product::DRAFT,\r\n Product::DELETE,\r\n Product::FOR_REVIEW,\r\n Product::REJECT,\r\n );\r\n }", "public function getSellingStatus()\n {\n return $this->sellingStatus;\n }", "function article_status() {\n return Registry::prop('article', 'status');\n}", "function tep_set_product_status($products_id, $status) {\n $OSCOM_Db = Registry::get('Db');\n\n if ($status == '1') {\n return $OSCOM_Db->save('products', [\n 'products_status' => '1',\n 'products_last_modified' => 'now()'\n ], [\n 'products_id' => (int)$products_id\n ]);\n } elseif ($status == '0') {\n return $OSCOM_Db->save('products', [\n 'products_status' => '0',\n 'products_last_modified' => 'now()'\n ], [\n 'products_id' => (int)$products_id\n ]);\n } else {\n return -1;\n }\n }", "function dokan_get_product_status( $status ) {\n switch ($status) {\n case 'simple':\n return __( 'Simple Product', 'dokan' );\n break;\n\n case 'variable':\n return __( 'Variable Product', 'dokan' );\n break;\n\n case 'grouped':\n return __( 'Grouped Product', 'dokan' );\n break;\n\n case 'external':\n return __( 'Scheduled', 'dokan' );\n break;\n\n default:\n return '';\n break;\n }\n}", "public function get_purchased_status($product_id, $purchased_products)\n {\n \n }", "public function getUserDefaultStatus();", "public function enabled()\n\t{\n\t\treturn $this->installed(function($query)\n\t\t{\n\t\t\treturn $query->where('enabled', '=', 1);\n\t\t});\n\t}", "public function getEnabled()\n {\n return array_filter($this->storage, function($val)\n {\n return $val['status'] === ProviderInterface::STATUS_INSTALLED;\n });\n }", "public function active($id){\n $active = Product::find($id)->active;\n return $active;\n }", "public function getIsActiveStatuses()\n {\n $statuses = new Varien_Object(array(\n self::STATUS_ENABLED => Mage::helper('olts_reminder')->__('Enabled'),\n self::STATUS_DISABLED => Mage::helper('olts_reminder')->__('Disabled'),\n ));\n\n Mage::dispatchEvent('reminder_get_is_active_statuses', array('statuses' => $statuses));\n\n return $statuses->getData();\n }", "function getEnabled() {\n\t\treturn $this->getData('enabled');\n\t}", "public function getIsEnabled()\n\t{\n\t\treturn Mage::getStoreConfig(self::XML_PATH_ENABLE);\n\t}", "public function getEnabled()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/enabled');\n }", "public function productDisableStatus($customerId){\n $productCollections = Mage::getModel ( 'catalog/product' )->getCollection ()->addAttributeToFilter ( 'userid', $customerId)->addAttributeToFilter ( 'type_id', array (\n 'eq' => 'property'\n ) );\n /**\n * Iterating the loop\n */\n foreach ( $productCollections as $product ) {\n /**\n * Get Product Id\n */\n $productId = $product->getEntityId ();\n $data = array (\n 'propertyapproved' => 0,\n 'status' => 0\n );\n $model = Mage::getModel ( 'catalog/product' )->load ( $productId )->addData ( $data );\n $model->setId ( $productId )->save ();\n }\n }", "function dokan_get_new_post_status() {\n $user_id = get_current_user_id();\n\n // trusted seller\n if ( dokan_is_seller_trusted( $user_id ) ) {\n return 'publish';\n }\n\n // if not trusted, send the option\n $status = dokan_get_option( 'product_status', 'dokan_selling', 'pending' );\n\n return $status;\n}", "public function getVisibleInCatalogStatuses()\n {\n return Mage::getSingleton('catalog/product_status')->getVisibleStatusIds();\n }", "protected function getAvailability(Mage_Catalog_Model_Product $product){\n if ($product->getData('use_config_manage_stock') == 1) {\n if (Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_ITEM . 'manage_stock') == 0) {\n return 'in stock';\n }\n } else if ($product->getData('manage_stock') == 0) {\n return 'in stock';\n }\n\n if ($product->getData('is_in_stock') == 1) {\n return 'in stock';\n } else if ($product->getData('backorders') == 0) {\n return 'out of stock';\n }\n return 'available for order';\n }", "public static function allStatuses()\n {\n $statuses = ProductOrderStatus::all();\n return $statuses;\n }", "public function getItemStatus() {\r\n\t\t$status = array();\r\n\t\t\t$status[0] = array('id' => 0,\r\n\t\t\t\t\t\t\t'name' => 'Sold',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'sold'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[1] = array('id' => 1,\r\n\t\t\t\t\t\t\t'name' => 'Available',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'available'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[2] = array('id' => 2,\r\n\t\t\t\t\t\t\t'name' => 'Out on Job',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'out_on_job'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[3] = array('id' => 3,\r\n\t\t\t\t\t\t\t'name' => 'Pending Sale',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'pending_sale'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[4] = array('id' => 4,\r\n\t\t\t\t\t\t\t'name' => 'Out on Memo',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'out_on_memo'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[5] = array('id' => 5,\r\n\t\t\t\t\t\t\t'name' => 'Burgled',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'burgled'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[6] = array('id' => 6,\r\n\t\t\t\t\t\t\t'name' => 'Assembled',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'assembled'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[7] = array('id' => 7,\r\n\t\t\t\t\t\t\t'name' => 'Returned To Consignee',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'return_to_consignee'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[8] = array(\r\n\t\t\t\t\t\t\t'id' => 8,\r\n\t\t\t\t\t\t\t'name' => 'Pending Repair Queue',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'pending_repair'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[91] = array('id' => 91,\r\n\t\t\t\t\t\t\t'name' => 'Francesklein Import',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'francesklein_import'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[98] = array('id' => 98,\r\n\t\t\t\t\t\t\t'name' => 'Never Going Online',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'never_going_online'\r\n\t\t\t\t\t\t);\r\n\t\t\t$status[99] = array('id' => 99,\r\n\t\t\t\t\t\t\t'name' => 'Unavailable',\r\n\t\t\t\t\t\t\t'checked' => false,\r\n\t\t\t\t\t\t\t'field_name' => 'unavailable'\r\n\t\t\t\t\t);\r\n\t\treturn $status;\r\n\t}", "public function getSiteStatus();", "public function getProdStatuses() {\n $dql = \"SELECT i from Infrastructure i\";\n $prodStatuses = $this->em\n ->createQuery($dql)\n ->getResult();\n return $prodStatuses;\n }", "public function getEnabled()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/enabled', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "public function getdefaultStatus()\n {\n return $this->defaultstatus;\n }", "public function isEnabled()\n {\n return Mage::getStoreConfigFlag('training_layred/catalog/enabled');\n }", "function get_status()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_STATUS);\r\n }", "function getCategoryStatusById($cat_id) {\n $ci = & get_instance();\n $category = $ci->crud->get(ES_PRODUCT_CATEGORIES, array('id' => $cat_id));\n if (count($category) > 0) {\n return $category['status'];\n } else {\n return 0;\n }\n}", "function getStatus() {\n return $this->getAdditionalProperty('payment_status_selected');\n }", "public function getIsSale()\n {\n return $this->get(self::_IS_SALE);\n }", "function wcs_custom_get_availability( $availability, $_product ) {\n global $product;\n\t// $koostis = $product->get_attribute( 'goal-number' );\n\n if ( $_product->is_in_stock() ) {\n $availability['availability'] = __($_product->total_sales . '/' . (int)$product->get_meta('sharethewarmth_selling_goal') . (string)' sold!', 'woocommerce');\n }\n // Change Out of Stock Text\n if ( ! $_product->is_in_stock() ) {\n $availability['availability'] = __('Sold Out', 'woocommerce');\n }\n return $availability;\n}", "function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}", "public function isActive()\r\n\t{\r\n\t\treturn $this->filter((int) Mage::getStoreConfig('ec/config/active'));\r\n\t}", "public function getIsActive() {}", "public function getEnabled()\n {\n return $this->_scopeConfig->getValue('estimatecep/cep_load_values/enabled', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "function tep_set_product_status($products_id, $status) {\n if ($status == '1') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '1', products_last_modified = now() where products_id = '\" . $products_id . \"'\");\n } elseif ($status == '2') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '2', products_last_modified = now() where products_id = '\" . $products_id . \"'\");\n } elseif ($status == '0') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '0', products_last_modified = now() where products_id = '\" . $products_id . \"'\");\n } elseif ($status == '3') {\n return tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_status = '3', products_last_modified = now() where products_id = '\" . $products_id . \"'\");\n } else {\n return -1;\n }\n}", "function count_active_pro_list(){\n\t\treturn $this->db->select('count(*)','product_list','status = 1');\n\t}", "public function findActiveProducts()\n {\n return Product::where(\"is_inactive\", false)->get();\n }", "public function getActiveProducts(){\n $product = Product::where('active', 1)->count();\n return $product;\n }", "public function getStatus()\n {\n //return the status quote for the user based on their level\n return $this->getStatusQuote();\n }", "function getIsActive() ;", "function set_product_status($products_id, $status) {\n\t\tif ($status == '1') {\n\t\t\treturn olc_db_query(\"update \".TABLE_PRODUCTS.\" set products_status = '1', products_last_modified = now() where products_id = '\".$products_id.\"'\");\n\t\t}\n\t\telseif ($status == '0') {\n\t\t\treturn olc_db_query(\"update \".TABLE_PRODUCTS.\" set products_status = '0', products_last_modified = now() where products_id = '\".$products_id.\"'\");\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public function allowedAffiliateUpdateStatusesTo()\r\n {\r\n return array(\r\n Product::INACTIVE,\r\n Product::ACTIVE,\r\n Product::FULL_DELETE,\r\n );\r\n }", "function olc_set_product_status($products_id, $status) {\n\tif ($status == '1' || $status == '0') {\n\t\t$status = SQL_UPDATE . TABLE_PRODUCTS . \" set products_status = '\".$status.\"',\n\t\t\tproducts_last_modified = now() where products_id = '\" . $products_id . APOS;\n\t\treturn olc_db_query($status );\n\t} else {\n\t\treturn -1;\n\t}\n}", "public static function getAvailabilityStatus()\n {\n return array(\n Product::AVAILABILITY_UNAVAILABLE,\n Product::AVAILABILITY_ACCORDING_TO_STOCK,\n Product::AVAILABILITY_AVAILABLE_AT,\n Product::AVAILABILITY_AVAILABLE\n );\n }", "public function allowedAffiliateUpdateStatusesFrom()\r\n {\r\n return array(\r\n Product::ACTIVE,\r\n Product::INACTIVE,\r\n );\r\n }", "public function getStatus()\n\t\t{\n\t\t\t$status_id = $this->getStatusId();\n\t\t\t$asf = ECash::getFactory()->getReferenceList('ApplicationStatusFlat');\n\t\t\treturn $asf[$status_id];\n\t\t}", "public function getDefaultValues()\n {\n return [\n 'is_active' => self::STATUS_ENABLED\n ];\n }", "public function getEnableUserState();", "public function getCatalogrequestConfigStatus()\n {\n $path = \"catalogrequest/catalogrequest/status\";\n return Mage::getStoreConfig($path);\n }", "public function getAllProducts()\n {\n\n $query = $this->db->get_where('products', array('pro_status' => 1));\n return $query->result();\n }", "protected function getStatusSQL() {\n // By default just active items\n $status = '1';\n \n // Is a custom value set?\n $stat = $this->getProperty(IConfigurable::STATUS);\n \n // Any other status?\n if (is_numeric($stat)) {\n $status = $stat;\n } else if (is_array($stat)) {\n $status = implode(',', $stat);\n }\n \n return $status;\n }", "function enterprise_edition(){\n \n if( !isset( $this->enterprise_edition ) ){\n\n $enterprise_check = $this->single_rec(\"select 'YES' enterprise_edition from v\\$version where lower(banner) like '%enterprise%'\");\n\n if( isset( $enterprise_check->ENTERPRISE_EDITION ) ){\n $this->enterprise_edition = 1;\n }else{\n $this->enterprise_edition = 0;\n }\n\n }\n return $this->enterprise_edition; \n }", "public function getIsActive();", "public function isEnabled(){\n return $this->activo;\n }", "public function getInventoryMode();", "public function getStatusInstallments(){\n\n if (!Mage::getStoreConfig(self::XPATH_CONFIG_ACTIVE)) {\n return false;\n }\n\n return true;\n }", "public function enabled()\n {\n return $this->andWhere(['>=', User::tableName() . '.status', User::STATUS_ENABLED]);\n }", "public function getStatus()\n\t{\n\t\tif ($this->archived)\n\t\t{\n\t\t\treturn static::ARCHIVED;\n\t\t}\n\t\telse if (!$this->enabled)\n\t\t{\n\t\t\treturn static::DISABLED;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn static::ENABLED;\n\t\t}\n\t}", "public function getInvoiceItemStatus() {\r\n\t\t$status = array();\r\n\t\t\t$status[0] = array('id' => 0, 'name' => 'Normal Sale');\r\n\t\t\t$status[1] = array('id' => 1, 'name' => 'Returned');\r\n\t\t\t$status[2] = array('id' => 2, 'name' => 'Pending Return');\r\n\t\t\t$status[3] = array('id' => 3, 'name' => 'Closed Memo');\r\n\t\treturn $status; //array\r\n\t}", "public function getActiveCartSignInMode();", "function status(){\n return ($this -> is_approved())?\"Approved\":\"Unapproved\";\n }", "public function shophead_enabled($id = null)\n {\n $this->layout = \"admin_layout\";\n if (!empty($id)) {\n $item_id = base64_decode($id);\n $this->ProductItem->id = $item_id;\n if ($this->ProductItem->saveField('status', 1)) {\n $this->Session->write('flash', array(ACTIVATE_RECORD, 'success'));\n $this->redirect(array('controller' => 'ProductItems', 'action' => 'index'));\n } else {\n $this->Session->write('flash', array(FAILURE_MSG, 'failure'));\n $this->redirect(array('controller' => 'ProductItems', 'action' => 'index'));\n }\n } else {\n $this->Session->write('flash', array(FAILURE_MSG, 'failure'));\n $this->redirect(array('controller' => 'ProductItems', 'action' => 'index'));\n }\n }", "public function isEnabled()\n {\n return Mage::getStoreConfig('refersion/refersion_settings/refersion_active');\n }", "public function getProductSyncEnabledFlag($store_id = null) {\n return intval(Mage::getStoreConfig(static::XML_PATH_PRODUCT_SYNC_ENABLED, $store_id));\n }", "public function isActive()\n {\n $res = $this->getEntity()->isActive();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->isActive();\n\t\t}\n return $res;\n }", "function enableConfigurableSwatches()\n\t {\n\t \t $eavAttrTable\t\t= Mage::getSingleton('core/resource')->getTableName('eav_attribute');\n\t \t $catalogAttrTable\t= Mage::getSingleton('core/resource')->getTableName('catalog_eav_attribute');\n\t \t $read\t\t\t\t= Mage::getSingleton('core/resource')->getConnection('core_read');\n\t\t\n\t\t$sql\t\t\t\t= \"SELECT `e`.`attribute_id` FROM `\" . $eavAttrTable . \"` as `e` \n\t\t\t\t\t\t\t\tJOIN `\" . $catalogAttrTable . \"` as `c` ON `e`.`attribute_id` = `c`.`attribute_id`\n\t\t\t\t\t\t\t\tWHERE `e`.`entity_type_id` = '4' \n\t\t\t\t\t\t\t\tAND `e`.`frontend_input` = 'select' \n\t\t\t\t\t\t\t\tAND `e`.`is_user_defined` = '1' \n\t\t\t\t\t\t\t\tAND `c`.`is_configurable` = 1 \";\n\t\t$result\t\t\t\t= $read->fetchAll($sql);\n\t\tif ($result) {\n\t\t\t$arr = array();\n\t\t\tforeach ($result as $id) {\n\t\t\t\tarray_push($arr, $id['attribute_id']);\n\t\t\t}\n\t\t\t$ids = implode(',', $arr);\n\t\t\tif ($ids) {\n\t\t\t\t$configModel = new Mage_Core_Model_Config();\n\t\t\t\t$configModel->saveConfig('configswatches/general/enabled', \"1\", 'default', 0);\n\t\t\t\t$configModel->saveConfig('configswatches/general/swatch_attributes', $ids, 'default', 0);\n\t\t\t}\n\t\t}\n\t\treturn $ids;\n\t\t}", "public function getStatuses() {\n\t}", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function get_default_availability() {\n\t\treturn true;\n\t}", "private function getActiveShops()\n {\n $sql = \"SELECT `id` from s_core_shops where `active` = 1\";\n $query = Shopware()->Db()->query($sql);\n return $query->fetchAll();\n }", "public function enable()\n {\n $sql = \"UPDATE s_core_menu SET active = 1 WHERE controller = 'CustomSort';\";\n Shopware()->Db()->query($sql);\n\n return ['success' => true, 'invalidateCache' => ['backend']];\n }", "public function isAvailable()\n {\n return $this->getTypeInstance(true)->isSalable($this)\n || Mage::helper('catalog/product')->getSkipSaleableCheck();\n }", "public function enable()\n {\n try {\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_CC_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_cc'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_CCSAVED_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_ccsaved'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_DD_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_dd'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_DDSAVED_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_ddsaved'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_GIROPAY_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_giropay'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_KLARNAPAYLATER_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_klarnapaylater'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_KLARNASLICEIT_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_klarnasliceit'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_PAYPAL_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_paypal'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_PAYPALSAVED_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_paypalsaved'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_PAYDIREKT_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_paydirekt'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_KLARNAOBT_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_klarnaobt'\";\n Shopware()->Db()->query($sql);\n }\n\n $sql = \"SELECT value FROM s_core_config_values WHERE element_id = '\" .\n $this->getElementId('BACKEND_CH_EASYCREDIT_ACTIVE').\"'\";\n Shopware()->Db()->query($sql);\n $query = Shopware()->Db()->query($sql);\n $data = $query->fetchAll();\n if (!isset($data[0]['value'])) {\n $sql = \"UPDATE s_core_paymentmeans SET active = '1' WHERE name = 'vrpay_easycredit'\";\n Shopware()->Db()->query($sql);\n }\n return $result['success'] = true;\n } catch (Exception $e) {\n return $result['success'] = false;\n }\n }", "public function getPriceAlarmStatus()\n {\n return $this->getViewParameter('iPriceAlarmStatus');\n }", "public function getDetailedStatus() {}", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "protected function getCurrentProductDetails(){\n\t\t\n\t\treturn FALSE;\n\t}", "public function allowedUserUpdateStatusesFrom()\r\n {\r\n return array(\r\n Product::ACTIVE,\r\n Product::DELETE,\r\n Product::REJECT,\r\n Product::INACTIVE,\r\n Product::DRAFT,\r\n Product::FOR_REVIEW,\r\n Product::FOR_COMPLETION\r\n );\r\n }", "public static function getDefaultCustomerRole(){\n return self::findFirst([\n 'conditions' => 'location = 0 AND is_default =1'\n ]);\n }", "public function enabled(): array;", "public function allowedUserUpdateStatusesTo()\r\n {\r\n return array(\r\n Product::FOR_REVIEW,\r\n Product::DELETE,\r\n Product::FULL_DELETE,\r\n Product::INACTIVE,\r\n Product::ACTIVE,\r\n );\r\n }", "public function getEnableRenewal()\n {\n return $this->enable_renewal;\n }", "function wcs_custom_get_availability( $availability, $_product ) {\n if ( $_product->is_in_stock() ) {\n $availability['availability'] = __('In stock', 'woocommerce');\n }\n // Change Out of Stock Text\n if ( ! $_product->is_in_stock() ) {\n $availability['availability'] = __('Out of Stock', 'woocommerce');\n }\n return $availability;\n}", "public function getProductOption();", "public function setActive(Request $request){\n $product = Product::findOrFail($request->id);\n $product->update(['status'=>$request->status]);\n Cache::tags('products')->flush();\n Cache::tags('categories')->flush();\n return response()->json($product->status,200);\n }", "public function getProductDefaultValue() {\n //initialize dummy value.. no content header.pure html\n $sql = null;\n $productId = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n SELECT `productId`\n FROM `product`\n WHERE `isActive` = 1\n AND `companyId` = '\" . $this->getCompanyId() . \"'\n AND \t `isDefault` =\t 1\n LIMIT 1\";\n } else {\n if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n SELECT TOP 1 [productId],\n FROM [product]\n WHERE [isActive] = 1\n AND [companyId] = '\" . $this->getCompanyId() . \"'\n AND \t [isDefault] = 1\";\n } else {\n if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n SELECT PRODUCTID AS \\\"productId\\\",\n FROM PRODUCT\n WHERE ISACTIVE = 1\n AND COMPANYID = '\" . $this->getCompanyId() . \"'\n AND \t ISDEFAULT\t =\t 1\n AND \t\t ROWNUM\t =\t 1\";\n } else {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $this->t['databaseNotFoundMessageLabel']));\n exit();\n }\n }\n }\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $productId = $row['productId'];\n }\n return $productId;\n }", "public function getEnabled()\n {\n if ($this->model->where('is_disabled', '=', 0)->get())\n return $this->model->where('is_disabled', '=', 0)->get();\n else return [];\n }", "public function getSectionStatus() {\r\n\t\t$config = $this->getConfig();\r\n return $config[\"enable\"];\r\n }", "private function getDefaultStatus(): string\n {\n return InviteStatus::pending()->value;\n }", "public function getAllEnabledStoreIds(): array;", "public static function isActive($productSlug)\n {\n // Save status in an array, so that when this function is called\n // multiple times for same product, we don't have to do processing every time.\n static $products = [];\n\n if(isset($products[$productSlug])) {\n return $products[$productSlug];\n }\n\n $instance = self::getInstance();\n \n $product = array_filter($instance->getAllEpitroveProducts(), function($product) use ($productSlug){\n return $productSlug === $product->productSlug();\n });\n\n if(empty($product)) {\n $products[$productSlug] = false;\n return $products[$productSlug];\n }\n\n // Since array_filter returns an array, we'll have to access 1st element manually\n $product = array_pop($product);\n\n if ($product->isActiveLicense()) {\n $products[$productSlug] = true;\n return $products[$productSlug];\n }\n\n $products[$productSlug] = false;\n return $products[$productSlug];\n }", "public function status()\n {\n return $this->status->get($this->entity->status);\n }", "public function getInactiveProducts(){\n $product = Product::where('active', 0)->count();\n return $product;\n }" ]
[ "0.64557254", "0.6214199", "0.62141716", "0.6030301", "0.592042", "0.58605677", "0.584785", "0.5834163", "0.57630616", "0.5742801", "0.573849", "0.572061", "0.56780475", "0.567536", "0.5665758", "0.5662599", "0.5656784", "0.5623097", "0.56214577", "0.56202996", "0.561477", "0.5613882", "0.5567239", "0.55476063", "0.5547107", "0.5534052", "0.5529889", "0.55191976", "0.55128044", "0.5509024", "0.5508441", "0.5505088", "0.5498465", "0.5497436", "0.5482207", "0.5476518", "0.54755986", "0.5472508", "0.5471791", "0.54683685", "0.5468184", "0.54671115", "0.54446423", "0.54392356", "0.54371065", "0.5434232", "0.5425974", "0.54213417", "0.54188585", "0.54010737", "0.5389721", "0.53885263", "0.5385157", "0.53762627", "0.53762376", "0.5357613", "0.53505445", "0.5340234", "0.5335402", "0.5333456", "0.5332205", "0.5331264", "0.5324219", "0.5321357", "0.5320433", "0.5308449", "0.5306509", "0.52976257", "0.5296693", "0.52873486", "0.52873486", "0.52873486", "0.52873486", "0.52873486", "0.52872115", "0.5270252", "0.5267449", "0.52610815", "0.52600074", "0.52545685", "0.52543575", "0.5253608", "0.5253608", "0.5250907", "0.52434736", "0.5240655", "0.52362305", "0.52333075", "0.52310365", "0.5213495", "0.5196452", "0.5195964", "0.5195902", "0.51952404", "0.5190869", "0.5188442", "0.5184328", "0.51841396", "0.51799184", "0.5177241" ]
0.69342375
0
Retrieve option array with empty value
public function getAllOptions() { $result = []; foreach (self::getOptionArray() as $index => $value) { $result[] = ['value' => $index, 'label' => $value]; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmptyValues();", "public function toOptionArray($emptyLabel = '') {\n if($emptyLabel !== false && !$emptyLabel)\n $emptyLabel = Mage::helper('core')->__('-- Please Select --');\n \n return parent::toOptionArray($emptyLabel);\n }", "public function getOptionValues()\n {\n $options = [];\n $options[''] = __('--Please Select--');\n foreach ($this->getOptionArray() as $key => $value) {\n $options[$key] = $value;\n }\n return $options;\n }", "public function getEmptyOption()\r\n\t{\r\n\t\treturn $this->_emptyOption;\r\n\t}", "protected function defaultEmptyChoice()\n {\n return [\n 'value' => '',\n 'label' => $this->translator()->translation('— None —')\n ];\n }", "public function getAllOptions()\n {\n $res = $this->getOptions();\n array_unshift($res, ['value' => '', 'label' => '']);\n return $res;\n }", "public function getNilExcessOption();", "protected static function get_non_ui_options() {\n\t\treturn array_filter(self::get_options(), function($option) {\n\t\t\treturn $option['type'] !== 'tab' &&\n\t\t\t $option['type'] !== 'title' &&\n\t\t\t $option['type'] !== 'description' &&\n\t\t\t $option['type'] !== 'code';\n\t\t});\n\t}", "public function addEmptyOption($options)\n {\n if (isset ($options[''])) {\n return $options;\n } else {\n return array('' => 'Select') + $options;\n }\n }", "public function getEmpty_values()\r\n {\r\n return $this->m_empty_values;\r\n }", "public function toOptionArray()\n {\n /*We are setting value to 'N/A' instead of '' or ' '\n that is because by the builtin method that saves data in the config table ; the '' is getting saved as null in\n the database. Now on retrieval that null causes problem. This is because if a config is null at a more specific\n scope like store then the logic looks for a value in the parent scope instead of stopping at that more specific\n scope/level.\n There are several ways to solve this. The shortest route that seemed to worked both in the database, dynamic\n scope control logic and integrating with DHL is this 'N/A' value.\n */\n return [\n ['value' => 'COURIER', 'label' => __('Courier')],\n ['value' => 'POST', 'label' => __('Post')],\n ['value' => 'N/A', 'label' => __('No Selection')]\n ];\n }", "public function toOptionArray()\n {\n if (!$this->_options) {\n $options = parent::toOptionArray();\n foreach ($options as $i => $option) {\n if ($option['type'] != Inx_Api_Recipient_Attribute::DATA_TYPE_DOUBLE && $option['value'] != '') {\n if (isset($options[$i])) unset($options[$i]);\n }\n }\n if (count($options) == 1 && isset($options[0])) {\n $options[0]['label'] = Mage::helper('dndinxmail_subscriber')->__('No column available');\n }\n $this->_options = $options;\n }\n\n return $this->_options;\n }", "public function getNonOptions()\n {\n return $this->nonOptions;\n }", "protected function getOptions() {\n\t\t$options = parent::getOptions();\n\n\t\tif($this->hasArgument('nullOption')) {\n\t\t\t$label = $this->arguments['nullOption'];\n\t\t\t$options = array('' => $label) + $options;\n\t\t}\n\t\treturn $options;\n\t}", "public static function getEmpty()\n {\n return array();\n }", "public function getArraySkipEmpty () {\n\n $values = array();\n\n foreach ($this->values as $key => $value) {\n\n if ($value !== null && (!is_string($value) || strlen($value) > 0)) {\n\n $values[$key] = $value;\n\n }\n\n }\n\n return $values;\n\n }", "public function getAllOptions($withEmpty = true)\r\n {\r\n $options = array();\r\n $options = $this->getAvailableTemplate();\r\n\r\n if ($withEmpty) {\r\n array_unshift($options, array(\r\n 'value' => '',\r\n 'label' => '-- Please Select --',\r\n ));\r\n }\r\n return $options;\r\n }", "public function isEmptyPicklistOptionAllowed()\n\t{\n\t\treturn false;\n\t}", "protected function filterDropdownFields(): array\n {\n return [];\n }", "public function settingsWithMissingOptionsWithDefault()\n {\n return array(\n array(\n array('-f', '--option2'),\n array('flag1' => true, 'option2' => 'some default value')\n ),\n array(\n array('--option2', '-f'),\n array('option2' => 'some default value', 'flag1' => true)\n )\n );\n }", "public function option()\n\t{\n\t\treturn [];\n\t}", "public function settingsWithMissingOptions()\n {\n return array(\n array(\n array('-f', '--option1'),\n array('flag1' => true, 'option1' => 'Error should be triggered')\n ),\n array(\n array('--option1', '-f'),\n array('option1' => 'Error should be triggered', 'flag1' => true)\n )\n );\n }", "public function sanitize_option($value) {\n $result = array();\n $defaults = array(\n \"name\" => \"\",\n \"desc\" => \"\",\n \"id\" => \"\",\n \"std\" => \"\",\n \"mod\" => \"\",\n \"type\" => \"\"\n );\n foreach ($defaults as $k => $v) {\n $result[$k] = isset($value[$k]) ? $value[$k] : $v;\n }\n\n foreach ($value as $k => $v) {\n if (!isset($result[$k])) {\n $result[$k] = $v;\n }\n }\n return $result;\n }", "public function optsValues() {\n return [];\n }", "public function toOptionArray()\n {\n $returnArray = array();\n $returnArray[] = array('value' => '', 'label' => Mage::helper('fooman_ordermanager')->__('Default'));\n foreach (Mage::getModel('sales/order_config')->getStatuses() as $status => $statusLabel) {\n $returnArray[] = array('value' => $status, 'label' => Mage::helper('sales')->__($statusLabel));\n }\n return $returnArray;\n }", "public function getEmpty();", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', 1)))->getField('id, name');\n }", "protected function getOptions() : array\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', -1)))->getField('id, name');\n }", "public function toOptionArray()\n {\n /** @var $orderConfig Mage_Sales_Model_Order_Config */\n $orderConfig = Mage::getSingleton('sales/order_config');\n if ($this->_stateStatuses) {\n $statuses = $orderConfig->getStateStatuses($this->_stateStatuses);\n }\n else {\n $statuses = $orderConfig->getStatuses();\n }\n $options = array();\n $options[] = array(\n 'value' => '',\n 'label' => Mage::helper('adminhtml')->__('-- Please Select --')\n );\n foreach ($statuses as $code=>$label) {\n $options[] = array(\n 'value' => $code,\n 'label' => $label\n );\n }\n return $options;\n }", "public function getDefaultOptions(): array|null\n {\n return [];\n }", "protected function getOptions() {\n return [];\n }", "protected function getOptions() {\n return [];\n }", "protected function getOptions(): array\n {\n return [];\n }", "protected function getOptions(): array\n {\n return [];\n }", "public function getOptionsList()\n\t{\n\t\t$options = array();\n\n\t\tforeach ($this->options as $opt)\n\t\t{\n\t\t\tif ($opt->getQuantity())\n\t\t\t{\n\t\t\t\t$options[] = $opt;\n\t\t\t}\n\t\t}\n\n\t\treturn $options;\n\t}", "public static function expandedIsEmptyWhenNoRealChoiceIsSelectedProvider()\n {\n // - multiple with placeholder\n // - required with placeholder\n return [\n 'Nothing submitted / single / not required / without a placeholder -> should be empty' => [true, null, false, false, null],\n 'Nothing submitted / single / not required / with a placeholder -> should not be empty' => [false, null, false, false, 'ccc'], // It falls back on the placeholder\n 'Nothing submitted / single / required / without a placeholder -> should be empty' => [true, null, false, true, null],\n 'Nothing submitted / single / required / with a placeholder -> should be empty' => [true, null, false, true, 'ccc'],\n 'Nothing submitted / multiple / not required / without a placeholder -> should be empty' => [true, null, true, false, null],\n 'Nothing submitted / multiple / required / without a placeholder -> should be empty' => [true, null, true, true, null],\n 'Placeholder submitted / single / not required / with a placeholder -> should not be empty' => [false, '', false, false, 'ccc'], // The placeholder is a selected value\n ];\n }", "public function toOptionArray()\n {\n if (!$this->options) {\n $this->options = Mage::getResourceModel('customer/group_collection')\n ->setRealGroupsFilter()\n ->loadData()->toOptionArray();\n array_unshift(\n $this->options,\n array(\n 'value' => 0,\n 'label' => Mage::helper('customer')->__('NOT LOGGED IN')\n )\n );\n }\n return $this->options;\n }", "public function toOptionArray()\n {\n return Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true);\n }", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "public function validate_option( $values ) {\n $out = array ();\n return $values;\n }", "protected function getOptionValueIds()\n {\n return array_unique($this->optionValueIds);\n }", "public function getAllOptions()\n {\n if ($this->_options === null) {\n $this->_options = [\n ['label' => __('All selected attributes will be required for approval'), 'value' => self::STATUS_REQUIRED],\n ['label' => __('All selected attributes will not be required for approval.'), 'value' => self::STATUS_NOT_REQUIRED],\n ];\n }\n return $this->_options;\n }", "protected function validate_options() {\n\t\tif ( empty( $this->field['fields']['options'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( count( $this->field['fields']['options']['value'] ) === 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( $this->field['fields']['options']['value'] as $key => $option_value ) {\n\t\t\tif ( empty( $key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ( empty( $option_value ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function emptyOptions()\n\t{\n\t\t$this->options = array();\n\n\t\treturn $this;\n\t}", "function OptionNull ($field)\r{\r\tif ($GLOBALS['feedback']) echo \"OptionNull($field)\\n\";\r\r\techo '<option value=\"\"';\r\tif (! $field) echo ' selected';\r\techo '>&nbsp;</option>';\r}", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "private function getExistingUserOptions() {\n\t\t$optionsNames = array();\n\t\t$sql = \"SELECT\toptionName\n\t\t\tFROM\twcf\".WCF_N.\"_user_option\n\t\t\tWHERE\toptionName NOT LIKE ?\";\n\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\t$statement->execute(array('option%'));\n\t\twhile ($row = $statement->fetchArray()) {\n\t\t\t$optionsNames[] = $row['optionName'];\n\t\t}\n\t\t\n\t\treturn $optionsNames;\n\t}", "function getOptions()\n\t{\n\t\t\n\t\treturn $this->getAssoc(Array('id','title')/*, $cond*/);\n\t}", "public function getOptions(): ?array\n {\n return $this->options;\n }", "private function getSelectOptions() {\n $result = \"\";\n if($this->pleaseSelectEnabled) {\n $result .= '<option value=\"null\"> -- Please Select --</option>';\n }\n foreach($this->itemList as $key => $val) {\n $selectedText = \"\";\n if(in_array($key, $this->selectedItems)) {\n $selectedText = 'selected=\"selected\"';\n }\n $result .= '<option value=\"'.$key.'\" '.$selectedText.'>'.$val.'</option>'.\"\\n \\t\";\n }\n return $result;\n }", "public function getArrayNullEmpty () {\n\n $values = array();\n\n foreach ($this->values as $key => $value) {\n\n if ($value !== null && is_string($value) && strlen($value) == 0) {\n\n $value = null;\n\n }\n\n $values[$key] = $value;\n\n }\n\n return $values;\n\n }", "public function cheapestOptions()\n {\n return (isset($this->quotes) && (is_array($this->quotes))) ? array_slice($this->quotes, 0, $this->totalCarriers) : [];\n }", "public function getOptions($please_select = false)\n {\n if ($please_select) {\n $options = array(null => '--Please Select--');\n }\n\n $carriers = Mage::getModel('temando/carrier')->getCollection();\n foreach ($carriers as $carrier) {\n\t if(!$carrier->getCarrierId())\n\t\tcontinue;\n\t \n $options[$carrier->getCarrierId()] = $carrier->getCompanyName();\n }\n\n return $options;\n }", "public function getOptions()\n {\n return $this->options ?: [];\n }", "public function getValueSelectOptions()\n {\n if (!$this->hasData('value_select_options')) {\n switch ($this->getAttribute()) {\n case 'country_id':\n $options = $this->_directoryCountry->toOptionArray(true);\n break;\n\n case 'region_id':\n $options = $this->_directoryAllregion->toOptionArray(true);\n break;\n\n default:\n $options = [];\n }\n $this->setData('value_select_options', $options);\n }\n\n return $this->getData('value_select_options');\n }", "private function validOptions()\n {\n return $this->isNumeric() ? $this->options : array_keys($this->options);\n }", "private function getEmptyData() {\n if (!$this -> empty_data) {\n $this -> empty_data = array();\n foreach ($this -> types as $key) {\n $this -> empty_data[$key] = \"\";\n }\n unset($this -> empty_data['user_type']); // the default value should never be set to \"\"\n unset($this -> empty_data['password']); // the default value should never be set to \"\"\n }\n return $this -> empty_data;\n }", "public function getOptionsArray($withEmpty = true)\n {\n $options = array();\n foreach ($this->getAllOptions($withEmpty) as $option) {\n $options[$option['value']] = $option['label'];\n }\n return $options;\n }", "public function getOptions() : array;", "public function getDefaultOptions()\n\t{\n\t\tswitch ($this->type) {\n\t\t\tcase self::TYPE_CHECKBOX:\n\t\t\tcase self::TYPE_LINKED_SELECT:\n\t\t\tcase self::TYPE_MULTI_SELECT:\n\t\t\tcase self::TYPE_RADIO:\n\t\t\tcase self::TYPE_SELECT:\n\t\t\t\t/** @noinspection PhpUndefinedMethodInspection */\n\t\t\t\treturn $this->getOptions()->filterByIsSelected();\n\t\t\tdefault:\n\t\t\t\treturn new kyResultSet(array(), 'kyCustomFieldOption');\n\t\t}\n\t}", "public function getAllOptions()\r\n {\r\n $result = [];\r\n\r\n foreach (self::getOptionArray() as $index => $value) {\r\n $result[] = ['value' => $index, 'label' => $value];\r\n }\r\n\r\n return $result;\r\n }", "public function toOptionArray()\n {\n return $this->getOptions(array('isCod' => false));\n }", "public function getRequiredOptions();", "protected function getEmptyFilter()\n {\n return array('filters' => array());\n }", "public function stdWrap_ifEmptyDeterminesEmptyValuesDataProvider() {}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('value', null, InputOption::VALUE_REQUIRED, 'Setting value', null),\n\t\t);\n\t}", "public function toOptionArray($defaultValues = false, $withEmpty = false)\n {\n $options = $allowedSet = [];\n $sets = $this->attrSetCollection\n ->setEntityTypeFilter($this->productModal->getResource()->getTypeId())->load()->toOptionHash();\n if (!$defaultValues) {\n $allowedSet = $this->getAllowedSet($this->storeManage->getStore(null)->getId());\n }\n\n foreach ($sets as $value => $label) {\n if (!$defaultValues && !in_array($value, $allowedSet)) continue;\n\n $options[] = ['value' => $value, 'label' => $label];\n }\n\n if ($withEmpty) {\n array_unshift($options, ['label' => '', 'value' => '']);\n }\n\n return $options;\n }", "protected function _toOptionArray($valueField='id', $labelField='name', $additional=array())\n {\n $data = parent::_toOptionArray($valueField, $labelField, $additional);\n array_unshift($data, array('value' => '', 'label' => Mage::helper('core')->__('Please select')));\n return $data;\n }", "public function getOptions()\n {\n return array_merge(parent::getOptions(), []);\n }", "public function getOptions()\n {\n return array_merge(parent::getOptions(), []);\n }", "public function isEmpty()\n\t{\n\t\tif (!count($this->options))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tforeach ($this->options as $o)\n\t\t{\n\t\t\tif ($o->getQuantity() > 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function getOptions()\n {\n return $this->optionRequested->get();\n }", "private static function getOption()\n {\n return array_merge(\n array_flip(['application_id', 'api_key', 'index_name']),\n array_filter((array) get_option('algolia_index'))\n );\n }", "public function getAllOptions()\n {\n if ($this->_options === null) {\n $this->_options = [\n ['label' => __('Fixed value'), 'value' => self::TYPE_FIXED],\n [\n 'label' => __('Dropdown values'), \n 'value' => self::TYPE_OPTION\n ],\n ['label' => __('Custom value'), 'value' => self::TYPE_RANGE],\n ];\n }\n return $this->_options;\n }", "public function toNonEmptyArray(): array;", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }" ]
[ "0.7248526", "0.6974299", "0.6927566", "0.6826012", "0.66438353", "0.6536376", "0.6497448", "0.6496091", "0.6437268", "0.6363146", "0.6352075", "0.63439274", "0.6250747", "0.62452984", "0.6222028", "0.62102556", "0.62085295", "0.6189132", "0.6181418", "0.6176706", "0.61664903", "0.61522275", "0.6141624", "0.613198", "0.61120164", "0.610926", "0.61061114", "0.61041796", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.6073845", "0.60622716", "0.60393184", "0.6034509", "0.5998542", "0.5998542", "0.5977008", "0.5977008", "0.5975501", "0.5959746", "0.59533066", "0.5943965", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.593922", "0.592322", "0.5916708", "0.58998305", "0.5899078", "0.5888956", "0.5882993", "0.5876254", "0.5876254", "0.5876254", "0.5876254", "0.5876254", "0.5876254", "0.5876254", "0.5872468", "0.5867062", "0.5860432", "0.5844739", "0.584254", "0.58421624", "0.58219707", "0.58203083", "0.58186233", "0.58008343", "0.5799584", "0.5797499", "0.5794725", "0.57878226", "0.5776547", "0.57754606", "0.57739913", "0.5765561", "0.5762928", "0.575643", "0.5741055", "0.5707347", "0.5701318", "0.5701318", "0.5696292", "0.56844336", "0.5683172", "0.56776154", "0.56755036", "0.5669886", "0.5669886" ]
0.0
-1
Retrieve option text by option value
public function getOptionText($optionId) { $options = self::getOptionArray(); return isset($options[$optionId]) ? $options[$optionId] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionText($value) {\n $options = $this->getAllOptions();\n foreach ($options as $option) {\n if ($option['value'] == $value) {\n return $option['label'];\n }\n }\n return false;\n }", "public function getOptionText($value)\n {\n foreach ($this->getAllOptions() as $option) {\n if ($option['value'] == $value) {\n return $option['label'];\n }\n }\n\n return false;\n }", "function smartchoice_get_option_text($id) {\n global $DB;\n\n if ($result = $DB->get_record('smartchoice_options', array('id' => $id))) {\n return $result->text;\n } else {\n return get_string('notanswered', 'smartchoice');\n }\n}", "public function getOpt($option) {}", "function getOption($name);", "public function getOptionElement($value){\n\t\treturn $this->options[$value];\n\t}", "public function getOption($name);", "public function getOption($name);", "public function getOption($name);", "function get_option() {\n\t\t\tcheck_ajax_referer('ajax-nonce', 'nonce');\n\t\t\tif (!empty($_POST['option'])) {\n\t\t\t\tswitch ($_POST['option']) {\n\t\t\t\t\tcase 'blogname':\n\t\t\t\t\t\techo preg_replace_callback(\"/(&#[0-9]+;)/\", array($this, 'decode_entities'), html_entity_decode(get_bloginfo('name')));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blogdescription':\n\t\t\t\t\t\techo preg_replace_callback(\"/(&#[0-9]+;)/\", array($this, 'decode_entities'), html_entity_decode(get_bloginfo('description')));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\techo get_option($_POST['option']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'notfound';\n\t\t\t}\n\t\t\tdie;\n\t\t}", "public function getOption(string $name);", "public function getOption(string $name);", "function PclZipUtilOptionText($p_option)\n {\n\n $v_list = get_defined_constants();\n for (reset($v_list); $v_key = key($v_list); next($v_list)) {\n\t $v_prefix = substr($v_key, 0, 10);\n\t if (( ($v_prefix == 'PCLZIP_OPT')\n || ($v_prefix == 'PCLZIP_CB_')\n || ($v_prefix == 'PCLZIP_ATT'))\n\t && ($v_list[$v_key] == $p_option)) {\n return $v_key;\n\t }\n }\n\n $v_result = 'Unknown';\n\n return $v_result;\n }", "protected function get_option_name()\n {\n }", "public function get(string $option);", "public function get(string $option);", "private function getOptionValue($form_field_list, $field_name, $option_value){\r\n \t\t\r\n \t\tforeach ($form_field_list as $form_row){\r\n \t\t\t\r\n \t\t\tif ($form_row['name'] == $field_name){\r\n \t\t\t\t\r\n \t\t\t\t$options = explode('::', $form_row['options']);\r\n \t\t\t\tarray_unshift($options, 0);\r\n \t\t\t\tunset($options[0]);\r\n \t\t\t\t\r\n \t\t\t\tif (@$options[$option_value])\r\n \t\t\t\t\treturn $options[$option_value];\r\n \t\t\t}\r\n \t\t\t\r\n \t\t} // foreach ($form_field_list as $form_row){\r\n \t\t\r\n \t}", "public function getOption() {\n return $this->get(self::OPTION);\n }", "function it_option($option){\n\techo get_it_option($option);\n}", "private function selectCustomField(): string\n {\n $value = $this->getValue($this->index);\n foreach($this->options as &$option) {\n if($option['key'] == $value) {\n $option['selected'] = true;\n break;\n }\n }\n\n return Template::build($this->getTemplatePath('select.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'options' => $this->options,\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "public function getOption($key);", "public function getOption($key)\n {\n return array_key_exists($key, $this->optionsCollection) ? $this->optionsCollection[$key] : '';\n }", "function getOptionLabel($listFile,$selectedValue)\n{\n\t$f=fopen($listFile,\"r\");\n\twhile (!feof($f)){\n\t\t$d=fgets($f);\n\t\t$start=strpos($d,\"\\\"\")+1;\n\t\t$end=strrpos($d,\"\\\"\");\n\t\t$val=substr($d,$start,$end-$start);\n\t\t\n\t\tif ($val==$selectedValue){\n\t\t\n\t\t\t$lstart=strpos($d,\">\")+1;\n\t\t\t$lend=strrpos($d,\"<\");\n\t\t\t$Label=substr($d,$lstart,$lend-$lstart);\n\t\t\tbreak;\n\t\t}\n\n\t}\n\tfclose($f);\n\treturn $Label;\n}", "function get_option($name) {\n $setting = Setting::where('name', $name)->first();\n if(!$setting) {\n return \"\";\n }\n return $setting->value;\n}", "public function getOptionText($optionId)\r\n {\r\n $options = self::getOptionArray();\r\n\r\n return isset($options[$optionId]) ? $options[$optionId] : null;\r\n }", "public function get() {\n\t\treturn $this->options->get( self::OPTION );\n\t}", "public function value()\n {\n return $this->app->input->get('option');\n }", "public function get( $option );", "public function getOption($option)\n {\n $option = strtoupper($option);\n if (array_key_exists($option, $this->options)) {\n return $this->options[$option];\n }\n \n return;\n }", "public function get_value() {\n return $this->get_selected_options();\n }", "function get_option( $option = false ) {\n\t\t\t\t// Get options from database\n\t\t\t\t$options = get_option( $this->option );\n\t\t\t\t// Check option is specified\n\t\t\t\t$value = ( $option ) ? $options[$option] : $options;\n\t\t\t\t// Return result\n\t\t\t\treturn ( is_array( $value ) ) ? array_filter( $value, 'esc_attr' ) : esc_attr( stripslashes( $value ) );\n\t\t\t}", "static function getOption($options, $selected) {\n $input = '';\n if ($options)\n foreach ($options as $key => $text) {\n $input .= '<option value=\"' . $key . '\"';\n if ($key == $selected) {\n $input .= ' selected';\n }\n $input .= '>' . $text . '</option>';\n }\n return $input;\n }", "public function option(string $option);", "public function getOption()\n {\n return $this->option;\n }", "public function getOption()\n {\n return $this->option;\n }", "function bb_print_mystique_option( $option ) {\r\n\techo bb_get_mystique_option( $option );\r\n}", "public function getValue() {\n\t\ttry {\n\t\t\t$value\t= parent::getValue();\n\t\t\tif (strlen($value) > 0) {\n\t\t\t\tif (!array_key_exists((string)$value, (array)$this->getOptions())) {\n\t\t\t\t\tthrow new LBoxExceptionFormControl(\"$value: \". LBoxExceptionFormControl::MSG_FORM_CONTROL_VALUE_NOT_OPTION, LBoxExceptionFormControl::CODE_FORM_CONTROL_VALUE_NOT_OPTION);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "function mc_option_selected( $field, $value, $type = 'checkbox' ) {\n\tswitch ( $type ) {\n\t\tcase 'radio':\n\t\tcase 'checkbox':\n\t\t\t$result = ' checked=\"checked\"';\n\t\t\tbreak;\n\t\tcase 'option':\n\t\t\t$result = ' selected=\"selected\"';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result = '';\n\t\t\tbreak;\n\t}\n\tif ( $field == $value ) {\n\t\t$output = $result;\n\t} else {\n\t\t$output = '';\n\t}\n\n\treturn $output;\n}", "public function option($key)\n {\n return $this->options[$key];\n }", "function uds_pricing_render_product_options_text($key, $value)\n{\n\tglobal $uds_pricing_column_options;\n\t$field = $uds_pricing_column_options[$key];\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='text' name='{$key}[]' value='$value' class='text {$key}' />\n\t\t\t<span class='tooltip'>?</span>\n\t\t\t<div class='tooltip-content'>{$field['tooltip']}</div>\n\t\t\t<div class='clear'></div>\n\t\t</div>\n\t\";\n\t\n\treturn $out;\n}", "function option_helper($post, $value, $label) {\n $selected = $post->post_status == $value ? 'selected' : '';\n return \"<option value='{$value}' {$selected}>{$label}</option>\";\n }", "public function wp_get_info(string $option = 'siteurl'){\n\n\t $bdd = Bdd::getInstance();\n\n\t\t$req = $bdd->dbh->prepare('SELECT option_value FROM '.$this->_table_prefix.'options WHERE option_name = \"' . $option . '\";');\n\t\t$req->execute();\n\n\t\treturn $req->fetch();\n\t}", "function the_option( $key ) {\n\n if ( ! $this->get_the_option( $key ) )\n return false;\n\n echo $this->get_the_option( $key );\n }", "private function getSurveyOptionValue($survey_id, $field_name, $option_value){\r\n \t\t\r\n \t\t/**\r\n \t\t * get survey data\r\n \t\t */\r\n \t\t$survey_data = $this->db_model->getSurveyData($survey_id);\r\n \t\t\r\n \t\tforeach ($survey_data as $row){\r\n \t\t\t\r\n \t\t\t$options = explode('::', $row['options']);\r\n \t\t\tarray_unshift($options, 0);\r\n \t\t\tunset($options[0]);\r\n \t\t\t\r\n \t\t\tif ($row['type'] == 'radio'){\r\n \t\t\t\t\r\n \t\t\t\tif (@$options[$option_value])\r\n \t\t\t\t\treturn $options[$option_value];\r\n \t\t\t\t\t\r\n \t\t\t}elseif ($row['type'] == 'checkbox'){\r\n \t\t\t\t\r\n \t\t\t\t$option_expl = explode('::', $option_value);\r\n \t\t\t\t\t\t\r\n\t\t \t\t$value = array();\r\n\t\t \t\tforeach ($option_expl as $row)\r\n\t\t \t\t\t$value[] = @$options[$row];\t\t\t\t\r\n \t\t\t\t\r\n\t\t \t\tif ($value)\r\n\t\t \t\t\treturn join(',', $value);\r\n\t\t \t\t\t\r\n \t\t\t} // if ($survey_data['type'] == 'radio'){\r\n \t\t\t\r\n \t\t} // foreach ($survey_data as $row){\r\n \t\t\r\n \t}", "function caldol_add_options_members_filter(){\n\techo '<option value=\"TomChoice\">doggie</option>';\n\t\t\n}", "function EV_get_option( $key = '' ) {\n\treturn cmb2_get_option( EV_admin()->key, $key );\n}", "public static function getSelect()\n {\n return Hash::combine(self::getConstants(), '{s}.value', '{s}.name');\n }", "function getFieldTitle($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_title');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_title');\n\t\t$tooltip = setToolTipNotification('title');\t\t\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('title') === 'title' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label></br><select name='title' id='title'><option value='Mr' \".($value == 'Mr'? 'selected': '').\">Mr</option><option value='Ms' \".($value == 'Ms'? 'selected': '').\">Ms</option><option value='Mrs' \".($value == 'Mrs'? 'selected': '').\">Mrs</option><option value='Others' \".($value == 'Others'? 'selected': '').\">Others</option></select></br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "function okrs_related_to_select($value)\n{\n\n $selected = '';\n if($value == 'okrs'){\n $selected = 'selected';\n }\n echo \"<option value='okrs' \".$selected.\">\".\n _l('okrs').\"\n </option>\";\n\n}", "function cpo_get_option( $option_name = '', $option_array = 'ctct_settings' ) {\n\t//Determines whether to grab current language, or original language's option\n\t$option_list_name = $option_array;\n\t$option_list = get_option( $option_list_name, false );\n\tif ( $option_list && isset( $option_list[ $option_name ] ) ) {\n\t\t$option_value = $option_list[ $option_name ];\n\t} else {\n\t\t$option_value = false;\n\t}\n\n\treturn $option_value;\n}", "public function get_name_option() {\n\t\tforeach ( $this->component as $item ) {\n\t\t\tif ( is_array( $item ) AND isset( $item['name'] ) AND isset( $item['val'] ) ) {\n\t\t\t\tif (\n\t\t\t\t\t$item['name'] == 'Name'\n\t\t\t\t AND isset( $item['options'] )\n\t\t\t\t\t AND is_array( $item['options'] )\n\t\t\t\t\t\t AND count( $item['options'] )\n\t\t\t\t) {\n\t\t\t\t\treturn $item['options'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function get_attribute_options_name_by_option($options_id) {\n\t\tglobal $db;\n\t\t$query = 'SELECT opt.products_options_name ' .\n\t\t\t'FROM ' . TABLE_PRODUCTS_OPTIONS . ' AS opt ' .\n\t\t\t'WHERE opt.products_options_id = \\'' . (int)$options_id . '\\' ' .\n\t\t\t\t'AND opt.language_id = \\'' . (int)$_SESSION['languages_id'] . '\\' ' .\n\t\t\t'LIMIT 1';\n\n\t\tif($this->cache_time == 0) $queryResult = $db->Execute($query);\n\t\telse $queryResult = $db->Execute($query, false, true, $this->cache_time);\n\n\t\t$retval = array();\n\t\tif(!$queryResult->EOF) {\n\t\t\treturn $queryResult->fields['products_options_name'];\n\t\t}\n\t\treturn null;\n\t}", "function form_setting( $option_name ) {\n\t$options = $this->get_options();\n\tif ( isset( $options[$option_name] ) )\n\t\treturn esc_attr( $options[$option_name] );\n\telse\n\t\treturn '';\n}", "protected function getOptionValue(DOMElement $option)\n {\n if ($option->hasAttribute('value')) {\n return $option->getAttribute('value');\n }\n\n return $option->textContent;\n }", "function _options_option($option) {\n global $db ;\n $data = null ;\n $req = $db->prepare(\"SELECT `data` FROM `_options` WHERE `option` = :option \") ;\n $req->execute(array(\n \"option\" => $option\n )) ;\n $data = $req->fetch() ;\n return (isset($data['data'])) ? $data['data'] : false ;\n}", "public function getOptionName()\n {\n return $this->optionName;\n }", "function print_text_field($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\tif(isset($value['disabled']) && $value['disabled']=='disabled')\n\t\t\t$input_value = $value['std'];\n\t\techo '<input class=\"option-input\" name=\"'.$value['id'].'\" id=\"'.$value['id'].'\" type=\"'.$value['type'].'\" value=\"'.$input_value.'\" '.((isset($value['disabled']) && $value['disabled']=='disabled')?'disabled=\"disabled\"':'').'/>';\n\t\t$this->close_option($value);\n\t}", "private function get_option($option) {\n\t\tif ( isset( $this->settings_section_options[$option] ) ) {\n\t\t\t$name = $this->settings_section.'-'.$this->settings_section_options[$option]['name'];\n\t\t\treturn esc_attr( get_option( $name ) );\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "public function getValue() {\n \n $_aParams = func_get_args(); \n return AdminPageFramework_WPUtility::getOption( \n $this->oProp->sOptionKey, \n $_aParams, \n null, // default\n $this->getSavedOptions() + $this->oProp->getDefaultOptions( $this->oForm->aFields ) // additional array to merge with the options\n );\n \n }", "function getOptionValues() {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookuptypevalue as optiontext, lv.lookuptypevalue as optionvalue FROM lookuptype AS l , \n\t\tlookuptypevalue AS lv WHERE l.id = lv.lookuptypeid AND l.name ='\".$this->getName().\"' ORDER BY optiontext \";\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}", "function olc_mod_select_option($select_array, $key_name, $key_value) {\n\treset($select_array);\n\twhile (list($key, $value) = each($select_array)) {\n\t\tif (is_int($key)) $key = $value;\n\t\t$string .= '<br/><input type=\"radio\" name=\"configuration[' . $key_name . ']\" value=\"' . $key . QUOTE;\n\t\tif ($key_value == $key) $string .= ' CHECKED';\n\t\t$string .= '> ' . $value;\n\t}\n\n\treturn $string;\n}", "function ARTEMIS_SWP_JPT_get_plugin_option($option)\r\n{\r\n\t$options = get_option('AC_plugin_options');\r\n\t\r\n\tif (isset($options[$option])) {\r\n\t\treturn $options[ $option ];\r\n\t}\r\n\t\r\n\treturn \"\";\r\n}", "public function getOptionTitle()\n {\n return $this->optionTitle;\n }", "public function get_value($option_key)\r\n {\r\n return get_option($option_key, '');\r\n }", "function bb_get_mystique_option( $option ) {\r\n\t$get_mystique_option = bb_get_mystique_options();\r\n\treturn $get_mystique_option[$option];\r\n}", "function PclZipUtilOptionText($p_option)\n {\n }", "function uds_pricing_render_general_options_text($key, $value)\n{\n\tglobal $uds_pricing_general_options;\n\t$field = $uds_pricing_general_options[$key];\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='text' name='uds-pricing-$key' value='$value' class='uds-pricing-$key' />\n\t\t</div>\n\t\";\n\treturn $out;\n}", "function getThemengebieteOption(){\n\t\t$strThemengebiete = '';\n\t\t$resThemengebiete = $GLOBALS['TYPO3_DB']-> exec_SELECTquery('*', 'tx_topic_detail', 'deleted=0 AND hidden=0');\n\t\tif(mysql_num_rows($resThemengebiete) > 0){\n\t\t\twhile($rowThemenge = mysql_fetch_array($resThemengebiete)){\n\t\t\t\t$strThemengebiete .= '<option value=\"' . $rowThemenge['uid'] . '\">' . $rowThemenge['title'] . '</option>';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $strThemengebiete;\n\t}", "function select_option()\r\n{}", "public function getOption( $key ) {\n\n\t\t\t$options = get_option( $this->optionsKey, array() );\n\t\t\t$value = isset( $options[$key] ) ? $options[$key] : '';\n\n\t\t\treturn $value;\n\t\t}", "function OptionBox($label, $value, $defaultvalue, $text)\n{\n $result = '';\n\tfor ($i=0; $i<count($label); $i++)\n\t{\n\t\t$result .= '<option label=\"'.$label[$i];\n\t\t$result .= '\" value=\"'.$value[$i].'\" ';\n\t\tif (isset($defaultvalue))\n\t\t{\n\t \tif ($value[$i]==$defaultvalue)\n\t \t\t{\n\t \t\t\t$result .= 'selected=\"selected\" ';\n\t \t\t}\n\t\t}\n\t \t$result .= '>'.$text[$i].'</option>';\n\t}\n\treturn $result;\n}", "function get_field_value($id){\n\t\treturn stripslashes(get_option( $id )); \n\t}", "function _get( $option_key ) {\n\t\treturn bf_get_option( $option_key, $this->option_panel_id );\n\t}", "function get_the_option( $key ) {\n return genesis_get_option( $key, GENESIS_SIMPLE_SETTINGS_FIELD );\n }", "function olc_cfg_select_option($select_array, $key_value, $key = '') {\n\tfor ($i = 0, $n = sizeof($select_array); $i < $n; $i++) {\n\t\t$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');\n\t\t$string .= '<br/><input type=\"radio\" name=\"' . $name . '\" value=\"' . $select_array[$i] . QUOTE;\n\t\tif ($key_value == $select_array[$i]) $string .= ' CHECKED';\n\t\t$string .= '> ' . $select_array[$i];\n\t}\n\treturn $string;\n}", "public function getOptions() {\n\t\tif ($this->row->options != '') {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t}\n\t\tif ($this->row->intoptions != '') {\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$options_map = array_combine($intoptions, $options);\n\t\t}\n\t\tif ($options) {\n\t\t\t$msg = \"Predefined Options:\\n\";\n\t\t\tif ($intoptions) {\n\t\t\t\tforeach ($options_map as $key => $label) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$key}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$label}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($options as $char) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$char}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$char}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $msg;\n\t}", "public function getLabelForOption($option)\n {\n if ( ! array_key_exists($option, $this->options)) {\n return null;\n }\n\n return $this->options[$option];\n }", "protected function getOptionsValue($index)\n {\n $index = trim((string)$index);\n if ($index === '') {\n return null;\n }\n if (!empty($this->options[$index])) {\n return $this->options[$index];\n }\n return null;\n }", "public function getSiteOption($optionName){\n\t\ttry{\t\t\n\t\t\t$stmt = $this->db->prepare(\"SELECT optionValue FROM site_options WHERE optionName = :optionName\");\n\t\t\t$stmt->execute(array(':optionName'=>$optionName));\n\t\t\t$val=$stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $val['optionValue'];\t\t\t\n\t\t} catch(PDOException $e) {\n echo $e->getMessage();\n } \n }", "function option($name)\n{\n $name = apply_filters(\"display_option_$name\", get_option($name));\n $name = html_escape($name);\n return $name;\n}", "public static function get_font_subset_option_elements() {\n\n\t\treturn '<option value=\"unknown\">' . esc_html__( 'Unknown', 'publisher' ) . '</option>';\n\t}", "public function onJSolrSearchOptionLookup($value)\n\t{\t\n\t\t$conf = JFactory::getConfig();\n\t\t$options = array(\n\t\t\t\t'defaultgroup' => 'plg_jsolrsearch_jreviews',\n\t\t\t\t'cachebase' => $conf->getValue('config.cache_path'),\n\t\t\t\t'lifetime' => $conf->getValue('config.cachetime') * 60, // minutes to seconds\n\t\t\t\t'language' => $conf->getValue('config.language'),\n\t\t\t\t'storage' => $conf->getValue('config.storage', 'file'));\n\t\t\n\t\t$cache = new JCache($options);\n\t\t$cache->setCaching(true);\n\t\t\n\t\tif (!$list = json_decode($cache->get('options', $options['defaultgroup']))) {\t\n\t\t\t$database = JFactory::getDbo(); \n\t\t\t\n\t\t\t$query = $database->getQuery(true);\n\t\t\t$query\n\t\t\t\t->select(array('text', 'value'))\n\t\t\t\t->from('#__jreviews_fieldoptions');\n\t\t\t\n\t\t\t$database->setQuery($query);\n\t\t\t\n\t\t\t$list = $database->loadObjectList();\n\t\t\t\n\t\t\t// cache these options so we don't need to keep loading from db.\n\t\t\t$cache->store(json_encode($list), $options['defaultgroup']);\n\t\t}\n\t\t\n\t\t$found = false;\n\t\t$text = \"\";\n\t\twhile (!$found && $item = current($list)) {\n\t\t\tif ($item->value == $value) {\n\t\t\t\t$found = true;\n\t\t\t\t$text = $item->text;\n\t\t\t}\n\t\t\t\n\t\t\tnext($list);\n\t\t}\n\t\t\n\t\treturn $text;\n\t}", "abstract protected function getOption(string $option, string $section = '');", "function get_it_option( $option ) {\n\t$options = get_option( 'chalmersit_options' );\n\tif ( isset( $options[$option] ) )\n\t\treturn $options[$option];\n\telse\n\t\treturn false;\n}", "public function getSelected(?int $type = null): bool|string\n {\n foreach ($this->arrOption as $option) {\n if ($option->selected) {\n return $type === self::SELECTED_BY_TEXT ? $option->text : $option->value;\n }\n }\n\n return false;\n }", "public function get( $option ) {\n\t\treturn $this->options->get( $option );\n\t}", "final protected function getOption($option) {\n return isset($this->valueOptions[$option]) ? $this->valueOptions[$option] : null;\n }", "function HERITAGE_get_theme_option($option_group, $option_name)\n{\n $options = get_option($option_group);\n\n if (isset($options[$option_name])) {\n return $options[$option_name];\n }\n\n return '';\n}", "function sel_get_text ( $ii ) {\n\t\treturn strval ( $this->pi1->stat['years'][$ii] );\n\t}", "public function text() {\n\tif( count($this->selectList) > 0 && isset($this->selectList[0])) return htmlspecialchars($this->selectList[0]->getCurrentHtml());\n\t return htmlspecialchars($this->getCurrentHtml());\n }", "public function get_field_option( $value ) {\n\t\treturn FrmField::get_option( $this->field, $value );\n\t}", "public function getLabelByValue($value = '')\n {\n $options = $this->toOptionArray();\n if (count($options)) {\n foreach ($options as $option) {\n if (isset($option['value']) && $option['value'] == $value) {\n $value = isset($option['label']) ? $option['label'] : $value;\n break;\n }\n }\n }\n return $value;\n }", "function isSelected($val,$option) {\r\n $cmp = strcmp($val,$option);\r\n if ($cmp == 0)\r\n return \" SELECTED\";\r\n else\r\n return \"\";\r\n}", "static function option( $value, $text, $attr = null )\n\t{\n\t return array(\n\t 'value' => $value,\n\t 'text' => $text,\n\t 'attributes' => $attr\n\t );\n\t}", "function getOptionSelect($option = array(), $selected = '')\n{\n $return = '';\n for ($a = 0; $a < count($option); $a++) {\n if ($selected != '' && $selected == $option[$a]) {\n $return .= '<option value=\"' . $option[$a] . '\" selected=\"selected\">' . $option[$a] . '</option>';\n } else {\n $return .= '<option value=\"' . $option[$a] . '\">' . $option[$a] . '</option>';\n }\n }\n return $return;\n}", "public function displayValue() {\n\t\tif ($this->row->intoptions != \"\") {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$intoptions2 = array_flip($intoptions);\n\t\t\t$key = $intoptions2[$this->row->value];\n\t\t\treturn \"<highlight>{$options[$key]}<end>\";\n\t\t} else {\n\t\t\treturn \"<highlight>\" . htmlspecialchars($this->row->value) . \"<end>\";\n\t\t}\n\t}", "protected function absenceLabel($option)\n {\n return $this->absenceLabelList[$option];\n }", "function getOption ( $key, $option )\n\t{\n\t\tif ( isset( $this->options[$option][$key] ) ) {\n\t\t\t$return = $this->options[$option][$key]; // From Admin Page\n\t\t} else {\n\t\t\t$return = $this->default_options[$option][$key]; // Default\n\t\t}\n\t\treturn ($return);\n\t}", "public function option(string $key)\n {\n return $this->input->getOption($key);\n }", "private function getYesNoOptionValue($yn_field_list, $field_name, $option_value){\r\n \t\t\r\n \t\tforeach ($yn_field_list as $yn_row){\r\n \t\t\t\r\n \t\t\tif ($yn_row['name'] == $field_name){\r\n \t\t\t\t\r\n \t\t\t\t$options = explode(';opt;', $yn_row['options']);\r\n \t\t\t\tarray_unshift($options, 0);\r\n \t\t\t\tunset($options[0]);\r\n \t\t\t\t\r\n \t\t\t\tif (@$options[$option_value])\r\n \t\t\t\t\treturn $options[$option_value];\r\n \t\t\t}\r\n \t\t\t\r\n \t\t} // foreach ($form_field_list as $form_row){\r\n \t\t\r\n \t}" ]
[ "0.7324542", "0.71233946", "0.6881275", "0.6819372", "0.6802792", "0.6715897", "0.6519207", "0.6519207", "0.6519207", "0.64764524", "0.6433878", "0.6433878", "0.62758607", "0.6243528", "0.6229604", "0.6229604", "0.61794233", "0.6166231", "0.614617", "0.6144168", "0.6141262", "0.6127802", "0.6091224", "0.6080055", "0.6071028", "0.6066135", "0.6061155", "0.6058617", "0.6027696", "0.5994804", "0.59905356", "0.5980797", "0.5979691", "0.5972353", "0.5972353", "0.59559745", "0.5954574", "0.59436744", "0.59314233", "0.59167105", "0.59092426", "0.58941424", "0.58909696", "0.5877804", "0.5875679", "0.5865473", "0.58591264", "0.58586967", "0.58557147", "0.584617", "0.5836063", "0.58359486", "0.5823725", "0.5823607", "0.582196", "0.58082926", "0.5805174", "0.5805094", "0.58017457", "0.57880044", "0.5786111", "0.5785492", "0.57763284", "0.5752807", "0.574205", "0.5737036", "0.57292426", "0.57264036", "0.56981426", "0.5688531", "0.5683586", "0.56821334", "0.56751466", "0.56718856", "0.56694394", "0.5664544", "0.5657945", "0.5654476", "0.56519526", "0.56329286", "0.5630991", "0.5629903", "0.56250244", "0.56227916", "0.5620476", "0.5620392", "0.56189924", "0.5595341", "0.5594482", "0.5585053", "0.55841", "0.5580674", "0.5575803", "0.5570655", "0.5558333", "0.5554733", "0.5551988", "0.55481184", "0.5540373", "0.55393726" ]
0.58916384
42
Get options as array
public function toOptionArray() { return $this->getAllOptions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions() : array;", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions() : array\n {\n return [];\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions() {\n\t\treturn array();\n\t}", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n\n );\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn isset($this->options) ? $this->options : array();\r\n\t}", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->options;\n }", "public function getOptions(): array\n {\n return $this->_options;\n }", "protected function getOptions(): array\n {\n return [];\n }", "protected function getOptions(): array\n {\n return [];\n }", "public function getOptions(): array {\n return $this->options;\n }", "public function getOptions(): array {\n return $this->options;\n }", "protected function _options() {\n\t\t\treturn array();\n\t\t}", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "public function toArray(): array\n {\n return $this->options;\n }", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "public function getOptions()\n {\n return array();\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "public function getOptions()\n {\n return $this->options ?: [];\n }", "public function toOptionArray()\n {\n return $this->optionsProvider->getOptionsArray();\n }", "public function toArray()\n\t{\n\t\treturn $this->_options;\n\t}" ]
[ "0.8709961", "0.8709961", "0.8709961", "0.8709961", "0.8709961", "0.8709961", "0.8709961", "0.8641049", "0.84552735", "0.84552735", "0.84552735", "0.84552735", "0.84552735", "0.84552735", "0.84552735", "0.84552735", "0.84552735", "0.8421699", "0.84089893", "0.84089893", "0.84089893", "0.84089893", "0.84089893", "0.84089893", "0.84089893", "0.84070915", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83998567", "0.83868635", "0.836899", "0.836899", "0.836899", "0.8367356", "0.8324911", "0.8314778", "0.8314778", "0.8314778", "0.8314778", "0.8314778", "0.8314778", "0.8314778", "0.82788444", "0.82618433", "0.82618433", "0.8258103", "0.8258103", "0.8246193", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.82453656", "0.8234078", "0.8234078", "0.8234078", "0.8234078", "0.82286614", "0.82286614", "0.82286614", "0.82286614", "0.82286614", "0.82286614", "0.82286614", "0.8222912", "0.8222912", "0.8222912", "0.8222912", "0.8222912", "0.8222912", "0.8222912", "0.8222912", "0.8222912", "0.820276", "0.8201404", "0.81994367", "0.81727505", "0.8167841", "0.8162763", "0.81608236" ]
0.0
-1
Transform the resource into an array.
public function toArray() { $secretario = Profesor::find(config(fileContactos().'.secretario')); $director = Profesor::find(config(fileContactos().'.director')); return [ 'untitled1' => $secretario->fullName, 'untitled13' => $secretario->fullName, 'untitled3' => config('contacto.nombre'), 'untitled15' => config('contacto.nombre'), 'untitled5' => config('contacto.codi'), 'untitled17' => config('contacto.codi'), 'untitled6' => $this->getElements()->Instructor->contacto, 'untitled18' => $this->getElements()->Instructor->contacto, 'untitled8' => $this->getElements()->Instructor->dni, 'untitled20' => $this->getElements()->Instructor->dni, 'untitled10' => $this->getElements()->Colaboracion->Ciclo->vliteral, 'untitled22' => $this->getElements()->Colaboracion->Ciclo->cliteral, 'untitled12' => curso(), 'untitled24' => curso(), 'untitled25' => $this->getElements()->Colaboracion->Centro->Empresa->nombre, 'untitled26' => $this->getElements()->Alumnos->count(), 'untitled27' => min(800, $this->getElements()->AlFct->sum('horas')), 'untitled28' => config('contacto.poblacion'), 'untitled29' => day(Hoy()), 'untitled30' => month(Hoy()), 'untitled31' => substr(year(Hoy()), 2, 2), 'untitled32' => $director->fullName, 'untitled34' => $secretario->fullName ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function asArray() {\n return $this->resource;\n }", "public function transform($resource)\n {\n return [];\n }", "public function toArray()\n {\n if ($this->resource instanceof ArrayableInterface) {\n\n return $this->resource->toArray();\n } else {\n\n return null;\n }\n }", "public function parse($resource)\n {\n return $resource->toArray();\n }", "public function transform($resource)\n {\n return [\n 'id' => $resource['id'],\n 'item' => $resource['item'],\n 'qty' => $resource['qty'],\n\n ];\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "abstract protected function toArray();", "public function getAsArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}", "public function transform($resource)\n {\n return [\n\n 'id' => (int) $resource->id,\n\t\t\t'name' => $resource->name,\n\t\t\t'description' => $resource->description,\n 'seat_count' => $resource->seat_count,\n\t\t\t'is_active' => $resource->is_active,\n\t\t\t'status' => $resource->status,\n\t\t\t'created_at' => $resource->created_at->toDateTimeString(),\n\t\t\t'updated_at' => $resource->updated_at->toDateTimeString(),\n\t\t\t\n ];\n }", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray(): array\n {\n return [\n 'users' => HiUserResource::collection($this->resource),\n ];\n }", "public function toArray()\n {\n return $this->transform();\n }", "function toArray() ;", "function toArray() ;", "public function convertItemArray() {}", "public function toArray(): array\n {\n $content = $this->getContent();\n\n if (\\is_array($content)) {\n return $this instanceof Filterable\n ? (array) $this->filterResponse($content)\n : $content;\n }\n\n return [];\n }", "protected function asArray()\n\t{\n\t\treturn \\json_decode($this->response, true);\n\t}", "public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}", "public function toArray()\n {\n return $this->getContent();\n }", "public function toArray()\n {\n\n }", "public function asArray(): array\n {\n return json_decode($this->result, true);\n }", "public function toArray()\n {\n return $this->cast('array');\n }", "function toArray(){\r\n\t\treturn $this->data;\r\n\t}", "private function arrayify(): array\n {\n return $this->toArray();\n }", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "abstract public function toArray();", "public function toArray() // untested\n {\n return $this->data;\n }", "public function toArray(){\n $this->buildArray();\n return $this->array;\n }", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;" ]
[ "0.7750928", "0.7750928", "0.7715773", "0.75906307", "0.7310379", "0.7138024", "0.7134791", "0.7096877", "0.7096877", "0.70968604", "0.70968604", "0.70968604", "0.70968604", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.6959165", "0.69560915", "0.68910366", "0.68910366", "0.68910366", "0.68910366", "0.68910366", "0.68910366", "0.6881386", "0.6868011", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6852651", "0.6851924", "0.6790647", "0.674651", "0.674651", "0.67363435", "0.6720337", "0.6712338", "0.67115825", "0.6710179", "0.666141", "0.66587526", "0.6656767", "0.6655622", "0.66545117", "0.6648871", "0.6648871", "0.6648871", "0.6648871", "0.6648871", "0.66377884", "0.6637001", "0.6629", "0.6629", "0.6629", "0.6629", "0.6629", "0.6629", "0.6629" ]
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('CREATE TABLE IF NOT EXISTS user (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(180) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_8D93D649F85E0677 (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('INSERT INTO user (username, roles, password) VALUES ("admin", "[\"ROLE_ADMIN\"]", "$argon2i$v=19$m=65536,t=4,p=1$RUN1ZmY3RVlTYU5iYU9xdw$TKXm66YFI4P9+AcDjvxGB6UwwC6COsjhrH280QAQIC8")'); $this->addSql('ALTER TABLE place DROP COLUMN IF EXISTS creator_id'); $this->addSql('ALTER TABLE place ADD COLUMN user_id INT'); $this->addSql('ALTER TABLE place ADD CONSTRAINT FK_741D53CDA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)'); $this->addSql('CREATE INDEX IDX_741D53CDA76ED395 ON place (user_id)'); $this->addSql('UPDATE place set user_id = (SELECT id FROM user)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}" ]
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.7329024", "0.7313519", "0.7298817", "0.72950184", "0.72917736", "0.7291469", "0.72913444", "0.72849613", "0.72839737", "0.7272078", "0.7271878", "0.72659117", "0.7262893", "0.7261672", "0.7256839", "0.72505474", "0.7249633", "0.72441125", "0.724062", "0.72376186", "0.7218244", "0.72177947", "0.72046006", "0.7203395", "0.7196059", "0.7191219", "0.7189963", "0.7177052", "0.71761394", "0.7167738", "0.7164105", "0.7164105", "0.7159096", "0.7147647", "0.7136521", "0.7129768", "0.7124664", "0.7123368", "0.71168584", "0.7104628", "0.7104628", "0.7104618", "0.7097006", "0.70931643", "0.70886755", "0.7087018", "0.7086326", "0.70830804", "0.70829463", "0.70780045", "0.70702124", "0.70690626", "0.7066111", "0.7062268", "0.7058938", "0.705882", "0.70556235", "0.70549136", "0.7054758", "0.70498437", "0.70483595", "0.7047308", "0.7045881", "0.70445794", "0.7043173", "0.703882", "0.7038126", "0.703674", "0.7033728", "0.7032356", "0.7031423", "0.70257956", "0.70142514", "0.70101255", "0.7006208", "0.6988486", "0.6984963", "0.69629973", "0.69612974", "0.69587934", "0.6957519" ]
0.0
-1
/start of login request
public function login(Request $request){ $rules = [ 'email' => 'required|email', 'password'=> 'required' ]; $validator = Validator::make(request()->all(),$rules); if($validator->fails()){ result( 401, $validator->messages(), null); } else{ if(auth()->attempt(['email'=>request('email') , 'password'=>request('password'),'status'=>'verified'])){ User::where('email',request('email'))->update(['api_token'=>Str::random(60)]); $user = User::where('email',$request->email)->first(); if(empty($user->image)){ $user_image = null; } else{ $user_image = 'http://www.vretech.com/images/users/'.$user->image; } $userdata = [ 'id' =>$user->id, 'name' =>$user->name, 'email' =>$user->email, 'mobile' =>$user->mobile, 'image' => $user_image, 'token' =>$user->api_token, 'country_name' =>$user->country->country_name, 'country_id' =>$user->country->id, 'city_name' =>$user->city->city_name, 'city_id' =>$user->city->id ]; result(200 ,null,$userdata); } else{ result(401); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loginBegin()\r\n\t{\r\n\t\t// if we have extra perm\r\n\t\tif( isset( $this->config[\"scope\"] ) && ! empty( $this->config[\"scope\"] ) )\r\n\t\t{\r\n\t\t\t$this->scope = $this->scope . \", \". $this->config[\"scope\"];\r\n\t\t}\r\n\r\n\t\t// get the login url \r\n\t\t$url = $this->api->getLoginUrl( array( 'scope' => $this->scope, 'redirect_uri' => $this->endpoint ) );\r\n\r\n\t\t// redirect to facebook\r\n\t\tHybrid_Auth::redirect( $url ); \r\n\t}", "protected function loginIfRequested() {}", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "public static function login()\n {\n (new Authenticator(request()))->login();\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "private function login(){\n \n }", "abstract protected function doLogin();", "public function processLogin(): void;", "public function beginLogin() {\n return false;\n }", "private function doLogin()\n {\n if (!isset($this->token)) {\n $this->createToken();\n $this->redis->set('cookie_'.$this->token, '[]');\n }\n\n $loginResponse = $this->httpRequest(\n 'POST',\n 'https://sceneaccess.eu/login',\n [\n 'form_params' => [\n 'username' => $this->username,\n 'password' => $this->password,\n 'submit' => 'come on in',\n ],\n ],\n $this->token\n );\n\n $this->getTorrentsFromHTML($loginResponse);\n }", "function login()\n\t{\n\t\t$GLOBALS['appshore']->session->createSession();\n\n\t\t$GLOBALS['appshore_data']['layout'] = 'auth';\n\t\t\n\t\t// define next action\n\t\t$result['action']['auth'] = 'login';\n\n\t\t// if a query_string was passed without being auth we keep it to deliver it later\n\t\tif( strpos( $_SERVER[\"QUERY_STRING\"], 'op=') !== false )\n\t\t\t$result['nextop'] = base64_encode($_SERVER[\"QUERY_STRING\"]);\n\t\t\t\n\t\treturn $result;\n\t}", "public function executeLogin()\n {\n }", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "public function beginLogin() {\n \n $this->info(\"beginning login...\");\n \n $status = $this->requestAuthentication($this->requestURL, $this->authURL);\n \n if(!$status) {\n $this->error(\"problem launching Yahoo authenication: \".$this->getError());\n }\n \n return true;\n }", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "private function _login() {\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n $this->_connection->setUri( $this->_baseUrl . self::URL_LOGIN );\n $this->_connection->setParameterPost( array(\n 'login_username' => $this->_username,\n 'login_password' => $this->_password,\n 'back' => $this->_baseUrl,\n 'login' => 'Log In' ) );\n $this->_doRequest( Zend_Http_Client::POST );\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n throw new Opsview_Remote_Exception( 'Login failed for unknown reason' );\n }\n }\n }", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "function SubmitLoginDetails()\n\t{\n\t\t// Login logic is handled by Application::CheckAuth method\n\t\tAuthenticatedUser()->CheckAuth();\n\t}", "function login() { }", "public function login();", "public function login();", "protected function login( )\r\n {\r\n $this->sendData( 'USER', $this->_nick, $this->_nick . ' ' . $this->_user . ' : ' . $this->_realName );\r\n \r\n $this->sendData( 'NICK', $this->_nick );\r\n \r\n $this->_loggedOn = true;\r\n }", "public function startAction()\n {\n if ($this->request->isPost()) {\n $email = $this->request->getPost('email');\n $password = $this->request->getPost('password');\n/**\n * Include password settings\n * \n * \n */ \n require \"../app/library/Generator.php\";\n \n/**\n * Password salt and hash with 2 methods\n * \n * \n */ \n $secret = $option[\"secret\"];\n $password = hashIt($password, $secret);\n\n/**\n * Compare post data to database\n * \n * \n */ \n $user = Users::findFirst(array(\n \"email_usr = :email: OR username_usr = :email:\",\n 'bind' => array('email' => $email) \n ));\n\t\t\t\n/**\n * If user is found, welcome\n * \n * \n */ \n if ( $user ) {\n\t\t\t\tif ( $this->security->checkhash($password . $secret, $user->pw_usr)) {\n\n\t\t\t\t\t$this->_registerSession($user);\n\t\t\t\t\t$this->flash->success('Welcome ' . ucfirst($user->first_usr));\n\t\t\t\t\t\n\t\t\t\t\tif ( '10' == $user->level_usr_lvl ) {\n\t\t\t\t\t\treturn $this->forward('admin/index');\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn $this->forward('member/index');\n\t\t\t\t\t}\n\t\t\t\t}\n }\n $this->flash->error('Wrong email/password. ');\n\t\t\t\n }\n return $this->forward('login/index');\n }", "function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "public function login()\n {\n $loginPostArray = $this->_getLoginPostArray();\n \n // Reset the client\n //$this->_client->resetParameters();\n \n // To turn cookie stickiness on, set a Cookie Jar\n $this->_client->setCookieJar();\n \n // Set the location for the login request\n $this->_client->setUri($this->_login_endPoint);\n \n // Set the post variables\n foreach ($loginPostArray as $loginPostKey=>$loginPostValue) {\n $this->_client->setParameterPost($loginPostKey, $loginPostValue);\n }\n \n // Submit the reqeust\n $response = $this->_client->request(Zend_Http_Client::POST);\n }", "public function doLogin($ceredentials){\n\t}", "function login_init() {\n\n\t\t\t$current_user_id = get_current_user_id();\n\n\t\t\tif ( $current_user_id ) {\n\n\t\t\t\t$is_merge = false;\n\t\t\t\tif ( isset( $_REQUEST[\"isMerge\"] ) && $current_user_id !== null ) {\n\t\t\t\t\tif ( $_REQUEST[\"isMerge\"] === 1 || $_REQUEST[\"isMerge\"] === '1' ) {\n\t\t\t\t\t\t$is_merge = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$linkid_user_id = get_user_meta( $current_user_id, self::WP_USER_META_VALUE_LINKID_USER_ID, true );\n\n\t\t\t\tif ( $is_merge && trim( $linkid_user_id ) ) {\n\n\t\t\t\t\t// generate the response\n\t\t\t\t\t$response = json_encode( Link_WP_LinkID_PollResult::createFromError(\n\t\t\t\t\t\t__( \"Unable to start merging. Logged in user already linked to linkID account\", \"link-linkid\" ),\n\t\t\t\t\t\tfalse ) );\n\n\t\t\t\t\t// response output\n\t\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\t\techo $response;\n\n\t\t\t\t\tdie();\n\n\t\t\t\t} else if ( ! $is_merge && trim( $linkid_user_id ) ) {\n\n\t\t\t\t\t// generate the response\n\t\t\t\t\t$response = json_encode( Link_WP_LinkID_PollResult::createFromError(\n\t\t\t\t\t\t__( \"Unable to start login. User already logged in. Please wait while you are being redirected.\", \"link-linkid\" ),\n\t\t\t\t\t\tfalse, false, true, $this->get_redirect_url( wp_get_current_user() ) ) );\n\n\t\t\t\t\t// response output\n\t\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\t\techo $response;\n\n\t\t\t\t\tdie();\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$linkIDAuthnSession = Link_WP_LinkID::start_authn_request();\n\n\t\t\t// generate the response\n\t\t\t$response = json_encode( Link_WP_LinkID_PollResult::createFromAuthnSession( $linkIDAuthnSession ) );\n\n\t\t\t// response output\n\t\t\theader( \"Content-Type: application/json\" );\n\t\t\techo $response;\n\n\t\t\tdie();\n\t\t}", "public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}", "function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }", "protected function hasLoginBeenProcessed() {}", "public function loginAction()\n {\n $session = new Zend_Session_Namespace(__CLASS__);\n $baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();\n try {\n $referer = Zend_Uri_Http::factory($_SERVER['HTTP_REFERER']);\n } catch (Exception $e) {\n }\n if ($this->_getParam('referer')) {\n $session->referer = $this->_getParam('referer');\n } else if ($referer && \n $referer->getHost() == $_SERVER['HTTP_HOST'] &&\n (!$referer->getPort() || $referer->getPort() == $_SERVER['SERVER_PORT']) &&\n substr($referer->getPath(), 0, strlen($baseUrl)) == $baseUrl) {\n $session->referer = substr($referer->getPath(), strlen($baseUrl));\n $session->referer = ltrim($session->referer, '/'); \n if ($referer->getQuery()) {\n $session->referer .= '?' . $referer->getQuery();\n }\n if ($referer->getFragment()) {\n $session->referer .= '#' . $referer->getFragment();\n }\n } else {\n $session->referer = $this->_getDefaultLandingPath();\n }\n \n $this->_redirect($this->_getCasAdapter()->getLoginUrl());\n }", "public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function login() {\n $this->FormHandler->setRequired('employeeCode');\n $this->FormHandler->setRequired('employeePassword');\n\n\n if ($this->FormHandler->run() === true) {\n $employeeCode = $this->FormHandler->getPostValue('employeeCode');\n $employePassword = $this->FormHandler->getPostValue('employeePassword');\n if ($this->User->checkLoginCredentials($employeeCode, $employePassword) === true) {\n // Log them in and redirect\n $this->User->loginClient($_SESSION, $employeeCode);\n redirect('employee/dashboard');\n }\n }\n else if ($this->User->checkIfClientIsLoggedIn($_SESSION) === true) {\n redirect('employee/dashboard');\n }\n\n loadHeader();\n include APP_PATH . '/view/user/login.php';\n loadFooter();\n }", "protected function login()\n {\n $this->send(Response::nick($this->config['nick']));\n $this->send(Response::user(\n $this->config['nick'],\n $this->config['hostname'],\n $this->config['servername'],\n $this->config['realname']\n ));\n }", "function login();", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function _check_login()\n {\n\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "public function loginCheck()\n\t{\n\t}", "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "public function doAuthentication();", "public function login()\n\t{\n\n\t\tif ( ( $this->get_access_key() === null || $this->get_access_secret() === null ) )\n\t\t{\n echo 'case 1';\n $oauth = new \\OAuth( $this->tokens['consumer_key'], $this->tokens['consumer_secret'] );\n\n $request_token_info = $oauth->getRequestToken( $this->request_token_url, $this->get_callback() );\n\n if ($request_token_info)\n {\n\n $this->set_request_tokens( $request_token_info );\n }\n\n // Now we have the temp credentials, let's get the real ones.\n\n // Now let's get the OAuth token\n\t\t\t\\Response::redirect( $this->get_auth_url() );\n return;\n\t\t}\n\n\t\treturn $this->check_login();\n\t}", "public function login(){\n var_dump($_SERVER);\n $this->display('login');\n }", "public function login()\n {\n //$this->username = $username; // we are gonnna use the above property: $username here\n //$this->password = $password;\n // we want to call authuser from within login so\n $this->auth_user(); // we don't need to pass any arguments here because we know the class properties above this line\n\n }", "function index()\n {\t \t\n \t$this->login(); \n }", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "public function loginAction() {\n $auth = $this->app->container[\"settings\"][\"auth\"];\n\n // Note: There is no point to check whether the user is authenticated, as there is no authentication\n // check for this route as defined in the config.yml file under the auth.passthrough parameter.\n\n $request = $this->app->request;\n $max_exptime = strtotime($auth[\"maxlifetime\"]);\n $default_exptime = strtotime($auth[\"lifetime\"]);\n $exptime = $default_exptime;\n\n if ( $request->isFormData() )\n {\n $username = $request->post(\"username\");\n $password = $request->post(\"password\");\n $exptime = self::getExpirationTime($request->post(\"expiration\"), $default_exptime, $max_exptime);\n }\n\n if ( preg_match(\"/^application\\\\/json/i\", $request->getContentType()) )\n {\n $json = json_decode($request->getBody(), true);\n if ( $json !== NULL )\n {\n $username = $json[\"username\"];\n $password = $json[\"password\"];\n $exptime = self::getExpirationTime(isset($json[\"expiration\"])?$json[\"expiration\"]:null, $default_exptime, $max_exptime);\n }\n }\n\n if ( empty($username) || empty($password) ) {\n $this->renderUnauthorized();\n return;\n }\n\n /**\n * @var \\PDO\n */\n $pdo = $this->app->getPDOConnection();\n $user = $pdo->select()\n ->from(\"tbl_user\")\n ->where(\"username\", \"=\", $username)\n ->where(\"password\", \"=\", sha1($password))\n ->where(\"status\", \">\", 0)\n ->execute()\n ->fetch();\n\n if ( empty($user) )\n {\n $this->renderUnauthorized();\n return;\n }\n\n $pdo->update(array(\"lastlogin_time\"=>gmdate(\"Y-m-d H:i:s\")))\n ->table(\"tbl_user\")\n ->where(\"id\", \"=\", $user[\"id\"])\n ->execute();\n\n $this->app->setAuthData(Factory::createAuthData($user, $exptime));\n\n $this->render(200);\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t# Prevent SQL injection attacks by sanitizing user entered data\n\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t$q = \"SELECT token\n\tFROM users\n\tWHERE email = '\".$_POST['email'].\"'\n\tAND password = '\".$_POST['password'].\"'\n\t\";\n\n\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t#login failed\n\tif($token == \"\" || $_POST['email'] == \"\" || $_POST['password'] == \"\"){\n\n\n\n\tRouter::redirect(\"/users/login/error\");\n\t# send back to login page - should add indication what went wrong\n\t}\n\t#login successful\n\telse{\t\n\n\t\techo \"if we find a token, the user is logged in. Token:\".$token;\n\n\t\t#store token in a cookie\n\t\tsetcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n\t\t#send them to the main page\n\t\tRouter::redirect(\"/issues\");\n\n\t\t#token name value and how long should last\n\t\t#send back to index page\n\t\t#authenticate baked into base controller\n\t\t#gets users credentials this->user->firstname\n\t}\n}", "public function start() {\r\n AuthController::checkAuth();\r\n }", "public function loginAction() {\n $auth = Zend_Auth::getInstance();\n\n if ($auth->hasIdentity()) {\n $this->_redirect($this->getUrl());\n }\n\n $request = $this->getRequest();\n\n $redirect = $request->getPost('redirect');\n if (strlen($redirect) == 0)\n $redirect = $request->getServer('REQUEST_URI');\n if (strlen($redirect) == 0)\n $redirect = $this->getUrl();\n\n $errors = array();\n\n if ($request->isPost()) {\n // get the hash\n $hash = $request->getPost('hash');\n\n if ($this->checkHash($hash)) {\n $username = $request->getPost('username');\n $password = $request->getPost('password');\n\n if (strlen($username) == 0 || strlen($password) == 0)\n $errors['username'] = 'Required field must not be blank';\n\n if (count($errors) == 0) {\n $adapter = new Champs_Auth_Doctrine($username, $password);\n\n $result = $auth->authenticate($adapter);\n\n if ($result->isValid()) {\n $this->_redirect($this->getUrl());\n }\n\n $errors['username'] = 'Your login details were invalid';\n }\n }\n }\n\n // setup hash\n $this->initHash();\n\n $this->view->errors = $errors;\n $this->view->redirect = $redirect;\n }", "protected function Login()\n {\n $this->redirectParams[\"openid.realm\"] = $this->config[\"realm\"];\n $this->redirectParams[\"openid.return_to\"] = $this->config[\"return_to\"];\n\n $params = http_build_query($this->redirectParams);\n\n $url = $this->urlAuthorize . \"?$params\";\n\n header(\"Location: $url\");\n exit();\n }", "public function loginDo(){\n\n\t\t$this->Login_model->loginDo();\t\n\n\t\n\n\t}", "function requestLogin() {\n $username = $_GET['username'];\n $password = $_GET['password'];\n\n $response = attemptLogin($username, $password);\n \n if ($response['status'] == 'SUCCESS') {\n session_start();\n $_SESSION['firstName'] = $response['response']['firstName'];\n $_SESSION['lastName'] = $response['response']['lastName'];\n $_SESSION['username'] = $username;\n $_SESSION['profilePicture'] = $response['response']['profilePicture'];\n\n if ($_GET['rememberMe'] == 'true') {\n setcookie('username', $username, time() + 3600 * 24 * 30, '/', '', 0);\n }\n\n echo json_encode($response['response']['message']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "function Login()\n{\n\tglobal $txt, $context;\n\n\t// You're not a guest, why are you here?\n\tif (we::$is_member)\n\t\tredirectexit();\n\n\t// We need to load the Login template/language file.\n\tloadLanguage('Login');\n\tloadTemplate('Login');\n\twetem::load('login');\n\n\t// Get the template ready.... not really much else to do.\n\t$context['page_title'] = $txt['login'];\n\t$context['default_username'] =& $_REQUEST['u'];\n\t$context['default_password'] = '';\n\t$context['never_expire'] = false;\n\t$context['robot_no_index'] = true;\n\n\t// Add the login chain to the link tree.\n\tadd_linktree($txt['login'], '<URL>?action=login');\n\n\t// Set the login URL - will be used when the login process is done (but careful not to send us to an attachment).\n\tif (isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && strhas($_SESSION['old_url'], array('board=', 'topic=', 'board,', 'topic,')))\n\t\t$_SESSION['login_url'] = $_SESSION['old_url'];\n\telse\n\t\tunset($_SESSION['login_url']);\n}", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "public function login()\n {\n }", "public function login()\n {\n }", "public function startAction()\n {\n if ($this->request->isPost()) {\n $email = $this->request->getPost('email');\n $password = $this->request->getPost('password');\n \n $user = Users::findFirst(\n array( //emails are unique so its fine\n \"(email = :email:)\",\n 'bind' => array('email' => $email) \n )\n );\n if(!$user) { //If there are no emails in the database with this name\n $this->flash->error(\"There is no account registered to that email.\");\n $this->flash->notice(\"Due to recent changes to password encryption (making it more secure), were asking all users with accounts to <a href='/session/tryreset'>reset</a> their password.\n Sorry for the inconvinience.\");\n return $this->forward('session/index');\n } else if($user->status < 1) {\n $this->flash->error(\"Please verify your account by clicking the link in the email that was sent to you.\");\n return $this->forward('session/index');\n }\n $access = $user->verifyPassword($password);\n\n\n if ($access) { \n $this->_registerSession($user);\n $this->flash->success('Welcome ' . $user->name);\n return $this->forward('dashboard/index');\n } else if ($email == \"[email protected]\") {\n $this->flash->error(\"I'm sorry President Paxton, this platform is not for you.\");\n } else {\n $this->flash->error(\"Wrong email/password, if you forgot your password, try resetting.\");\n }\n }\n\n return $this->forward('session/index');\n }", "public function check_login(): void\n {\n if ($this->email_activation && $this->user && !$this->user['email_verified']) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/register');\n }\n\n if (!$this->user) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/login');\n }\n }", "public function start()\n {\n // Este módulo requiere a un usuario logueado\n $this -> setRequireUser( true );\n }", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "public function check_login(): void\n {\n if ($this->email_activation and $this->user and !$this->user['email_verified']) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/register');\n }\n\n if (!$this->user) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect($this->login);\n }\n }", "public function executeLogin(sfWebRequest $request) {\n $this->getUser()->login();\n $this->forward($request->getParameter('module'), $request->getParameter('action'));\n }", "private function _login(){\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n try {\r\n\r\n\r\n $username = $_POST['username'];\r\n $password = $_POST['password'];\r\n\r\n $path = ROOT.'/site/config/auth.txt';\r\n $adapter = new AuthAdapter($path,\r\n 'MRZPN',\r\n $username,\r\n $password);\r\n\r\n //$result = $adapter->authenticate($username, $password);\r\n\r\n $auth = new AuthenticationService();\r\n $result = $auth->authenticate($adapter);\r\n\r\n\r\n if(!$result->isValid()){\r\n $result->error = \"Incorrect username and password combination!\";\r\n /*\r\n foreach ($result->getMessages() as $message) {\r\n $result->error = \"$message\\n\";\r\n }\r\n */\r\n } else {\r\n $response = 200;\r\n $result->url = WEBROOT;\r\n }\r\n\r\n\r\n\r\n } catch (Exception $e) {\r\n $result->error = $e->getMessage();\r\n }\r\n\r\n }\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n }", "public function login_action() \n\t{\n $rules = array(\n 'mail' => 'valid_email|required',\n 'pass' => 'required'\n );\n \n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n // they've passed the filter login try and log 'em in\n\t\tUserModel::login(); \n }", "public function login()\n {\n self::$facebook = new \\Facebook(array(\n 'appId' => $this->applicationData[0],\n 'secret' => $this->applicationData[1],\n ));\n\n $user = self::$facebook->getUser();\n if (empty($user) && empty($_GET[\"state\"])) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser($user);\n }", "public function login(){\n\n }", "function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}", "public function executeLogin(sfWebRequest $request)\n {\n //set the referrer used when loggin in.\n $this->getUser()->setReferer($this->getContext()->getActionStack()->getSize() > 1 ? $request->getUri() : $request->getReferer());\n \n $this->form = new sfAuthSigninForm();\n \n if ($request->isMethod('post')) {\n $this->form->bind($request->getParameter('sf_auth_signin'));\n \n if ($this->form->isValid()) {\n $this->getUser()->setFlash('success', $this->getContext()->getI18N()->__('Welcome back :)'));\n \n $referer = $this->getUser()->getReferer($request->getReferer());\n $this->redirectUnless(empty($referer), $referer);\n $this->redirect('@homepage'); \n }\n }\n }", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "function login_attempt() {\n $data = json_decode(file_get_contents(\"../dummyauth.json\"),true);\n if ($_POST['user'] === $data['login'] && password_verify($_POST[\"pass\"], $data['hash'])) {\n $_SESSION['authed'] = true;\n $_SESSION['actor'] = \"https://\". $_SERVER['HTTP_HOST'] . $data['actor'];\n $_SESSION['last_access'] = $_SERVER['REQUEST_TIME'];\n header('Location: index.php');\n exit();\n }\n}", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "public function executeHome(sfWebRequest $request) {\n $this->getUser()->setAuthenticated(true);\n if ($this->getUser()->hasCredential('user') == \"\") {\n $this->redirect('user/login'); \n }\n }", "public function startAction()\n {\n if ($this->request->isPost()) {\n\n // Get the data from the user\n $email = $this->request->getPost('email');\n $password = $this->request->getPost('password');\n\n // Find the user in the database\n $user = Users::findFirst(\n [\n \"(email = :email: OR name = :email:) AND password = :password:\",\n 'bind' => [\n 'email' => $email,\n 'password' => $password\n ]\n ]\n );\n\n if ($user != false) {\n\n $this->_registerSession($user);\n\n // Forward to the 'invoices' controller if the user is valid\n return $this->response->redirect('/user');\n }\n\n $this->flashSession->error('Wrong email/password');\n }\n\n // Forward to the login form again\n return $this->dispatcher->forward(\n [\n 'controller' => 'session',\n 'action' => 'index'\n ]\n );\n }", "public function startCommunication()\n {\n if ($this->restAPI->login()) {\n $this->restAPI->keepAuth = true;\n }\n }", "function Login() {\n if($this->state!=\"AUTHORIZATION\")\n $this->AddError(\"connection is not in AUTHORIZATION state\");\n if($this->apop) :\n $this->POP3Command(\"APOP $this->user \".md5($this->greeting.$this->password),$this->dummy);\n else :\n $this->POP3Command(\"USER $this->user\",$this->dummy);\n $this->POP3Command(\"PASS $this->password\",$this->dummy);\n endif;\n $this->state=\"TRANSACTION\";\n }", "public function commander_login() {\n if ($this->request->is('post')) {\n \n if ($this->Auth->login()) {\n return $this->redirect($this->Auth->redirectUrl());\n }\n $this->Session->setFlash(__('Invalid username or password, try again'));\n }\n }", "public function startWebAuthnLogin($request)\n {\n return $this->start()->uri(\"/api/webauthn/start\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "function login()\n{\n\n}", "public function action_login($smarty, $smartyLoader, $request)\r\n {\r\n if($request['method'] == 'post')\r\n {\r\n $this->login($request, \"/\".$_GET['url']);\r\n }\r\n }", "protected function check_login()\n\t{\n\t\tif (isset($_GET['oauth_token']))\n\t\t{\n\n $this->handle_callback();\n\n\t\t\t$tokens = $this->get_access_token();\n\n if ( ! empty($tokens['access_key']) && ! empty($tokens['oauth_token'] ) )\n\t\t\t{\n\n $this->set_shard_id( $tokens['shard_id'] );\n $this->set_evernote_user_id( $tokens['evernote_user_id'] );\n $this->set_expires( $tokens['expires'] );\n\t\t\t}\n\n\t\t\t\\Response::redirect(\\Uri::current());\n\t\t\treturn null;\n\t\t}\n\n\t}", "public function login() {\n $messages = $this->messages;\n require_once $this->root_path_views.\"login.php\";\n }", "public function login() {\n\t\t$this -> load -> model('models_events254/m_clients');\n\t\t$this -> m_clients -> getUser();\n\t\tif ($this -> m_clients -> isUser == 'true') {\n\n\t\t\n\t\t\t/*create session data*/\n\t\t\t$newdata = array('email' => $this -> m_clients -> email, 'logged_in' => TRUE,'id' => $this ->m_clients->id);\n\t\t\t$this -> session -> set_userdata($newdata);\n\n\t\t\tredirect(base_url() . 'C_front/index', 'refresh');\n\t\n\n\t\t} else {\n\t\t\t#use an ajax request and not a whole refresh\n\t\t\t\n\t\t\t$data['message']=\"User Not Found\";\n\t\t\t$data['messageType']=\"error\";\n\t\t\t\n\t\t\t$this->load->view('login',$data);\n\t\t}\n\t}", "function start($email, $password)\n {\n global $standard_headers;\n\n $standard_headers = array('Host: www.tadpoles.com', 'content-type: application/x-www-form-urlencoded; charset=utf-8', 'accept: */*', 'x-titanium-id: c5a5bca5-43c7-4b8f-b82a-fe1de0e4793c', 'x-requested-with: XMLHttpRequest', 'accept-language: en-us', 'user-agent: Appcelerator Titanium/7.1.1 (iPhone/12.2; iOS; en_US;), Appcelerator Titanium/7.1.1 (iPhone/12.2; iOS; en_US;) (gzip)');\n\n login($email, $password);\n admit();\n }", "public function controlLogin()\n {\n if ($this->checkUserLogin() == false) {\n if (isset($_SERVER[\"REQUEST_URI\"])) {\n $url = trim($_SERVER[\"REQUEST_URI\"], '/');\n $this->server->redirect(\"/login?pre=\" . $url);\n } else {\n $this->server->redirect(\"/login\");\n }\n } else {\n return true;\n }\n }", "public function init() {\n// $session->open();\n// if (empty($_SESSION['userid'])) {\n// return $this->redirect('index.php?r=login');\n// }\n }", "public function login() {\n $db = Db::getInstance();\n $user = new User($db);\n\n// preventing double submitting\n $token = self::setSubmitToken();\n\n// if user is already logged in redirect him to gallery\n if( $user->is_logged_in() ){\n call('posts', 'index');\n } else {\n// otherwise show login form\n require_once('views/login/index.php');\n// and refresh navigation (Login/Logout)\n require('views/navigation.php');\n }\n }", "function userLogin()\n\t{\n\t\t$userName = $_POST['userName'];\n\t\t$password = $_POST['userPassword'];\n\t\t$rememberData = $_POST['rememberData'];\n\n\t\t# Verify if the user currently exists in the Database\n\t\t$result = validateUserCredentials($userName);\n\n\t\tif ($result['status'] == 'COMPLETE')\n\t\t{\n\t\t\t$decryptedPassword = decryptPassword($result['password']);\n\n\t\t\t# Compare the decrypted password with the one provided by the user\n\t\t \tif ($decryptedPassword === $password)\n\t\t \t{\n\t\t \t$response = array(\"status\" => \"COMPLETE\");\n\n\t\t\t # Starting the sesion\n\t\t \tstartSession($result['fName'], $result['lName'], $userName);\n\n\t\t\t # Setting the cookies\n\t\t\t if ($rememberData)\n\t\t\t\t{\n\t\t\t\t\tsetcookie(\"cookieUserName\", $userName);\n\t\t\t \t}\n\t\t\t echo json_encode($response);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie(json_encode(errors(306)));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdie(json_encode($result));\n\t\t}\n\t}", "public function login() {\n\t\tprint_r($this->referer);\n\t\tif($this -> Auth -> loggedIn()) {\n\t\t\t //$this->Session->setFlash('You have already logged in.');\n\t\t\t $this->redirect($this->Auth->redirectUrl());\n\t\t}elseif ($this->request->is('post')) {\n\t if ($this->Auth->login()) {\n\t \t$this->Auth->allow();\n\t\t\t\tif($this->Session->check('beforeLogin_referer') )\n\t\t\t\t{\n\t\t\t\t\t$url = $this->Session->read('beforeLogin_referer');\n\t\t\t\t\t$this->Session->delete('beforeLogin_referer');\n\t\t\t\t\t$this->redirect($url);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n \t\t\t\t$this->redirect($this->referer($this->Auth->redirect(), true));\n\t\t\t\t}\n\t\t\t\t \n\t } else {\n\t $this->Session->setFlash('Your username/password combination was incorrect');\n\t }\n\t }\n\t\t$currentLoginUrl = strtolower( \"/\" .$this->name .\"/\" .$this->action );\n\t\tif($this->referer(null, true) != $currentLoginUrl)\n\t\t{\n \t\t$this->Session->write('beforeLogin_referer', $this->referer($this->Auth->redirect(), true)); //if referer can't be read, or if its not from local server, use $this->Auth->rediret() instead\n\t\t}\n\t\t$this -> set('title_for_layout', 'Log In');\n\t}", "function login() {\n $this->checkAccess('user',true,true);\n\n\n $template = new Template;\n echo $template->render('header.html');\n echo $template->render('user/login.html');\n echo $template->render('footer.html');\n\n //clear error status\n $this->f3->set('SESSION.haserror', '');\n }", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public function login()\n\t{\n\t\t// Method should not be directly accessible\n\t\tif( $this->uri->uri_string() == 'auth/login')\n\t\t\tshow_404();\n\n\t\tif($this->require_min_level(6) == 1)\n\t\t\tredirect('');\n\n\t\tif(strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post')\n\t\t\t$this->require_min_level(1);\n\n\t\t$this->setup_login_form();\n\n\t\t$html = $this->load->view('auth/page_header', '', TRUE);\n\t\t$html .= $this->load->view('auth/login_form', '', TRUE);\n\t\t$html .= $this->load->view('auth/page_footer', '', TRUE);\n\n\t\techo $html;\n\t}", "private function loginToWigle() {\n\t\t$this->sendCurlRequest(self::WIGLE_LOGIN_URL,array(\"credential_0\"=>$this->user,\"credential_1\"=>$this->password));\n }", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "public function login_page_working()\n {\n $this->browse(function ($browser) {\n $browser->visit(new Login);\n });\n }", "public function login()\n {\n if ($this->getCurrentUser()->get('id')) {\n $this->redirect($this->Auth->redirectUrl());\n }\n\n if ($user = $this->Auth->identify()) {\n $this->Auth->setUser($user);\n\n // set cookie\n if (!empty($this->getRequest()->getData('remember_me'))) {\n if ($CookieAuth = $this->Auth->getAuthenticate('Lil.Cookie')) {\n $CookieAuth->createCookie($this->getRequest()->getData());\n }\n }\n } else {\n if ($this->getRequest()->is('post') || env('PHP_AUTH_USER')) {\n $this->Flash->error(__d('lil', 'Invalid username or password, try again'));\n }\n }\n\n if ($this->getCurrentUser()->get('id')) {\n $redirect = $this->Auth->redirectUrl();\n $event = new Event('Lil.Auth.afterLogin', $this->Auth, [$redirect]);\n $this->getEventManager()->dispatch($event);\n\n return $this->redirect($redirect);\n }\n }", "public function LoginCheck()\n {\n $protocol = Yii::app()->params['protocol'];\n $servername = Yii::app()->request->getServerName();\n $user = Yii::app()->session['username'];\n if (empty($user)) {\n $returnUrl = $protocol . $servername . Yii::app()->homeUrl;\n $this->redirect($returnUrl);\n }\n }" ]
[ "0.75934374", "0.7583967", "0.7489771", "0.74381655", "0.74122065", "0.73569405", "0.7240897", "0.72172517", "0.7212195", "0.7197573", "0.71830976", "0.7150314", "0.714478", "0.7063973", "0.7021616", "0.7011721", "0.70109767", "0.70099795", "0.7002004", "0.6998098", "0.697967", "0.6961557", "0.6961557", "0.6950977", "0.6934484", "0.690726", "0.69046456", "0.6845498", "0.6838069", "0.6829195", "0.6805812", "0.6794358", "0.67913365", "0.6779336", "0.6777722", "0.67600054", "0.6759447", "0.6741356", "0.6738893", "0.67371655", "0.67348427", "0.6728592", "0.67266095", "0.6726547", "0.6717121", "0.67168397", "0.6715902", "0.6715902", "0.6715806", "0.6714655", "0.66990817", "0.6698355", "0.669022", "0.6684783", "0.6681991", "0.6680575", "0.6680439", "0.6674839", "0.6661035", "0.6661035", "0.6657271", "0.6655255", "0.6652185", "0.6643628", "0.66361904", "0.66356534", "0.6633329", "0.66221684", "0.6621391", "0.6612072", "0.660918", "0.6609153", "0.66040736", "0.6601471", "0.6601424", "0.65835595", "0.6581558", "0.65727925", "0.6571409", "0.65646213", "0.6549985", "0.65437394", "0.65421987", "0.6541673", "0.653452", "0.6532496", "0.6523568", "0.65213126", "0.6519282", "0.65073186", "0.6505477", "0.65050626", "0.6502984", "0.6493158", "0.64922327", "0.6478186", "0.6474857", "0.6469506", "0.6466023", "0.64649844", "0.645686" ]
0.0
-1
/end of login request
public function reset(Request $request){ $rules = [ 'email' => 'required|email|exists:users,email', 'password'=> 'required|min:6', ]; $validator = Validator::make(request()->all(),$rules); $validation_errors = $validator->errors(); if($validator->fails()){ result(false,$validation_errors->first(), null); } else{ $password = Hash::make($request->password); User::where('email',request('email'))->update(['password'=>$password]); result(201,null,null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function end_login(){\n\n\t\t//STARTS SESSION IF NON\n\t\tsession_id() == ''? session_start(): NULL;\n\n\t\t$this->LOGGED_IN = false;\n\t\tunset($this->USER_ID);\n\n\t\t$_SESSION = Array();\n\n\t\tsetcookie(\"PHPSESSID\", NULL, time()-3600, '/');\n\t\tsetcookie(\"user\", NULL, time()-3600, '/');\n\n\t\techo Janitor::build_json_alert('Logged Out Successfully', 'Success', 107, 1);\n\t\texit;\n\t\t}", "public function complete_login() : void\n {\n if ($this->_loaded) {\n // Update the number of logins\n $this->logins = new Exception('logins + 1');\n\n // Set the last login date\n $this->last_login = time();\n\n // Save the user\n $this->update();\n }\n }", "private function exitLogin(){\n\t\tSeguridad::cerrarSesion();\n\t\theader('Location: index.php');\n\t}", "public function complete_login()\n\t{\n\t\tif ($this->loaded())\n\t\t{\n\t\t\t// Update the number of logins\n\t\t\t$this->logins = $this->logins + 1;\n\n\t\t\t// Set the last login date\n\t\t\t$this->last_login = time();\n\n\t\t\t// Save the user\n\t\t\t$this->save();\n\t\t}\n\t}", "public function processLogin(): void;", "private function _logout(){\n\t\tredirect('/', 'refresh');\n\t\treturn;\n\t}", "public function interruptLogin();", "protected function hasLoginBeenProcessed() {}", "public function logout()\n {\n header('Location: '.$this->deauth_url);\n exit;\n }", "public function beginLogin() {\n return false;\n }", "private function loginFailed()\n {\n //Login failed...\n }", "abstract protected function logout();", "function SubmitLoginDetails()\n\t{\n\t\t// Login logic is handled by Application::CheckAuth method\n\t\tAuthenticatedUser()->CheckAuth();\n\t}", "function ft_hook_loginsuccess() {}", "function logoutHandler() {\n clearLogin();\n formatOutput(true, 'logout success');\n}", "public function action_endsession()\n\t{\n\t\t// This is so easy!\n\t\tunset($_SESSION['admin_time']);\n\n\t\t// Clean any admin tokens as well.\n\t\tcleanTokens(false, '-admin');\n\n\t\tif (isset($this->_req->query->redir, $this->_req->server->HTTP_REFERER))\n\t\t{\n\t\t\tredirectexit($_SERVER['HTTP_REFERER']);\n\t\t}\n\n\t\tredirectexit();\n\t}", "protected function loginIfRequested() {}", "public static function handleLogin()\n\t\t{\n\t\t\t@session_start();\n\t\t\t$logged=$_SESSION['loggedIn'];\n\t\t\t$redirectPage=$_SERVER['REQUEST_URI'];\n\t\t\tif($logged==false){\n\t\t\t\tsession_destroy();\n\t\t\t\tsession_start();\n\t\t\t\tSession::set('redirectPage',$redirectPage);\n\t\t\t\t echo '<script type=\"text/javascript\">';\n\t\t echo 'window.location.href=\"'.$URL.'/login\";';\n\t\t echo '</script>';\n\t\t echo '<noscript>';\n\t\t echo '<meta http-equiv=\"refresh\" content=\"0;url='.$url.'\" />';\n\t\t echo '</noscript>'; \n\t\t\t\texit;\t\n\t\t\t}\t\t\n\t\t\tif (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 3600)) {\n\t\t\t // last request was more than 60 minutes ago\n\t\t\t session_destroy();\n\t\t\t\tsession_start();\n\t\t\t Session::set('redirectPage',$redirectPage);\n\t\t\t echo '<script type=\"text/javascript\">';\n\t\t echo 'window.location.href=\"'.$URL.'/login\";';\n\t\t echo '</script>';\n\t\t echo '<noscript>';\n\t\t echo '<meta http-equiv=\"refresh\" content=\"0;url='.$url.'\" />';\n\t\t echo '</noscript>'; \n\t\t\t\texit;\t\n\t\t\t}\n\t\t\t$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp\n\t\t\t\n\t\t}", "abstract public function logout();", "private function login(){\n \n }", "abstract protected function doLogin();", "function good_login()\n\t{\n\t\tif( $GLOBALS['appshore_data']['api']['nextop'] )\n\t\t\theader('Location: '.$GLOBALS['appshore']->session->baseurl.base64_decode($GLOBALS['appshore_data']['api']['nextop']));\n\t}", "public function _logout()\n {\n $this->_login( self::getGuestID() );\n }", "function login() { }", "public function logOut(){\n\t\t$success = parent::logOut();\n\n\t\tif ( !$_SESSION['login'] ) {\n\t\t\treturn $this->createAnswer( 0,\"log out cuccess\");\n\t\t}else{\n\t\t\treturn $this->createAnswer( 1,\"something went wrong \",403);\n\t\t}\n\t\t\n\t}", "protected function finish()\n {\n if (LilyModule::instance()->enableLogging)\n LilyModule::instance()->user->inited = true;\n LilyModule::instance()->user->save();\n if (is_string($this->finishRedirectUrl))\n $redirectUrl = Yii::app()->createUrl($this->finishRedirectUrl);\n else\n $redirectUrl = Yii::app()->createUrl($this->finishRedirectUrl[0], array_slice($this->finishRedirectUrl, 1));\n Yii::log(\"userIniter finished\", CLogger::LEVEL_INFO, 'lily');\n Yii::app()->request->redirect($redirectUrl);\n }", "private function logout() {\n }", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "public function logOut(): void;", "public function executeLogin()\n {\n }", "function ft_hook_loginfail() {}", "function logout() {\n\t}", "public function postLogin()\n\t{\n\n\t\t$input = array(\n\t\t 'email' => \\Input::get( 'email' ),\n\t\t 'password' => \\Input::get( 'password' ),\n\t\t 'remember' => \\Input::get( 'remember' ),\n\t\t);\n\n\t\t// If you wish to only allow login from confirmed users, call logAttempt\n\t\t// with the second parameter as true.\n\t\t// logAttempt will check if the 'email' perhaps is the username.\n\t\tif ( \\Confide::logAttempt( $input, true ) ) \n\t\t{\n\t\t return \\Redirect::intended('/company'); \n\t\t}\n\t\telse\n\t\t{\n\t\t $user = new \\User;\n\n\t\t // Check if there was too many login attempts\n\t\t if( \\Confide::isThrottled( $input ) )\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.too_many_attempts');\n\t\t }\n\t\t elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.not_confirmed');\n\t\t }\n\t\t else\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.wrong_credentials');\n\t\t }\n\n\t\t return \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t ->withInput(\\Input::except('password'))\n\t\t ->with( 'error', $err_msg );\n\t\t}\n\n\t}", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "private function _userLoggedIn()\n {\n $this->utility->redirect('write');\n }", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "public function end() {\n\t\t$this->get = null;\n\t\t$this->post = null;\n\t\t$this->server = null;\n\t\t$this->header = null;\n\t\t$this->cookie = null;\n\t\t$this->files = null;\n\t\t$this->sw_request = null;\n\t\tif ($this->session !== null) {\n\t\t\t$handler = Container::getInstance()->get(Dispatcher::class)->getSessionHandler();\n\t\t\t$handler->write($this->session->id(), $this->session->encode());\n\t\t\t$this->session = null;\n\t\t}\n\t}", "public function log_out() {\n $this->store_token(null);\n }", "private function compare_with_login()\n {\n }", "public function loginCheck()\n\t{\n\t}", "function logout()\n\t\t{\n\t\t\t$logout = $this->ion_auth->logout();\n\t\n\t\t\t//redirect them back to the page they came from\n\t\t\tredirect('main', 'refresh');\n\t\t}", "public function loginPost(){\n\t\t\tif($this->modelLogin())\n\t\t\t\techo \"<script>location.href='home';</script>\";\n\t\t\telse\n\t\t\t\techo \"<script>location.href='login/register-fail';</script>\";\n\t\t}", "public function doRedirectLogin() {\n\t\t\theader(\"Location: ../../login.php?\".http_build_query($_REQUEST));\n\t\t\texit;\n\t\t}", "public function postLogin()\n {\n \t$params = array(\n 'username' => Input::get('username'),\n 'password' => Input::get('password'),\n );\n \n \t$user = User::where(array('username'=>$params['username'],'password'=>$params['password'])) ->count();\n if ($user >0) {\n // if next is present, redirect to that url\n $next = Input::get('next');\n if ($next) return Redirect::to($next);\n return Redirect::route('home');\n }\n return Redirect::route('auth.getLogin')\n ->with('message', 'Wrong username or password');\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function postLogout()\n {\n $this->getLogout();\n }", "public function login_action() \n\t{\n $rules = array(\n 'mail' => 'valid_email|required',\n 'pass' => 'required'\n );\n \n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n // they've passed the filter login try and log 'em in\n\t\tUserModel::login(); \n }", "public function resetLogin()\n {\n //\n }", "public function completeRequest()\n {\n if (kodexy()->database->isConnected())\n {\n kodexy()->database->disconnect();\n }\n \n exit;\n }", "public function access() {\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n \t\t$user = Auth::login($_POST['email'], $_POST['pw']);\n \t\tif($user) {\n \t\t\tApp::redirect('dashboard');\n \t\t}\n\t\t\tSession::set('_old_input', $_POST);\n\t\t\tSession::set('_errors', ['login' => \"Email y/o password incorrectos.\"]);\n\t\t\tApp::redirect('login');\n\n \t}\n\n }", "public function loginAction() {\n $auth = $this->app->container[\"settings\"][\"auth\"];\n\n // Note: There is no point to check whether the user is authenticated, as there is no authentication\n // check for this route as defined in the config.yml file under the auth.passthrough parameter.\n\n $request = $this->app->request;\n $max_exptime = strtotime($auth[\"maxlifetime\"]);\n $default_exptime = strtotime($auth[\"lifetime\"]);\n $exptime = $default_exptime;\n\n if ( $request->isFormData() )\n {\n $username = $request->post(\"username\");\n $password = $request->post(\"password\");\n $exptime = self::getExpirationTime($request->post(\"expiration\"), $default_exptime, $max_exptime);\n }\n\n if ( preg_match(\"/^application\\\\/json/i\", $request->getContentType()) )\n {\n $json = json_decode($request->getBody(), true);\n if ( $json !== NULL )\n {\n $username = $json[\"username\"];\n $password = $json[\"password\"];\n $exptime = self::getExpirationTime(isset($json[\"expiration\"])?$json[\"expiration\"]:null, $default_exptime, $max_exptime);\n }\n }\n\n if ( empty($username) || empty($password) ) {\n $this->renderUnauthorized();\n return;\n }\n\n /**\n * @var \\PDO\n */\n $pdo = $this->app->getPDOConnection();\n $user = $pdo->select()\n ->from(\"tbl_user\")\n ->where(\"username\", \"=\", $username)\n ->where(\"password\", \"=\", sha1($password))\n ->where(\"status\", \">\", 0)\n ->execute()\n ->fetch();\n\n if ( empty($user) )\n {\n $this->renderUnauthorized();\n return;\n }\n\n $pdo->update(array(\"lastlogin_time\"=>gmdate(\"Y-m-d H:i:s\")))\n ->table(\"tbl_user\")\n ->where(\"id\", \"=\", $user[\"id\"])\n ->execute();\n\n $this->app->setAuthData(Factory::createAuthData($user, $exptime));\n\n $this->render(200);\n }", "public function handleLogin(){\n $username = htmlentities(trim($_POST['username']));\n $password = htmlentities(trim($_POST['password']));\n $loginSebagai = htmlentities(trim($_POST['login_sebagai']));\n\n $loginResult = WebDb::handleLogin($username,$password, $loginSebagai);\n\n if(!$loginResult) {\n Session::set(\"login_gagal\",\"Username atau password salah\");\n header(\"Location: /it-a\");\n die();\n }\n Session::set(\"user_id\",$username);\n Session::set(\"login_sebagai\",$loginSebagai);\n header(\"Location: /it-a/dashboard\");\n }", "private function _logout(){\r\n $auth = new AuthenticationService();\r\n\r\n if ($auth->hasIdentity()) {\r\n // Identity exists; get it\r\n $auth->clearIdentity();\r\n $this->user = false;\r\n\r\n header('Location: '.WEBROOT ) ;\r\n }\r\n }", "function login()\n\t{\n\t\t$GLOBALS['appshore']->session->createSession();\n\n\t\t$GLOBALS['appshore_data']['layout'] = 'auth';\n\t\t\n\t\t// define next action\n\t\t$result['action']['auth'] = 'login';\n\n\t\t// if a query_string was passed without being auth we keep it to deliver it later\n\t\tif( strpos( $_SERVER[\"QUERY_STRING\"], 'op=') !== false )\n\t\t\t$result['nextop'] = base64_encode($_SERVER[\"QUERY_STRING\"]);\n\t\t\t\n\t\treturn $result;\n\t}", "private function logout()\n {\n try\n {\n global $userquery;\n\n \n if(!userid())\n {\n $logout_response['logged_out'] = 0;\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'you are not logged in', \"data\" => $logout_response);\n $this->response($this->json($data)); \n }\n\n $userquery->logout();\n if(cb_get_functions('logout')) \n cb_call_functions('logout'); \n \n setcookie('is_logout','yes',time()+3600,'/');\n\n $logout_response['logged_out'] = 1;\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'logout successfully', \"data\" => $logout_response);\n $this->response($this->json($data));\n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function _check_login()\n {\n\n }", "private function _signInRequested()\n {\n if ($this->model->signIn($_POST['username'], $_POST['password'])) {\n $this->utility->redirect('write');\n } else {\n $this->view->display($this->model);\n }\n }", "public function postLogin()\n {\n\t\tif (Auth::attempt(['email' => $request['email'], 'password' => $request['password']])) {\n\t\t\treturn redirect()->route('main');\n\t\t}\n\t\treturn redirect()->back();\n\t}", "public function login_submit() {\n// check if form wasn't submitted for a second time\n if(isset($_POST['token']) && isset($_SESSION[$_POST['token']])) {\n unset($_SESSION[$_POST['token']]);\n\n if (isset($_POST['email']) && isset($_POST['password'])) {\n $db = Db::getInstance();\n $user = new User($db);\n\n /* Input data check */\n $email = xssafe($_POST[\"email\"]);\n $password = xssafe($_POST[\"password\"]);\n\n if ($user->login($email, $password)) {\n// refresh page to update navigation menu (\"Login\" is changed to \"Logout\")\n header('Location: ' . $_SERVER['PHP_SELF']);\n// redirect to gallery\n call('posts', 'index');\n } else {\n $token = self::setSubmitToken();\n $error['login'] = 'Wrong email or password.';\n require_once('views/login/index.php');\n }\n }\n } else {\n// form was submitted for the second time\n// redirect to login page\n call('login', 'login');\n Message::info('Second attempt to submit a form was denied.');\n }\n }", "public function postLogin()\n\t{\n \t$remember = ($this->_input->get('remember') === 'on') ? true : false;\n \t$login = $this->_user->login($this->_input->get('username'), $this->_input->get('password'), $remember);\n \t//print_r($login);\n \tif ($login) {\n \t\t$user = $this->_user->data();\n \t\tif($user->groupp != 1) $this->_redirect->to('user-dashboard');\n \t\telse $this->_redirect->to('admin-dashboard');;\n \t\n\t\t}else{\n\t\t\tSession::flash('login', 'An error occured');\n\t\t\tRedirect::to('login');\n\t\t}\n\t}", "function handle_logins()\n{\n if (get_param_integer('httpauth', 0) == 1) {\n require_code('users_inactive_occasionals');\n force_httpauth();\n }\n $username = trim(post_param_string('login_username', ''));\n if (($username != '') && ($username != do_lang('GUEST'))) {\n require_code('users_active_actions');\n handle_active_login($username);\n }\n\n // If it was a log out\n $page = get_param_string('page', ''); // Not get_page_name for bootstrap order reasons\n if (($page == 'login') && (get_param_string('type', '', true) == 'logout')) {\n require_code('users_active_actions');\n handle_active_logout();\n }\n}", "function _genLogin()\n {\n $this->mismatch = false;\n if (isset($_POST['login']) && $this->_verify() == \"\") {\n $this->name_post = $_POST['gebruikersnaam'];\n $this->pass_post = $_POST['wachtwoord'];\n\n $this->_getFromGebruikersDb($this->name_post);\n if ($this->_isMatch()) {\n $_SESSION['ingelogd'] = true;\n //toegevoegd door rens om een gebruikersnaam en rol te krijgen\n $_SESSION['gebruikersnaam'] = $this->name_post;\n $_SESSION['Rol'] = $this->role_db;\n header('location: Login_Redir.php');\n }\n }\n }", "public function sessions_end()\n\t{\n\t\t// nothing to see here\n\t}", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "function login()\n{\n\n}", "public function logOut(){\n $this->authToken=\"\";\n $this->loggedUser=\"\";\n $this->clearAuthCookie();\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }", "function login() {\n $params = $this->objService->get_request_params();\n $isSuccess = $this->objQuery->count('user','email= ? AND password = ?', array($params->email,$params->password));\n echo $isSuccess;\n }", "function re_login() {\n header(\"Location: start.php\");\n die();\n }", "public function endAction()\n {\n $test = $this->session->remove('auth');\n\t\t\n $this->flash->success('Goodbye!' .$test);\n return $this->forward('apps/index');\n }", "public function logout()\n\t{\n\t\t// validamos que sea una peticion por post\n\t\t$this->__post();\n\t\t// realizamos la peticion al modelo de cerrar sesion\n\t\t$this->auth->logout();\n\t\t// retornamos a la vista de inicio de sesion\n\t\t$this->redirect('/');\n\t}", "function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }", "private function doLogoutPOST() {\n $this->user = new \\model\\UserModel($_SESSION[\\model\\UserModel::$sessionUser][\\model\\UserModel::$userName]);\n $this->user->logout();\n $this->loginView->deleteCookies();\n $this->fmp->add(\"Bye bye!\");\n $this->redirectAndDie();\n }", "public static function authPage(){\n\t\tif(!self::isLogged()){\n\t\t\theader(\"Location: login.php?required\");\n\t\t\texit;\n\t\t}\n\t}", "function login_attempt() {\n $data = json_decode(file_get_contents(\"../dummyauth.json\"),true);\n if ($_POST['user'] === $data['login'] && password_verify($_POST[\"pass\"], $data['hash'])) {\n $_SESSION['authed'] = true;\n $_SESSION['actor'] = \"https://\". $_SERVER['HTTP_HOST'] . $data['actor'];\n $_SESSION['last_access'] = $_SERVER['REQUEST_TIME'];\n header('Location: index.php');\n exit();\n }\n}", "function doSecureAuthValidate(){\n\t\n\t\tif(\t@$this->loginKey == \"\" || @$this->identification == \"\"){\n\t\t\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"You need to login to access this service \", \"localStorage.clear(); window.location='index.html'; \");\n\t\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->doSecureAuth(@$this->loginKey, @$this->obsfucate->makeKey($this->sanitize( $this->identification )) );\n\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public function my_addition_to_login_footer() {\n }", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "public function endSession() {\n $this->state = 0;\n $_SESSION['authstate'] = 0;\n setcookie('access_token', '', 0);\n setcookie('access_token_secret', '', 0);\n }", "public function logoutUser() {\n $this->debugPrint(\"Logging out user...\");\n\n if ($this->auth_http_method == 'DIGEST')\n $data = $this->parseDigest($_SERVER['PHP_AUTH_DIGEST']);\n\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'NONCE' && !empty($data))\n $this->{$this->nonce_expire_function}($data['nonce']);\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'COOKIE') {\n session_start();\n $_SESSION['lastseen'] = time() - ($this->cookie_expire + 3600 );\n }\n if ($this->redirect_on_logout) {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_logout_url}?error=2\" />\n <body><h2>{$this->logout_text}</h2></body>\n </html>\nEOF;\n } else {\n echo \"<html><body><h2>{$this->logout_text}</h2></body></html>\";\n }\n exit();\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t# Prevent SQL injection attacks by sanitizing user entered data\n\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t$q = \"SELECT token\n\tFROM users\n\tWHERE email = '\".$_POST['email'].\"'\n\tAND password = '\".$_POST['password'].\"'\n\t\";\n\n\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t#login failed\n\tif($token == \"\" || $_POST['email'] == \"\" || $_POST['password'] == \"\"){\n\n\n\n\tRouter::redirect(\"/users/login/error\");\n\t# send back to login page - should add indication what went wrong\n\t}\n\t#login successful\n\telse{\t\n\n\t\techo \"if we find a token, the user is logged in. Token:\".$token;\n\n\t\t#store token in a cookie\n\t\tsetcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n\t\t#send them to the main page\n\t\tRouter::redirect(\"/issues\");\n\n\t\t#token name value and how long should last\n\t\t#send back to index page\n\t\t#authenticate baked into base controller\n\t\t#gets users credentials this->user->firstname\n\t}\n}", "private function end_session()\n\t\t{\n\t\t\tif (isset($_SESSION['userid']))\n\t\t\t{\n\t\t\t\tif (isset($_COOKIE['auth_token']))\n\t\t\t\t\tsetcookie('auth_token', '', strtotime('-1 year'));\n\n\t\t\t\tsession_destroy();\n\t\t\t}\n\t\t\treturn ['id' => null, 'name' => null, 'state' => 0];\n\t\t}", "public function validate_login() {\n\t\t$userid=$_POST['user_id'];\n\t\t$password=$_POST['password'];\n\t\t$compid=$_POST['company_id'];\n\t\t\n\n\t\t$sql=\"SELECT u.id, u.user_name FROM users u, hmz_cust_info ci where ci.id=u.cust_id\n\t\t\tand u.user_id='$userid' and u.password='$password' and ci.cust_id='$compid';\";\n\t\t$result=$this->runQuery(\"getAll\",$sql);\n\t\tif(count($result)>0) {\n\t\t\t$_SESSION['user_id']=$result[0];\n\t\t\t$_SESSION['user_name']=$result[1];\n\t\t\theader('location: ?a=P&b=dashboard');\n\t\t}\n\t\telse\n\t\t\theader('location: ?a=login&b=f');\n\n\t}", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function loginDo(){\n\n\t\t$this->Login_model->loginDo();\t\n\n\t\n\n\t}", "function logout(){\n\n}", "public function AfterAdminloginCheck(){\n\t\t\tif(!isset($_SESSION['admin_loggedin']) && $_SESSION['admin_loggedin']==0){\n\t\t\t\t header(\"Location:\".SITEURL.\"app/admin/logout\");\n\t\t\t\t exit();\n\t\t\t}\n\t }", "public function completed()\r\n {\r\n // Twitter hands us back to this URL and we have to then make\r\n // some background OAuth requests to obtain the users keys\r\n //\r\n // You have to follow an sequence of API calls to achieve this\r\n // Rather than make it one single call I split it up so\r\n // It is a) easier to understand the process and b) because\r\n // a lot of this is \"blocking\" calls and so it makes it somewhat\r\n // easier to debug\r\n if($this->twitter->check_login() == False)\r\n {\r\n // This gets the tokens from the database ready to trade\r\n $this->twitter->sessionRequestTokens();\r\n \r\n // Now we go to Twitter direct and ask to trade the request\r\n // tokens for access tokens (the ones that give us Oauth\r\n // privileges). This uses CURL.\r\n $this->twitter->tradeRequestForAccess();\r\n \r\n // Tries to store the tokens in OUR db\r\n // Also sets a cookie to remember we did all this\r\n if($this->twitter->storeTokens())\r\n {\r\n\r\n // if successful we head back to further demo's :)\r\n url::redirect('/');\r\n }\r\n else\r\n {\r\n echo \"help - a wierd error occured somewhere. Check your installation again\";\r\n }\r\n \r\n }\r\n else\r\n {\r\n url::redirect('/ktwitter/demo');\r\n }\r\n }", "public function acceptLoginAction() {\n\t\treturn FALSE;\n\t}", "public function executeLogout() {\n $this->logMessage(\"Logout\", 'debug');\n $this->getUser()->clearCredentials();\n $this->getUser()->setAuthenticated(false);\n $this->redirect('default/index');\n }", "public function getLastlogin() {}", "public function logOut() {\n\t$this->isauthenticated = false;\n\tunset($_SESSION['clpauthid'], $_SESSION['clpareaname'], $_SESSION['clpauthcontainer']);\n\tsession_regenerate_id();\n}", "public function login();", "public function login();", "public function logout() {\n\t\t$this->setLoginStatus(0);\n\t}", "public function authDoView(){\n if(!$this->authUser()){\n echo '{\"status\":-1,\"result\":\"/user/login?prePage='.$_SERVER['HTTP_REFERER'].'\"}';\n exit();\n }\n }", "public function action_logout(){\n\t\tAuth::instance()->logout();\n \n\t\t#redirect to the user account and then the signin page if logout worked as expected\n\t\tHTTP::redirect('/');\t\n\n\t}", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "function processPageRequest()\n{\n\tif(session_status() == PHP_SESSION_ACTIVE)\n\t{\n\t\tsession_destroy();\n\t}\n\t// DO NOT REMOVE OR MODIFY THE CODE OR PLACE YOUR CODE ABOVE THIS LINE\n\tif ($_SERVER['REQUEST_METHOD'] == 'POST'){\n\t\t$Username = $_POST['Username'];\n\t\t$Password = $_POST['Password'];\n\n\t\tif (authenticateUser($Username, $Password)){\n\t\t\theader(\"Location: ./index.php\");\n\t\t\texit;\n\t\t}\n\t\telse{displayLoginForm($message = \"Incorrect Login Information\");}\n\t}\n\telse{displayLoginForm();}\n}", "public function logout()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth])) {\t\n\t\t\tSessionManager::instance()->trashLoginCreadentials();\n\t\t}\n\t}", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page with an error message\n Router::redirect(\"/users/login/?error=true\"); \n\n # But if we did, login succeeded! \n } \n # Login passed\n else {\n\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n\n }\n\n // Check if email address is empty\n $q = \"SELECT email \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $email = DB::instance(DB_NAME)->select_field($q);\n\n if(!$email) {\n\n # Send them back to the login page with an error message\n Router::redirect(\"/users/login/?error=true\"); \n\n # But if we did, login succeeded! \n } \n # Login passed\n else {\n\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n\n }\n\n }" ]
[ "0.71394396", "0.6778711", "0.6727354", "0.65887386", "0.6563031", "0.6534238", "0.64697963", "0.64572006", "0.6447346", "0.6441505", "0.64298", "0.6419706", "0.64159095", "0.640171", "0.6357462", "0.63513064", "0.63486636", "0.6342523", "0.6336258", "0.6329114", "0.63281363", "0.6296482", "0.6278087", "0.6277071", "0.6276892", "0.6268148", "0.62530726", "0.62234336", "0.6217601", "0.6206783", "0.6202133", "0.6195122", "0.61689603", "0.6159999", "0.61277467", "0.6125551", "0.61182475", "0.6115436", "0.611534", "0.60998344", "0.60908645", "0.60878587", "0.6087533", "0.6052307", "0.60490763", "0.6046048", "0.6025281", "0.60215807", "0.6011985", "0.60105735", "0.60079175", "0.59973294", "0.59820366", "0.5980044", "0.59780025", "0.5976762", "0.5974915", "0.596739", "0.5966825", "0.59576356", "0.5947257", "0.5946737", "0.5935852", "0.59242815", "0.592373", "0.5918702", "0.5915153", "0.591051", "0.5910176", "0.5904895", "0.5903635", "0.59004927", "0.59001243", "0.5898952", "0.5898387", "0.5897763", "0.589565", "0.58928156", "0.5891412", "0.5891301", "0.5884344", "0.5883224", "0.5874308", "0.58712333", "0.58702797", "0.58689976", "0.5867255", "0.58651346", "0.58590925", "0.5856593", "0.5854864", "0.5854061", "0.58499974", "0.58499974", "0.5849684", "0.5848644", "0.5844636", "0.5843809", "0.58355206", "0.58351123", "0.5834937" ]
0.0
-1
send email with code to user
public static function sendCode(Request $request){ $rules = [ 'email' => 'required|email|exists:users,email', ]; $validator = Validator::make(request()->all(),$rules); $validation_errors = $validator->errors(); if($validator->fails()){ result(401,$validation_errors->first(), null); } else{ $email = request('email'); $verify_code = rand(1000,9000); User::where('email',request('email'))->update(['status'=>null,'verify_code'=>$verify_code]); $data = [ 'email'=>$email, 'code'=>$verify_code ]; if(SendEmailController::mail($data) == true){ result(200 ,null,null); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send($email, $code, $emailId);", "function send_verification_email($user_email, $verification_code)\n{\n\n $to = $user_email;\n $subject = 'Verification Email';\n\n $message = '\n Thanks for subscribing!\n Your veirfication code is:\n ' . $verification_code;\n\n return mail($to, $subject, $message);\n}", "public static function send($username, $code) {\n mail(\n $username . '@student.math.hr',\n 'Confirmation mail',\n 'Confirmation link: ' . $_SERVER['HTTP_HOST']\n . '/register.php?code=' . $code);\n }", "public function send(string $code, Authenticatable $user);", "function sendActivationEmail($emailid, $activationcode) {\n\t// send activation email\n\t// require ('emailcode.php');\n\t$link = \"http://s336355547.onlinehome.us/peach/service/index.php?method=get&module=activate&emailid=$emailid&activationcode=$activationcode\";\n\t$STR_EMAIL_STRING =\"<br/>Hi,<br/><br/>Please click on below link to activate your account.<br/><br/>$link <br/><br/>Regards <br/>Peach Health <br/>\";\n\tSEND_MAIL($emailid, \"Activation link of peach health\", $STR_EMAIL_STRING, \"[email protected]\");\n}", "private function sendMail() {\n $BodyMail = new BodyMail();\n //$to = $this->_datPerson[email];\n $to = '[email protected]';\n\n $url = baseUri.\"linkCode?code=\".base64_encode($this->_code).\"&email=\".base64_encode($this->_datPerson[email]);\n\n $subject = \"DEV-Validación de Email\";\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n $headers .= 'From: Evaluacione Red UNOi <[email protected]>'.\"\\r\\n\";\n $headers .= 'Reply-To: NoReply <[email protected]>' . \"\\r\\n\";\n $headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n $message = $BodyMail->run($this->_datPerson['name'], $this->_code, $url);\n mail($to, $subject, $message, $headers, '-f [email protected]');\n }", "protected function _send_reset_password_email($user, $code) {\n $data[\"base\"] = base_url();\n $data[\"user\"] = $user;\n $data[\"code\"] = $code;\n\n $content = $this->load->view(\"auth/email/forgot_password\", $data, true);\n $lib = new Email();\n $lib->setFrom(\"Kukua B.V. <[email protected]>\");\n $lib->setTo($user->first_name . \" \" . $user->last_name . \" <\" . $user->email . \">\");\n $lib->setSubject(\"Password reset\");\n $lib->setContent($content);\n $lib->send();\n\t}", "function email_activation($activationCode,$form)\n\t{\n\t\t$emailaddress = $this->namedFields['email']->getData();\n\t\t$site_address = SITE_ADDRESS;\n $site_address .= (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n\t\t$link = $site_address.'sign_up?activate_code='.$activationCode;\n\t\t$body = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\"><html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\"><head><title>Church Growth Research Programme</title><style type=\\\"text/css\\\"><!-- body { background:#ffffff; margin:0; padding:0; } p { font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#000000; line-height:22px; margin:10px 0px 10px 0px; text-align:left; } h1, h2, h3, h4, h5, h6 { font-family:Arial, Helvetica, sans-serif; } a { color:#2a6307; outline:none; text-decoration:underline; } a:hover { color:#569823; text-decoration:underline; } --> </style></head><body bgcolor=\\\"#fff\\\"><div align=\\\"center\\\"><table width=\\\"600\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" style=\\\"border:none;\\\"><tbody><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"188\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailheader.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr><tr><td bgcolor=\\\"#fbf5de\\\" style=\\\"padding:0px 30px 0px 30px;\\\"><p>Welcome to the Church Growth Research Programme.</p><p>Please click on the link below to activate your account:<p>\".\n\t\t\t\"<p><a href=\\\"$link\\\">$link</a></p><p>Thank you, the Church Growth Reseach Programme website team.</p>\".\n\t\t\t\"</td></tr><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"33\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailfooter.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr></tbody></table></div></body></html>\";\n\t\t$from_email_address = $form['email'];\n\t\t$this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Account Activation', $body, $body_text);\n\n\t}", "function send_authcode_email($authcode,$email,$code_type=0)\n\t{\n\t\t$this->load->library(\"mail\");\n\t\t$this->load->model('login/register_model');\n\t\t$msg_head=$msg_end=$lang=$link=$stuid='';\n\n\t\tif($this->_user_id)\n\t\t{\n\t\t\t$user_info=$this->register_model->get_user_info($this->_user_id);\n\t\t\tif($user_info['errorcode'] && $user_info['user']->student_id)\n\t\t\t{\t\t\n\t\t\t\t$stuid='您的学号是:'.$user_info['user']->student_id.'<br />';\n\t\t\t}\n\t\t}\n\n\t\tswitch($code_type)\n\t\t{\n\t\t\tcase Constant::CODE_TYPE_REGISTER: $link=\"verify\";$lang=\"verify\";break;\n\t\t\tcase Constant::CODE_TYPE_CHANGE_PASSWORD: $link=\"forgot/reset\";$lang=\"reset\";break;\n\t\t\tcase Constant::CODE_TYPE_CHANGE_EMAIL: $link=\"verify\";$lang=\"update_email\";break;\n\t\t\tcase Constant::CODE_TYPE_REGISTER_VERIFY_EMAIL: $link=\"verify\";$lang=\"reg_reverify\";break;\n\t\t\tcase Constant::CODE_TYPE_LOGIN_VERIFY_EMAIL: $link=\"verify\";$lang=\"login_reverify\";break;\n\t\t\tdefault:break;\n\t\t}\n\n\t\tif($lang && $link)\n\t\t{\t\n\t\t\t//$authcode=site_url().$link.\"?code=\".$authcode;\n\t\t\t$authcode=login_url().$link.\"/code/\".$authcode;\n\t\t\t$subject=$this->lang->line('mail_subject_'.$lang);\n\t\t\t$msg_body=str_replace('{email}',$email,$this->lang->line('mail_body_'.$lang));\n\t\t\t\n\t\t\t$msg_body=str_replace('{stuid}',$stuid,$this->lang->line('mail_body_'.$lang));\n\t\t\t$msg_end=$this->lang->line('mail_end_'.$lang);\t\t\t\n\t\t}\n\t\t$msg=$msg_body.'<br /><a href=\"'.$authcode.'\">'.$authcode.'</a><br />'.$msg_end.'<br/>'.$this->lang->line('mail_disclaimer');\n\n\t\t$ret = Mail::send($email, $subject, $msg);\n\t\tif($ret['ret']==1)\n\t\t{\n\t\t\t$errorcode=true;\n\t\t\tlog_message('info_tizi','170101:Email send success',$ret);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errorcode=false;\n\t\t\tlog_message('error_tizi','17010:Email send failed',$ret);\n\t\t}\n\t\treturn array('errorcode'=>$errorcode,'send_error'=>implode(',',$ret));\n\t}", "function send_auth_code_at_login($user)\n{\n\t$user_info = get_userdata($user);\n\t\n\t$user_login = $user_info->data->user_login;\n\n\t$user_email = $user_info->data->user_email;\t\n\n\t$user_name = $user_info->data->first_name;\t\n\n\t$user_phone = get_user_meta( $user, 'user_phone', true );\n\t//$user_phone = urldecode($u_phone);\n\n\t$user_fname = get_user_meta( $user, 'first_name', true );\n\n\t$code = get_user_meta( $user, 'has_to_be_activated', true );\n\n\t$subject = 'Your New Authentication Code';\n\n\n\t$message1 = \"<html><body style='background:#f3f3f3;padding:20px 0;'><table border='0' cellpadding='0' cellspacing='0' style='margin:auto; max-width: 520px;width:100%;font-family: Arial;padding:20px;background:#fff;'><tbody>\";\n\t$message1 .=\"<tr><td style='font-size: 16px;'>Hello \".ucfirst($user_fname).\",</td></tr><tr height=20></tr>\";\n\t$message1 .=\"<tr><td style='font-size: 16px; line-height: 20px;'>Welcome to Raise it Fast!</td></tr><tr height=30></tr>\";\n\t$message1 .=\"<tr><td style='font-size: 16px; line-height: 20px;'>Please use this code to authenticate your account with Raise it Fast. <span style='background: #aaaaaa none repeat scroll 0 0;height: 45px;text-align: center;width: 101px;'>\".$code.\"</span></td></tr><tr height=20></tr>\";\n\t$message1 .=\"<tr><td style='font-size: 16px; line-height: 20px;'>'If you have any questions or concerns don't hesitate to use our website chat function, call us, or email us by going to our help page at \".site_url('/contact-us/').\" Or, you can simply reply to this email. '</td></tr><tr height=30></tr>\"; \n\t$message1 .=\"<tr><td style='font-size: 16px; margin-top: 20px;'>Thanks for becoming a part of the Raise It Fast community! </td></tr></tbody></table><table border='0' cellpadding='0' cellspacing='0' style='margin:20px auto 0; max-width: 520px;width:100%;'>\"; \n\n\t$message1 .=\"<tr><td style='color: #999999; font-size: 12px; text-align: center;'>1401 Lavaca St #503, Austin, TX 78701</td></tr><tr height=20></tr>\"; \n\t$message1 .=\"<tr><td style='color: #999999; font-size: 12px; text-align: center;'><a href=\".site_url().\" style='text-decoration:none; color: #999999;'>The Raise it Fast Team</a></td></tr>\"; \n\t$message1 .=\"</table></body></html>\";\n\n\twp_mail($user_email, $subject, $message1);\n\n//=========Send Auth Code Via Text message ==================//\n\n\t$account_sid = get_option('twilio_account_sid'); \n\t$auth_token = get_option('twilio_auth_token'); \n //require('lib/twilio-php-latest/Services/Twilio.php');\n\t$client = new Services_Twilio($account_sid, $auth_token); \n //$from = '+12182265630'; \n\t$from = get_option('twilio_phone_no');\n\n\ttry\n\t{\n\t\t$client->account->messages->sendMessage( $from, $user_phone, \"Hello $user_fname, Your Authentication code is $code\");\n\t}\n\tcatch (Exception $e)\n\t{ \n\n\t\techo \"11-\";\n\t}\n}", "public function EmailConfirm($code, $id){\n\t\t$restaurantGroup= Sentry::findGroupById(6);\n\t\t$activeUser\t\t= Sentry::findUserById($id);\n\n\t\t// $now\t\t\t= time();\n\t\t// need to create time limition\n\t\tif($activeUser->attemptActivation($code)){\n\t\t\t//activation is success\n\t\t\tLog::info('active the user : '.$id);\n\t\t\tif($activeUser->addGroup($restaurantGroup)){\n\t\t\t\tLog::info('add the user into the restaurant id : '.$id);\n\t\t\t\t$user = Sentry::login($activeUser, false);\n\t\t\t\tLog::info('success to login to the Food Order');\n\t\t\t\treturn Redirect::route('r.description.create');\n\t\t\t}else{\n\t\t\t\tLog::info('fail to add the user into the restaurant');\n\t\t\t}\n\t\t}else{\n\t\t\t//activation is fail\n\t\t\tLog::info('fail to active the user : '.$id);\n\t\t\treturn Response::view('fail to active the user', array(), 404);\n\t\t}\n\t}", "public function mailer($email,$code){\r\n $errors = [];\r\n \r\n $query = \"INSERT INTO resetpassword (code, email) VALUES('$code', '$email')\";\r\n $sendEmail = $this->db->query($query);\r\n return $sendEmail;\r\n }", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "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}", "private function _sendConfirmationEmail($email_to, $name_to, $confirmation_code){\n\t\t$mailer = new Bel_Mailer();\n\t\t$mailer->addTo ( $email_to );\n\t\t$mailer->setSubject('Reactivate your account');\n\t\t$this->view->assign('code',$confirmation_code);\n\t\t$this->view->assign('name',$name_to);\n\t\t$mailer->setBodyHtml ( $this->view->fetch('usermanagement/profile/confirmation_email.tpl') );\n\t\t$mailer->send ();\n\t}", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "public function sendMail($data)\n {\n $mailData = array('username'=>$data['username'],'token'=>base64_encode($data['email']));\n Mail::send('frontend.auth.email',$data, function ($message) use ($data) {\n $message->subject('Verify your account');\n $message->from(env('MAIL_USERNAME'));\n $message->to($data['email']);\n });\n }", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "public function sendEmailUser($data)\n {\n $subject = 'Welcome to Our Atari Portal';\n $to_email = $data['email'];\n $url = $data['url'];\n Mail::send('emails.verify-email', ['username'=>$data['name'],'url'=>$url], function ($message) use ($subject, $to_email){ \n $message->subject($subject);\n $message->to($to_email);\n });\n }", "function sendAccountActivationCode($userData, $code)\n {\n $this->getCountryCode($userData->country_id);\n $template = 'USR002';\n $username = \"$userData->first_name $userData->last_name\";\n $replace = ['[UserName]', '[UserActivationCode]'];\n $with = [$username, $code];\n $to = $this->countryCode . (int) $userData->mobile_no;\n parent::sendSms($to, $replace, $with, $template);\n }", "public function sendEmailVerificationNotification();", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "public function sendResetCode()\n {\n if (is_null($this->container)) {\n //we don't have a container, therefore no mail handler\n return false;\n }\n $code = $this->getResetCode()->getCode();\n\n $mailer = $this->container->mailer;\n\n $mailer->message->setSubject('Password Reset Code Request for ' . getenv('NAME'));\n $mailer->message->setFrom([getenv('APP_EMAIL_ADDRESS') => getenv('NAME')]);\n $mailer->message->setTo([$this->email]);\n\n $arguments = [\n 'home' => getenv('BASE_URL'),\n 'app_name' => getenv('NAME'),\n 'username' => $this->username,\n 'copyright_year' => date('Y'),\n 'reset_code_lifetime' => (int)getenv('RESET_CODE_LIFETIME'),\n 'action_url' => getenv('BASE_URL') . $this->container->router->pathFor('auth.login')\n . '?username=' . $this->username . '&code=' . $code,\n ];\n\n $mailer->htmlTemplate('password_reset.twig', $arguments);\n $mailer->inlineStyle('password_reset.css');\n $mailer->textTemplate('password_reset.txt', $arguments);\n\n return $mailer->send();\n }", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "private function sendConfirmationEmail($email){\n $pdo = $this->pdo;\n $stmt = $pdo->prepare('SELECT confirm_code FROM users WHERE email = ? limit 1');\n $stmt->execute([$email]);\n $code = $stmt->fetch();\n\n $subject = 'Confirm your registration';\n $message = 'Please confirm you registration by pasting this code in the confirmation box: '.$code['confirm_code'];\n $headers = 'X-Mailer: PHP/' . phpversion();\n\n if(mail($email, $subject, $message, $headers)){\n return true;\n }else{\n return false;\n }\n }", "public function send_verification_email($email_addr,$username)\n {\n //build config array using premade gmail account\n $config= array(\n 'protocol'=>'smtp',\n 'smtp_host'=>'ssl://smtp.googlemail.com',\n 'smtp_port'=>465,\n 'smtp_user'=>'HIDDEN',\n 'smtp_pass'=>'HIDDEN',\n 'charset' => 'iso-8859-1',\n 'mailtype' => 'html',\n\n );\n\n $this->CI->load->library('email',$config);\n $this->email->CI =& $this;\n\n $this->CI->email->set_newline(\"\\r\\n\");\n\n if(!$code=$this->CI->user_model->read_code($username))\n {\n return FALSE; // if verification code from db cannot be read return false\n }\n\n //build email template and send code as a-link\n $verify_link=\"<a href=\".site_url().'users/validate_user/'.$code.\">Click Here to Validate Account<a/>\";\n $this->CI->email->from('HIDDEN', 'RH FILES');\n $this->CI->email->to($email_addr);\n $this->CI->email->subject('Account Validation');\n $this->CI->email->message('Thanks for taking the time to create an account. \n Please follow the link to validate your account: '.$verify_link);\n \n return $this->CI->email->send();\n }", "private function sendMail($data) {\n #data to send in email\n $email_array = array(\n 'server_url' => \\Config::get('variable.SERVER_URL'),\n 'from' => \\Config::get('variable.ADMIN_EMAIL'),\n 'to' =>trim($data['data']['email']),\n 'from_name' =>'Episodic' ,\n 'subject' => 'Episodic',\n 'view' => 'mail.page_email',\n 'name' => 'Episodic',\n 'data' => $data[\"page_data\"]\n );\n #Send Verification Email\n return $this->sendEmail($email_array); #Send Verification Email \n }", "public static function sendRegisterMail($email, $name, $code)\n {\n $url = url('/active/'.$code);\n $params = [\n 'email' => $email,\n 'name' => $name,\n 'subject' => STheme::lang('lang.subject.register_success'),\n 'data' => ['url'=>$url],\n 'template' => 'mails.registerSuccess'\n ];\n System::sendMail($params);\n }", "public static function sendEmail($data)\n {\n Mail::send('email.custome_email_template', $data, function ($message) use ($data) {\n $message->from(env('COMPANY_EMAIL_ADDRESS'), 'Rental Application RVC');\n $message->to($data['email']);\n $message->subject($data['subject']);\n });\n }", "public function sendToActivateMail($email, $code, $type) \n {\n $mail = new PHPMailer(true);\n\n try {\n //Server settings \n $mail->isSMTP();\n $mail->Host = 'smtp.gmail.com';\n $mail->CharSet = \"utf-8\";\n $mail->SMTPAuth = true;\n $mail->Username = '[email protected]';\n $mail->Password = '5e7Y2BDATk';\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;\n $mail->Port = '587'; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`\n\n //Recipients\n $mail->setFrom($email);\n $mail->addAddress($email); \n\n //Content\n $mail->isHTML(true); //Set email format to HTML\n $mail->Subject = '<h1>Активация аккаунта в archk</h1>';\n $mail->Body = '<div>Чтобы акктиворать свою учётную заись перейдите по <a href='.\"rab.archksakhalin.ru?activate=$code&email=$email&type=$type\".'>ссылке</a></div>';\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\n $mail->send();\n } catch (Exception $e) {\n var_dump(\"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\");\n }\n }", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "private function SendVerificationEmail($email,$activationcode){\n\t\t$this->load->library('email');\n\t \t$this->email->set_mailtype('html');\n\t\t$this->email->from('[email protected]', 'Biva Publication');\n\t\t$this->email->to($email);\n\n\n\t\t$message='<!DOCTYPE html><html><head></head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>';\n\t\t$message.='<p>Dear Reader,</p>';\n\t\t$message.='<p>Thanks for registaring on Biva Publication! Please <strong><a href=\"'.base_url().'home/validate_email/'.$email.'/'.$activationcode.'\">Click Here To Validate Email</a></strong>to active your account, you will be able to log into Biva Publication and manage your ordees.</p>';\n\t\t$message.='<p>Thank You!</p>';\n\t\t$message.='<p>Biva Publication</p>';\n\t\t$message.='</body></html>';\n\n\n\t\t$this->email->subject('Biva Publication Account Verification');\n\t\t$this->email->message($message);\n\n\t\t$this->email->send() or die(\"Message Not Send\");\n\t}", "abstract protected function _sendMail ( );", "public function sendConfirmation( ){\n\t\t$data = Request::only(['email']);\n\t\t$email = $data['email'];\n\t\t$token = str_random(30);\n\t\t$domain = substr(strrchr($email, \"@\"), 1);\n\n\t\tif( in_array( $domain, explode( ',', env('ACCEPTABLE_EMAIL_DOMAINS') ) ) ){\n\t\t\ttry {\n\t\t\t\t// Check if student exists already\n\t\t\t\tUser::where('email', $email)->firstOrFail();\n\n\t\t\t} catch (ModelNotFoundException $e) {\n\t\t\t\t// Send email verification if they are\n\t\t\t\tMail::send('emails.verification_code', ['email' => $email, 'confirmation_code' => $token], function ($m) use($email) {\n\t\t $m->from('admin@'.env('USER_DOMAIN'), env('SITE_TITLE') );\n\n\t\t $m->to($email)->subject('Verify Your Email For '.env('SITE_TITLE'));\n\t\t });\n\n\t\t VerificationCode::create([\n\t\t \t'email' => $email,\n\t\t \t'confirmation_code' => $token\n\t\t ]);\n\n\t\t return View::make('emails.thank_you');\n\t\t\t}\n\t\t} else{\n\t\t\treturn Redirect::back()->withErrors(['That email is not on our approved list of student emails']);\n\t\t}\n\t}", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "private function sendActivationEmail($data) {\n\t$template_name = 'signup-confirmation';\n\t$template_content = array();\n\t$message = array(\n\t\t'subject' => 'Welcome! Please confirm your email address.',\n\t\t'from_email' => '[email protected]',\n\t\t'from_name' => 'Chefmes',\n\t\t'to' => array(\n\t\t\tarray(\n\t\t\t\t'email' => $data['email'],\n\t\t\t\t'name' => $data['fullname']\n\t\t\t)\n\t\t),\n\t\t'merge_language' => 'mailchimp',\n\t\t'merge_vars' => array(\n\t\t\tarray(\n\t\t\t\t'rcpt' => $data['email'],\n\t\t\t\t'vars' => array(\n\t\t\t\t\t[ 'name' => 'email', 'content' => $data['email']],\n\t\t\t\t\t[ 'name' => 'firstname', 'content' => $data['firstname']],\n\t\t\t\t\t[ 'name' => 'confirmlink', 'content' => $data['confirmlink']]\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\t\\Email::messages()->sendTemplate($template_name, $template_content, $message);\n\t//print_r($result);\n }", "function _send_email($type, $email, &$data)\n {\n $this->load->library('email');\n $this->email->from($this->config->item('webmaster_email', 'tank_auth'), $this->config->item('website_name', 'tank_auth'));\n $this->email->reply_to($this->config->item('webmaster_email', 'tank_auth'), $this->config->item('website_name', 'tank_auth'));\n $this->email->to($email);\n $this->email->subject(sprintf($this->lang->line('auth_subject_'.$type), $this->config->item('website_name', 'tank_auth')));\n $this->email->message($this->load->view('email/'.$type.'-html', $data, TRUE));\n $this->email->set_alt_message($this->load->view('email/'.$type.'-txt', $data, TRUE));\n $this->email->send();\n }", "function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}", "public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <[email protected]>',\r\n 'to' => 'Boo <[email protected]>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }", "public function sendMsg()\n {\n $msg = $this->request->post('msg');\n $email = $this->request->post('email');\n \n $emailbody = $this->EmailFunc->msg(\"Code: \" .$msg, \"Your Trail Code\");\n \n $this->Email->sendE($email, 'Trail From IPTV', $emailbody);\n \n $this->load->model('Trail')->sendMsg($msg, $email);\n \n return $this->showTrails();\n }", "public function sendAction() {\n __mail::send('[email protected]', '[email protected]', 'title', 'me', 'hello world');\n\n return false;\n }", "public function sendmailAction()\r\n\t{\r\n\t\t$email = $this->getRequest()->getParam('email');\r\n\t\t$this->view->email = $email;\r\n\t\t$url = $this->getRequest()->getParam('url');\r\n\t\t$this->view->url = $url;\r\n\t\t$to = $email;\r\n\t\t$subject = \"Bạn của bạn chia sẻ một bài viết rất hay!\";\r\n\t\t$message = \"Bạn của bạn chia sẻ một bài viết rất hay. Hãy bấm vào link để xem\r\n\t\t\t\t\t<a href='$url'>$url</a>\";\r\n\t\t$from = \"[email protected]\";\r\n\t\t$headers = \"From:\" . $from;\r\n\t\tmail($to,$subject,$message,$headers);\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t}", "function _send_email($type, $email, &$data)\n\t{\n\t\t$params = mg_create_mail_params($type, $data);\n\t\tmg_send_mail($email, $params);\t\t\n\t}", "public function sendActivationEmail(){\n\t\t// generate the url\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\t\t$text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n\t\t$html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\t\t\n\t\tMail::send($this->email, 'Account_activation', $text, $html);\n\t}", "function emailRegistrationAdmin() {\n require_once ('com/tcshl/mail/Mail.php');\n $ManageRegLink = DOMAIN_NAME . '/manageregistrations.php';\n $emailBody = $this->get_fName() . ' ' . $this->get_lName() . ' has just registered for TCSHL league membership. Click on the following link to approve registration: ';\n $emailBody.= $ManageRegLink;\n //$sender,$recipients,$subject,$body\n $Mail = new Mail(REG_EMAIL, REG_EMAIL, REG_EMAIL_SUBJECT, $emailBody);\n $Mail->sendMail();\n }", "function sendSessionActivationCode($userData, $agent, $code)\n {\n $this->getCountryCode($userData->country_id);\n $template = 'USR005';\n $username = \"$userData->first_name $userData->last_name\";\n $replace = ['[UserName]', '[UserSessionActivationCode]', '[UserSessionAgent]'];\n $with = [$username, $code, $agent];\n $to = $this->countryCode . (int) $userData->mobile_no;\n parent::sendSms($to, $replace, $with, $template);\n }", "function _send_email($type, $email, &$data)\n\t{\n\t\tswitch ($type)\n\t\t\t {\n\t\t\t case 'activate':\n\t\t\t \treturn $this->_activate_email($email,$data);\n\t\t\t break;\n\t\t\t case 'welcome':\n\t\t\t return $this->_welcome_email($email,$data);\n\t\t\t break;\n\t\t\t case 'forgot_password':\n\t\t\t return $this->_email_forgot_password($email,$data);\n\t\t\t break;\n\t\t\t case 'reset_password':\n\t\t\t return $this->_email_reset_password($email,$data);\n\t\t\t break;\n\t\t\t case 'change_email':\n\t\t\t return $this->_email_change_email($email,$data);\n\t\t\t break;\n\t\t\t }\n\t}", "protected function sendCode($code) {\n $to = $this->getAccountNumber();\n try {\n $message = $this->client->account->messages->sendMessage($this->twilioNumber, $to, t($this->messageText, array('!code' => $code)));\n // @todo Consider storing date_sent or date_updated to inform user.\n watchdog('tfa_basic', 'Message !id sent to user !uid on @sent', array(\n '@sent' => $message->date_sent,\n '!id' => $message->sid,\n '!uid' => $this->context['uid'],\n ), WATCHDOG_INFO);\n return TRUE;\n }\n catch (Services_Twilio_RestException $e) {\n // @todo Consider more detailed reporting by mapping Twilio error codes to\n // messages.\n watchdog('tfa_basic', 'Twilio send message error to user !uid @code @link', array(\n '!uid' => $this->context['uid'],\n '@code' => $e->getStatus(),\n '@link' => $e->getInfo(),\n ), WATCHDOG_ERROR);\n return FALSE;\n }\n }", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "private function emailAtLogin() {}", "public function SendActiveMail($data,$id=null){\n if($id!=null){\n $add=public_users::find($id);\n $add->num_of_sends+=1;\n $add->save();\n }\n $mailables=new PublicMailVerification($data['token'],$data['name'],$data['email'],$data['phone'],$data['otp']);\n Mail::to($data['email'])->send($mailables);\n }", "public function sendActivationMail(LEmailAccountActivation $code, LUser $user = null) {\n $this->errorCode = 0;\n $message = new YiiMailMessage();\n if (isset($this->activationMailSubjectCallback))\n $subject = call_user_func($this->activationMailSubjectCallback, $code, $user);\n if (!isset($subject) || !is_string($subject))\n $subject = LilyModule::t('E-mail registration on {siteName}', array('{siteName}' => Yii::app()->name));\n $message->setSubject($subject);\n $message->view = $this->activationMailView;\n if (isset($this->activationMailView))\n $message->setBody(array('code' => $code, 'user' => $user), 'text/html');\n else\n $message->setBody(LilyModule::t('Your email was used in registration on <a href=\"{siteUrl}\">{siteName}</a>.<br />\nTo activate it you have to go by this <a href=\"{activationUrl}\">link</a></li> in your browser. <br />\nIf you haven\\'t entered this email on {siteName}, than just ignore this message.<br />\n<br />\nYours respectfully,<br />\nadministration of {siteName}.', array('{siteUrl}' => Yii::app()->createAbsoluteUrl(Yii::app()->homeUrl), '{siteName}' => Yii::app()->name,\n '{activationUrl}' => Yii::app()->createAbsoluteUrl('/'.LilyModule::route('user/activate'), array('code' => $code->code)))), 'text/html');\n $message->addTo($code->email);\n $message->from = $this->adminEmail;\n $recipient_count = Yii::app()->mail->send($message);\n if ($recipient_count > 0)\n Yii::log('E-mail to ' . $code->email . ' was sent.', CLogger::LEVEL_INFO, 'lily');\n else\n Yii::log('Failed sending e-mail to ' . $code->email . '.', CLogger::LEVEL_WARNING, 'lily');\n $this->errorCode = $recipient_count == 0;\n return $recipient_count > 0;\n }", "public function mail()\n {\n if(!(php_sapi_name() == 'cli-server'))\n return 403;\n\n import('SurveyMailer');\n\n $mailer = new SurveyMailer();\n $mailer->send();\n //$mailer->sendForParticipant(with(new SurveyMatcher())->getParticipantById(1));\n }", "private function enviarEmail($msg)\n {\n // setando conteudo do email para avisos\n echo 'Envio email';\n }", "public function sendActivationEmail() {\n $htmlBody = \"\n <div style='font-family: Trebuchet MS, Helvetica, sans-serif'>\n Hello \" . $this->title . \" \" . $this->lastname . \",\n <br /><br />\n Thank you for registering with us at <a href='www.betvbet.co.uk'>Bet v Bet</a>.\n <br /><br />\n You are one step away from placing your first bet. Simply click the activation link below:\n <br />\n {activationLink}\n <br /><br />\n Alternatively, <a href='www.betvbet.co.uk/site/login'>log in</a> to your account and enter the code below:\n <br />\n {code}\n <br /><br />\n This code expires in 24 hours ({tomorrow}).\n <br /><br />\n Best of luck!\n <br />\n The Bet v Bet Team\n <br /><br /><br /><br />\n This inbox is not monitored, please do not reply to this address, any queries should be sent to <a href='mailto:[email protected]'>[email protected]</a>\n </div>\n \";\n\n // Now, create the activation code.\n $code = strtoupper(\\app\\components\\Utilities::generateRandomString(6));\n // Create the activation link.\n $activationLink = Yii::getAlias('@web') . '/site/activate?code=' . $code;\n\n $activate = new Activate();\n $activate->attributes = [\n 'user' => $this->id,\n 'code' => $code,\n 'expires' => time() + 86400,\n 'created' => time(),\n ];\n $activate->save();\n\n $htmlBody = str_replace('{activationLink}', $activationLink, $htmlBody);\n $htmlBody = str_replace('{code}', $code, $htmlBody);\n $htmlBody = str_replace('{tomorrow}', date(\"d/m/Y H:i\", time() + 86400), $htmlBody);\n Yii::$app->mailer->compose()\n ->setFrom(['[email protected]' => 'Bet v Bet'])\n ->setTo($this->email)\n ->setHtmlBody($htmlBody)\n ->setSubject('Bet v Bet - Account Activation')\n ->send();\n }", "function sendecode()\n {\n $to = html_escape($this->input->post('email'));\n $message = html_escape($this->input->post('message'));\n $from = $this->session->userdata('sname');\n $refcode = $this->db->get_where('superuser', array('email' => $from))->row()->ref;\n $subject = 'Referrel Code :' . $refcode;\n $this->Email_model->send_smtp_mail($message, $subject, $to, $from);\n $this->session->set_flashdata('emailsent', \"Email Sent Successfully\");\n $this->vemailmodal();\n }", "public function sendMail(Request $request)\r\n {\r\n $email = $request->input('user_string');\r\n $country_code = $request->input('country_code', '86');\r\n $country_code = str_replace('+', '', $country_code);\r\n $scene = $request->input('scene');\r\n if (empty($email)) {\r\n return $this->error('Mailbox Cannot Be Empty');\r\n }\r\n $user = Users::getByString($email);\r\n if ($scene == 'login' || $scene == 'change_password' || $scene == 'reset_password') {\r\n if (empty($user)) {\r\n return $this->error('Account Number Error');\r\n }\r\n } else {\r\n if (!empty($user)) {\r\n return $this->error('Account Number Already Exists');\r\n }\r\n }\r\n\r\n if ($scene == 'change_password' || $scene == 'reset_password') {\r\n $country_code = $user->country_code;\r\n }\r\n\r\n // Take Values From Settings\r\n $username = Setting::getValueByKey('phpMailer_username', '');\r\n $host = Setting::getValueByKey('phpMailer_host', '');\r\n $password = Setting::getValueByKey('phpMailer_password', '');\r\n $port = Setting::getValueByKey('phpMailer_port', 465);\r\n $from_name = Setting::getValueByKey('phpMailer_from_name', \"[X-Coin]\");\r\n $port == '' && $port = 465;\r\n //InstantiationphpMailer\r\n try {\r\n $mail = new PHPMailer(true);\r\n $mail->isSMTP();\r\n $mail->CharSet = \"utf-8\";\r\n $mail->SMTPAuth = true;\r\n $mail->SMTPSecure = \"ssl\";\r\n $mail->Host = $host;\r\n $mail->Port = $port;\r\n $mail->Username = $username;\r\n $mail->Password = $password; //Go To Open ItqqOr163Found In The Mailbox,This Is Not The Password Of The Mailbox,It's One After It's Openedtoken\r\n $mail->setFrom($username, $from_name); //Set Mail Source //From\r\n $mail->Subject = \"Verification code\"; //Email Title\r\n $code = $this->createSmsCode(4);\r\n $mail->MsgHTML('Your verification code is' . '【' . $code . '】'); //Email Content\r\n $mail->addAddress($email); //Addressee(Email Address Entered By The User)\r\n $res = $mail->send();\r\n if ($res) {\r\n// session(['code@' . $country_code . $email => $code]);\r\n Cache::put('code@' . $country_code . $email, $code, Carbon::now()->addSeconds(1800));\r\n return $this->success('Sent Successfully');\r\n } else {\r\n return $this->error('Operation Error');\r\n }\r\n } catch (\\Exception $exception) {\r\n return $this->error($exception->getMessage());\r\n }\r\n }", "function sending_account_email($data, &$content)\n\t{\n\t\t// Load helper\n\t\t$this->ci->load->helper('url');\n\t\t\n\t\t// Create content\t\n\t\t$content = sprintf($this->ci->lang->line('auth_account_content'), \n\t\t\t$this->ci->config->item('DX_website_name'), \n\t\t\t$data['username'], \n\t\t\t$data['email'], \n\t\t\t$data['password'], \n\t\t\tsite_url($this->ci->config->item('DX_login_uri')),\n\t\t\t$this->ci->config->item('DX_website_name'));\n\t}", "function userNotificationEmail($email, $user)\n{\n\t$module = new sociallogin();\n\t$sub = $module->l('Thank You For Registration', 'sociallogin_functions');\n\t$vars = array('{firstname}' => $user['fname'], '{lastname}' => $user['lname'], '{email}' => $email, '{passwd}' => $user['pass']);\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tMail::Send($id_lang, 'account', $sub, $vars, $email);\n}", "public static function get_email($code) {\n $message = openssl_decrypt($code, ConfirmationCode::$encrypt_method, ConfirmationCode::$key, 0, ConfirmationCode::$iv);\n return substr($message, 0, strpos($message, \"@\")).\"@buffalo.edu\";\n }", "protected function _send_user_request_email($userId) {\n\t\t$data[\"base\"] = base_url();\n\t\t$data[\"userId\"] = $userId;\n\n\t\t$content = $this->load->view(\"auth/email/request\", $data, true);\n\t\t$lib = new Email();\n $lib->setFrom(\"Kukua B.V. <[email protected]>\");\n $lib->setTo(\"[email protected]\");\n $lib->setSubject(\"Access requested\");\n $lib->setContent($content);\n $lib->send();\n\t}", "public function send_email_para_validacao($email, $code_validacao_email) {\n\t\t\n\t\t$email_md5 = md5($email);\n\t\t\t\t\n\t\t$url_validacao = \"http://localhost/www.invoice.artsulgranitos.com.br/validation.php?c=$code_validacao_email&m=$email_md5\";\n\t\t\n\t\t$headers = \"MIME-Version:1.0\\n\";\n\t\t$headers .= \"Content-type:text/html; charset=UTF-8\\n\";\n\t\t$headers .= \"From:$email\";\n\n\t\t$subject = \"ARTSUL INVOICE-PRO - LINK PARA LOGIN\";\n\t\t\n\t\t$mensagem = \"Olá.\".\"<br>\";\n\t\t$mensagem .= \"<br><br>\";\n\t\t$mensagem .= \"Seu login para o INVOICE-PRO está disponível nos seguinte link:\";\n\t\t$mensagem .= \"<br>\";\n\t\t$mensagem .= $url_validacao;\n\t\t$mensagem .= \"<br>\";\n\t\t$mensagem .= \"Clique no link para cadastrar uma senha e entrar no sistema.\";\n\t\t$mensagem .= \"<br>\";\n\t\t$mensagem .= \"Obrigado!\";\n\t\t$mensagem .= \"Att, Art Sul\";\n\t\t\n\t\t$resMail = null;\n\t\t$resMail = mail($to, $subject, $mensagem, $headers);\n\n\t\t\n\t\tif ($resMail) {\n\t\t\treturn array('transaction' => 1, 'url' => $url_validacao );\t\t\t\n\t\t} else {\n\t\t\treturn array('transaction' => 0, 'url' => $url_validacao );;\n\t\t} \n\t}", "public function sendForgetEmail($email)\n\t{\n\t\t$person = Persons::where('email', $email);\n\t\tif($person->count() > 0)\n\t\t{\n\t\t\t$person = $person->first();\n\t\t\t$code = Utility::getCode();\n\t\t\t$link = URL::to('forgot/'.$code);\n\t\t\t$data = array('first_name' => $person->first_name, 'link' => $link, 'email' => $email);\n\n\t\t\tMail::send('emails.forgot', $data, function($message) use ($data){\n\t\t \t\t\t\t$message->to($data['email'], $data['first_name'])\n\t\t \t\t\t\t\t\t->subject('Forgot Password');\n\t\t\t});\n\n\t\t\t// Update code in database\n\t\t\t$person->code = $code;\n\t\t\t$person->update();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function sendEmail($data)\n {\n\n // Create a message\n $message = (new \\Swift_Message($data['notificationTitle']))\n ->setFrom(['[email protected]' => 'PwBox'])\n ->setTo([$data['notificationEmail'] => $data['notificationToName']])\n ->setBody($data['notificationHTML']);\n\n // Send the message\n $result = $this->mailer->send($message);\n\n $repo = $this->container->get('user_repository');\n\n $repo->insertNotification($data['notificationId'], $data['notificationTitle'], $data['notificationBody']);\n }", "public function sendEmail(): void\n {\n echo 'email sent';\n }", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "public function sendForgotPasswordCode($user_email)\n {\n $forgot_password_code = $this->generateForgotPasswordCode($user_email);\n $subject = 'Request for changing password on SP Bookmarks.';\n $body = \"<p>You have sent a request to change the password. The code of this email copy in the appropriate field on the page to change your password.</p>\n <p>Code for changing password: {$forgot_password_code}</p>\";\n if (USE_SMTP) {\n $email = new SmtpEmail($user_email, $subject, $body);\n } else {\n $email = new Sendmail($user_email, $subject, $body);\n }\n if ($email->sendMessage()) {\n return true;\n } else {\n return false;\n }\n }", "function mailUser($email) {\n\t//echo \"mail user <br>\";\n\t$mail = getSocksMailer();\n\t$mail->Subject = \"Litesprite Survey Completed\";\n\t$mail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t$mail->msgHTML(file_get_contents('../emails/postSurvey.html'), dirname(__FILE__));\n\t$mail->AddAddress($email);\n\tsendMail($mail);\n}", "public function sendMail(ResetPasswordRequest $request)\n {\n $user = Client::where('email', $request->input('email'))->first();\n if ($user) {\n $code = rand(100000, 999999);\n $user->update(['code' => $code]);\n Mail::to($user->email)->send(new PasswordResetMailApp($user, $code));\n return response()->json(['success' => 'success', 'message' => trans('client/message.reset_code')]);\n } else {\n return response()->json(['success' => false, 'error' => trans('client/message.not_found')]);\n }\n }", "public static function sendVerificationMail($email){\n $userId = $email;\n $url = $GLOBALS['server_url'] . $GLOBALS['user_dir'] . $GLOBALS['prj_dir'].\"/controller/verify_mail.php\";\n\n /**\n * Mailer script provided by the school\n * - We just added the $email, $url variables from our site\n */\n // create a new cURL resource\n $ch = curl_init();\n // set URL and other appropriate options\n $id = md5(uniqid(rand(), 1));\n\n $areWeStored = self::storeVerificationMailToDb($userId, $id);\n\n if($areWeStored == true) {\n curl_setopt($ch, CURLOPT_URL, \"http://kark.uit.no/internett/php/mailer/mailer.php?address=\" . $email . \"&url=\" . $url . \"?id=\" . $id);\n //curl_setopt($ch, CURLOPT_URL, \"http://www.dagbladet.no/\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // grab URL and pass it to the browser\n $output = curl_exec($ch);\n /**\n * Mailer script provided by the school ends here\n */\n return true;\n }\n else{\n return false;\n }\n }", "protected function confirmEmailToken( $code ) {\n\t\tglobal $wgConfirmAccountContact, $wgPasswordSender;\n\n\t\t$reqUser = $this->getUser();\n\t\t$out = $this->getOutput();\n\t\t# Confirm if this token is in the pending requests\n\t\t$name = ConfirmAccount::requestNameFromEmailToken( $code );\n\t\tif ( $name !== false ) {\n\t\t\t# Send confirmation email to prospective user\n\t\t\tConfirmAccount::confirmEmail( $name );\n\n\t\t\t$adminsNotify = ConfirmAccount::getAdminsToNotify();\n\t\t\t# Send an email to admin after email has been confirmed\n\t\t\tif ( $adminsNotify->count() || $wgConfirmAccountContact != '' ) {\n\t\t\t\t$title = SpecialPage::getTitleFor( 'ConfirmAccounts' );\n\t\t\t\t$subject = $this->msg(\n\t\t\t\t\t'requestaccount-email-subj-admin' )->inContentLanguage()->escaped();\n\t\t\t\t$body = $this->msg(\n\t\t\t\t\t'requestaccount-email-body-admin', $name )->params(\n\t\t\t\t\t\t$title->getCanonicalURL() )->inContentLanguage()->text();\n\t\t\t\t# Actually send the email...\n\t\t\t\tif ( $wgConfirmAccountContact != '' ) {\n\t\t\t\t\t$source = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->text() );\n\t\t\t\t\t$target = new MailAddress( $wgConfirmAccountContact );\n\t\t\t\t\t$result = UserMailer::send( $target, $source, $subject, $body );\n\t\t\t\t\tif ( !$result->isOK() ) {\n\t\t\t\t\t\twfDebug( \"Could not sent email to admin at $target\\n\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t# Send an email to all users with \"confirmaccount-notify\" rights\n\t\t\t\tforeach ( $adminsNotify as $adminNotify ) {\n\t\t\t\t\tif ( $adminNotify->canReceiveEmail() ) {\n\t\t\t\t\t\t$adminNotify->sendMail( $subject, $body );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out->addWikiMsg( 'requestaccount-econf' );\n\t\t\t$out->returnToMain();\n\t\t} else {\n\t\t\t# Maybe the user confirmed after account was created...\n\t\t\t$user = User::newFromConfirmationCode( $code, User::READ_LATEST );\n\t\t\tif ( is_object( $user ) ) {\n\t\t\t\t$user->confirmEmail();\n\t\t\t\t$user->saveSettings();\n\t\t\t\t$message = $reqUser->isLoggedIn()\n\t\t\t\t\t? 'confirmemail_loggedin'\n\t\t\t\t\t: 'confirmemail_success';\n\t\t\t\t$out->addWikiMsg( $message );\n\t\t\t\tif ( !$reqUser->isLoggedIn() ) {\n\t\t\t\t\t$title = SpecialPage::getTitleFor( 'Userlogin' );\n\t\t\t\t\t$out->returnToMain( true, $title );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$out->addWikiMsg( 'confirmemail_invalid' );\n\t\t\t}\n\t\t}\n\t}", "public function doSendFirstEmail()\n {\n $subject = 'Working with Example Co, Inc';\n $body = 'Hi Steve,<br><br>';\n $body .= 'Name is Alex and we met last night at the event and spoke briefly about getting more users to your site. ';\n $body .= 'I thought we had a great conversation and wanted to follow up on that. Could we set up a time to speak sometime this week?';\n $body .= '<br><br>Thank you for your time and let me know when you\\'d like to connect and I\\'d be happy to block it out.';\n $body .= '<br><br>Best,<br>Alex';\n // get up a gmail client connection\n $client = User::googleClient();\n // get the gmail service\n $gmail = new \\Google_Service_Gmail($client);\n\n // use swift mailer to build the mime\n $mail = new \\Swift_Message;\n $mail->setTo([$this->user->email]);\n $mail->setBody($body, 'text/html');\n $mail->setSubject($subject);\n $data = base64_encode($mail->toString());\n $data = str_replace(array('+','/','='),array('-','_',''),$data); // url safe\n $m = new \\Google_Service_Gmail_Message();\n $m->setRaw($data);\n $gmailMessage = $gmail->users_messages->send('me', $m);\n\n // update the DB so we can check if this feature is used\n $this->user->tutorial_email = 'yes';\n $this->user->save();\n return 'success';\n }", "function sendAccountVerificationEmail($name, $email, $hash)\n{\n $to = $email;\n $subject = 'Activate your Camagru account';\n $message = '\n \n Hello '.$name.'!\n Your Camagru account has been created. \n \n Please click this link to activate your account:\n http://localhost:8100/index.php?action=verify&email='.$email.'&hash='.$hash.'\n \n ';\n \n $headers = 'From:[email protected]' . \"\\r\\n\";\n mail($to, $subject, $message, $headers);\n}", "function notify_request_client($email) {\n\t$link = SITE_URL.'requests.php';\n\n\t$text = \"Hello,\\n\";\n\t$text .= \"\\nYou requested an appointment. You can manage your appointment below:\\n\";\n\t$text .= \"\\n<a href='$link'>Manage</a>\\n\";\n\t$text .= \"\\nThanks,\\n\";\n\t$text .= \"The Ma-Maria team\";\n\n\tif(MAIL_ENABLED) {\n\t\tmail($email, 'Ma-Maria - Request', $text);\n\t}\n}", "protected function sendTestMail() {}", "public function send_activation($email_or_username){\n\t\t$activation_key = $this->get_activation_key($email_or_username);\n\t\t$sql = \"select * from admin where email='$email_or_username' or username='$email_or_username'\";\n\t\tif ($this->num_rows($sql) == 0){\n\t\t\techo \"Username atau email yang anda masukan tidak terdaftar sebagai member di situs ini!.\";\n\t\t\texit();\n\t\t}\n\t\t$data = $this->fetchfetch($sql);\n\t\t$id = $data['id'];\n\t\t$name = $data['name'];\n\t\t$email = $data['email'];\n\t\t$today = date(\"Y-m-d\");\n\t\t$time = date(\"H:i:s\");\n\t\t$activation_link = APP_URL.$system.\"/forgot.php?act=recover&email=$email&activation=$activation_key\";\n\t\t$c_url = APP_URL;\n\t\t$c_admin_url = \"$c_url/$system\";\n\t\t$messages = \"\n\t\tyou has send a request for reset your password at <a target='_blank' href='$c_url'>$c_url</a> with detail<br>\n\t\tEmail : $email<br>\n\t\tUsername : $name<br>\n\t\tDate : $today - $time<br>\n\t\t<p>\n\t\tand if you really has send a request for reset your password at $c_url, so you can use this activation code for reset your password :\n\t\t<br>\n\t\t<b>Activation Code</b> : <i>$activation_key</i>\n\t\t</p>\n\t\tif you didn't request this action, so ignore this message or delete this message.\n\t\t\";\n\t\t$send = $this->send_email($email, \"Activation Link For Reset Your Password at $c_url\", $messages);\n\t\tif ($send == true){\n\t\t\treturn \"$email\";\n\t\t\texit();\n\t\t}else{\n\t\t\techo \"Failed! can't send email to $email\";\n\t\t}\n\t}", "public function emailBasedAction()\n {\n $signoffEmail = $this->em->getRepository('Fisdap\\Entity\\SignoffEmail')->findOneBy(array('email_key' => $this->_getParam('key')));\n \n // Determine what the message should be...\n // We have 4 or so states.\n // State 1 - No signoffEmail was found.\n if ($signoffEmail == null) {\n $message = \"I'm sorry, we could not find a matching shift for the provided code. Please contact customer support.\";\n // State 2 - Email has expired\n } elseif ($signoffEmail->expire_time != null && $signoffEmail->expire_time->format('U') <= time()) {\n $message = \"I'm sorry, the deadline to fill out the form for this shift has passed.\";\n // State 3 - Shift has already been signed off on\n } elseif ($signoffEmail->has_signed_off) {\n $message = \"We're sorry. It looks like someone already signed off on this shift on \" . $signoffEmail->signoff_time->format('F jS, Y \\a\\t Hi') . \".\";\n } else {\n $signoffEmail->has_signed_off = true;\n $signoffEmail->signoff_time = new \\DateTime();\n $signoffEmail->save();\n \n $message = \"Thank you, you have successfully signed off on this shift.\";\n }\n \n $this->view->message = $message;\n }", "function mail()\n {\n\n\n }", "function _send_email($type, $email,$data, $subject,$from){ \n\n $this->load->library('email'); \n $this->email->from(FROM_EMAIL, EMAIL_TITLE);\n $this->email->to($email);\n $this->email->subject($subject);\n $this->email->message($this->load->view('email/'.$type.'-html', $data, TRUE));\n if($this->email->send()){\n return true;\n }else{\n return false;\n }\n }", "public function sendEmailWithApplyLink(){\n\t}", "public function send_verification_email($account_id)\n {\n $this->load->helper('url');\n \n // Create a 64 byte random string as a key to activate the account\n $this->db->select('email');\n $this->db->where('id', $account_id);\n $this->db->limit(1);\n $account_email = $this->db->get('accounts')->row()->email;\n\n $verification_code = bin2hex(openssl_random_pseudo_bytes(32));\n $activation_url = site_url() . 'accounts/email_validation/' . $account_id . '_' . $verification_code;\n \n // Store the validation code in the DB\n $this->db->where('id', $account_id);\n $this->db->limit(1);\n $this->db->update('accounts', array('verification_code' => $verification_code));\n\n // Send the email containing the link\n\n $subject = 'Chemistry Fair UI 2016 | Verifikasi alamat email';\n\n $message = '<span style=\"font-family: Verdana\">Kami mendeteksi alamat email anda melakukan proses pendaftaran akun di website kami.';\n $message .= 'Silahkan meng-klik link ini untuk mengaktifkan akun anda. </span>';\n\n $message .= '<a href=' . \"'\" . $activation_url . \"'\" . '>Aktifkan akun Chemistry Fair anda</a>';\n\n $header = \"From:[email protected] \\r\\n\";\n $header .= \"MIME-Version: 1.0\\r\\n\";\n $header .= \"Content-type: text/html\\r\\n\";\n\n return mail($account_email, $subject, $message, $header) ? true : false;\n }", "private function sendBetaCodeEmail($email) {\n $this->dispatch(new SendBetaCodeEmail($email));\n }", "public function send() {\n $to = Yii::app()->params['adminEmail'];\n $subject = $this->subject;\n $message = $this->body;\n @mail($to, $subject, $message);\n }", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "function sendVerifEmail(){\n $tempVerifCode = rand(10000, 100000);\n $_SESSION['student']['verif_code'] = $tempVerifCode; \n\n // ---------------> 2- send the email\n\n $mail = new PHPMailer(true); // Passing `true` enables exceptions\n try {\n //Server settings\n \n $mail->isSMTP(); // Set mailer to use SMTP\n $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = '[email protected]'; // SMTP username\n $mail->Password = 'EM@12345'; // SMTP password\n $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted\n $mail->Port = 587; // TCP port to connect to\n\n //Recipients\n $mail->setFrom('[email protected]');\n $mail->addAddress($_POST['email']); // Add a recipient\n\n $body = \"<h3>Examination Management System Authentication</h3>\";\n $body .= \"<p>Your verification code is : <strong>$tempVerifCode</strong></p>\";\n\n //Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = 'EMS verification';\n $mail->Body = $body;\n $mail->AltBody = strip_tags($body); // for the people who recive email without have html editor, will be show in plain text\n\n $mail->send();\n\n } catch (Exception $e) {\n //echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;\n }\n\n }", "public function send()\n\t{\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$model = $this->getModel('Mail');\n\t\tif ($model->send())\n\t\t{\n\t\t\t$type = 'message';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$msg = $model->getError();\n\t\t$this->setredirect('index.php?option=com_users&view=mail', $msg, $type);\n\t}", "function widraw_amount_request_mail($send_data)\n {\n $to_email_address = $send_data['sender_email'];\n $subject = $send_data['subject'];\n $message = 'Hi, '.ucfirst($send_data['sender_name']).' '.$send_data['message'];\n $data['msg'] = $message;\n $mess = $this->load->view('mailer/email_template', $data, true);\n $result_dfee = $this->common_model->sendEmails($to_email_address, $subject, $mess);\n if ($result_dfee) {\n return true;\n } else {\n return false;\n }\n }", "function paid_sendEmail_owner($details) {\n\t\t\t\t$currencycode = $details->currCode;\n\t\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\n\t\t\t\t$sendto = $this->ownerEmail($details->module, $details->itemid);\n\t\t\t\t$sitetitle = \"\";\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"<h4><b>Booking Paid Successfully</b></h4>\";\n\t\t\t\t$message .= \"Invoice No.: \" . $invoiceid . \".<br>\";\n\t\t\t\t//$message .= \"Payment Method: \" . $paymethod . \".<br><br>\";\n\t\t\t\t$message .= \"Deposit Amount: \" . $currencycode . \" \" . $currencysign . $deposit . \"<br>\";\n\t\t\t\t$message .= \"Total Amount: \" . $currencycode . \" \" . $currencysign . $totalamount . \"<br><br>\";\n\t\t\t\t$message .= \"<h4><b>Customer Information</b></h4>\";\n\t\t\t\t$message .= \"Customer ID: \" . $custid . \"<br>\";\n\t\t\t\t$message .= \"Name : \" . $name . \"<br>\";\n\t\t\t\t$message .= \"Email : \" . $custemail . \"<br>\";\n\t\t\t\t$message .= \"Country : \" . $country . \"<br>\";\n\t\t\t\t$message .= \"Phone : \" . $phone . \"<br>\";\n\t\t\t\t$message .= \"<br> To view Invoice <a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$message .= $this->mailFooter;\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "private function sendConfirmationEmail(\\User $user, $confirmationCode, $newDn){\n $portal_url = \\Factory::getConfigService()->GetPortalURL();\n //echo $portal_url;\n //die();\n\n $link = $portal_url.\"/index.php?Page_Type=User_Validate_DN_Change&c=\".$confirmationCode;\n $subject = \"Validation of changes on your GOCDB account\";\n $body = \"Dear GOCDB User,\\n\\n\"\n .\"A request to retrieve and associate your GOCDB account and privileges with a \"\n . \"new account ID has just been made on GOCDB (e.g. you have a new certificate with a different DN).\"\n .\"\\n\\nThe new account ID is: $newDn\"\n .\"\\n\\nIf you wish to associate your GOCDB account with this account ID, please validate your request by clicking on the link below:\\n\"\n .\"$link\".\n \"\\n\\nIf you did not create this request in GOCDB, please immediately contact [email protected]\" ;\n ;\n //If \"sendmail_from\" is set in php.ini, use second line ($headers = '';):\n //$headers = \"From: [email protected]\";\n $headers = \"From: [email protected]\";\n //$headers = \"\";\n\n //mail command returns boolean. False if message not accepted for delivery.\n if (!mail($user->getEmail(), $subject, $body, $headers)){\n throw new \\Exception(\"Unable to send email message\");\n }\n\n //echo $body;\n }", "private function sendEmail()\n\t{\n\t\t// Get data\n\t\t$config = JFactory::getConfig();\n\t\t$mailer = JFactory::getMailer();\n\t\t$params = JComponentHelper::getParams('com_code');\n\t\t$addresses = $params->get('email_error', '');\n\n\t\t// Build the message\n\t\t$message = sprintf(\n\t\t\t'The sync cron job on developer.joomla.org started at %s failed to complete properly. Please check the logs for further details.',\n\t\t\t(string) $this->startTime\n\t\t);\n\n\t\t// Make sure we have e-mail addresses in the config\n\t\tif (strlen($addresses) < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$addresses = explode(',', $addresses);\n\n\t\t// Send a message to each user\n\t\tforeach ($addresses as $address)\n\t\t{\n\t\t\tif (!$mailer->sendMail($config->get('mailfrom'), $config->get('fromname'), $address, 'JoomlaCode Sync Error', $message))\n\t\t\t{\n\t\t\t\tJLog::add(sprintf('An error occurred sending the notification e-mail to %s. Error: %s', $address, $e->getMessage()), JLog::INFO);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "public function sendnotificationemails($type,$to,$subject,$username,$linkhref){\r\n\r\n $bodyhead=\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\n <html xmlns='http://www.w3.org/1999/xhtml'>\r\n <head>\r\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\r\n <title>\".$this->getsettings('sitetitle','text').\"</title>\r\n </head><body>\";\r\n if( $this->getsettings('email','logoshow') == '1' ) {\r\n $body = \"<img src='\".$this->getsettings('logo','url').\"' alt='\".$this->getsettings('sitetitle','text').\"' title='\".$this->getsettings('sitetitle','text').\"'/>\";\r\n }\r\n else {\r\n $body = '';\r\n }\r\n\r\n $link = \"<a href='\".$linkhref.\"'>\".$this->getsettings($type,'linktext').\"</a>\";\r\n $emContent = $this->getsettings($type,'text');\r\n $emContent = str_replace(\"[username]\",$username,$emContent);\r\n $emContent = str_replace(\"[break]\",\"<br/>\",$emContent);\r\n $emContent = str_replace(\"[linktext]\",$link,$emContent);\r\n\r\n $body .=\"<p>\".$emContent.\"</p>\";\r\n\r\n $from = $this->getsettings('email','fromname');\r\n $from_add = $this->getsettings('email','fromemail');\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\r\n $headers .= \"From: =?UTF-8?B?\". base64_encode($from) .\"?= <$from_add>\\r\\n\" .\r\n 'Reply-To: '.$from_add . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n mail($to,$subject,$bodyhead.$body.'</body></html>',$headers, '-f'.$from_add);\r\n\r\n if( $type == 'forgotpwdemail' ) {\r\n return '7#email';\r\n }\r\n else {\r\n return '7#register';\r\n }\r\n\r\n die();\r\n\t}", "public function email()\n\t{\n\t\t$email = trim($this->input->post('email'));\n\t\t$title = trim($this->input->post('subject'));\n\t\t$message = trim($this->input->post('message'));\n\n\t\t$this->load->helper('email_helper');\n\n\t\t$to = $email;\n\t\t$subject = 'Interview Message | OnJob Portal';\n\t\t$message = '<p>Subject: '.$title.'</p>\n\t\t<p>Message: '.$message.'</p>' ;\n\n\t\t$email = sendEmail($to, $subject, $message, $file = '' , $cc = '');\n\t\t\n\t\tif(trim($email)=='success'){\n\t\t\techo 'Email has been sent successfully';\n\t\t}else {\n\t\t\techo 'There is a problem while sending email';\n\t\t}\n\t}", "function sending_activation_email($data, &$content) {\n\t\t// Create content\n\t\t$site_name = isset($this->settings['site_name'])?$this->settings['site_name']:$this->ci->config->item('DX_website_name');\n\t\t$content = sprintf(\n\t\t\t\t$this->ci->lang->line('auth_activate_content'), \n\t\t\t\t$site_name, \n\t\t\t\t$data['activate_url'],\n\t\t\t\t$this->ci->config->item('DX_email_activation_expire') / 60 / 60,\n\t\t\t\t$data['username'], \n\t\t\t\t$data['email'],\n\t\t\t\t$data['password'],\n\t\t\t\t$site_name\n\t\t\t);\n\t}", "function _send_email($to)\n{\n $subject = \"Volunteer Management - Someone needed Help!\";\n\n $message = \"Please comeback! Someone need help!\";\n\n $subject = \"=?UTF-8?B?\" . base64_encode($subject) . \"?=\";\n\n $headers[] = 'From: Team Shunno <no-replay@' . $GLOBALS['c_domain'] . '>';\n $headers[] = 'Content-Type: text/html; charset=UTF-8';\n\n return mail($to, $subject, $message, implode(\"\\r\\n\", $headers));\n}", "public function sendRegistrationEmail()\n {\n $loginToken=$this->extractTokenFromCache('login');\n\n $url = url('register/token',$loginToken);\n Mail::to($this)->queue(new RegistrationConfirmationEmail($url));\n }", "function sendEmail($user, $email, $loginInfo){\n\t$to = $email; // Send email to our user\n\t$subject = 'Signup | Verification'; // Give the email a subject \n\t$message = '\n\t \n\tThanks for signing up!\n\tYour account has been created, please verify your account in order to set up your password for your login.\n\t \n\t------------------------\n\tUsername: '.$user.'\n\tPassword: To be added\n\t------------------------\n\t \n\tPlease click this link to activate your account:\n\thttps://www.kobackproducts.ca/editoroverlay/verify.php?email='.$email.'&hash='.$loginInfo.''; // Our message above including the link\n\t\n\t$headers = 'From:[email protected]' . \"\\r\\n\"; // Set from headers\n\tmail($to, $subject, $message, $headers); // Send our email\n\t\n}", "function send_verification_mail($name, $destination_address, $token){\n\t$subject=\"Verifkasi Member\";\n\t$verification_link=\"http://localhost/campus/user_email_verification_process.php?token=$token\";\n\t$content=\"Hi, $name\\nKlik link di bawah ini untuk mengkonfirmasi registrasi anda:\\n$verification_link\";\n\tsend_mail($destination_address, $subject, $content);\n}", "public function resetPasswordSendEmail()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $studentEmail = SCMUtility::stripTags($_POST['forgot_password_email']);\n\n // create token\n $token = uniqid('',true);\n\n // start session reset password\n $this->resetPasswordSessionActivate($token);\n\n // get student\n $student = User::where('email',$studentEmail)->first();\n\n if( ! $student )\n {\n SCMUtility::setFlashMessage('Sorry, we cannot find any user associated with that email address.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // send password reset link to email\n $studentMailerService = new StudentMailerService();\n $studentMailerService->sendResetPasswordLink($student->email,$token,$student->id);\n\n SCMUtility::setFlashMessage('A reset password link has been sent to your email. Open your email and follow the link to reset your account password. Please do not close this browser during the process. (If you are not receiving a password reset email, consider contacting me directly.)');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }", "public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }" ]
[ "0.7762881", "0.7631358", "0.73392266", "0.7300904", "0.7149451", "0.71326524", "0.7075153", "0.70750207", "0.702558", "0.69258904", "0.6921675", "0.6874571", "0.68645364", "0.6823952", "0.6810047", "0.6762862", "0.6736186", "0.67110956", "0.6654053", "0.66478795", "0.6618513", "0.66000974", "0.659918", "0.6598732", "0.6586989", "0.6510283", "0.64844173", "0.6480672", "0.6474057", "0.64677095", "0.64672726", "0.6451801", "0.644204", "0.64416945", "0.64045984", "0.6394818", "0.6371622", "0.6350309", "0.63501734", "0.6343881", "0.6334971", "0.633394", "0.63338417", "0.63320446", "0.6328298", "0.6325759", "0.6312856", "0.6309427", "0.6308281", "0.629772", "0.62865907", "0.6281407", "0.62672293", "0.62611204", "0.6261073", "0.6256713", "0.62558055", "0.6253281", "0.6249131", "0.6242014", "0.62406886", "0.6239471", "0.6225338", "0.62252814", "0.62167674", "0.62137485", "0.62048376", "0.6202097", "0.62004894", "0.6191183", "0.6186276", "0.6180098", "0.6177457", "0.61691767", "0.6161789", "0.6155707", "0.61352277", "0.6125231", "0.61224014", "0.61170673", "0.6116411", "0.61162347", "0.61156577", "0.61145556", "0.6109903", "0.6102126", "0.60996205", "0.6098007", "0.609119", "0.6090004", "0.6089254", "0.6088571", "0.6085754", "0.6085049", "0.6083381", "0.6083244", "0.6080883", "0.6077251", "0.60636973", "0.60589325" ]
0.66403
20
/start of register request
public function register(Request $request) { $error ="Request error"; $success = "success request"; $user_data = array(); $rules = [ 'name' =>'required', 'email' => 'required|email|unique:users', 'password'=> 'required|min:6', 'mobile'=>'required|numeric', 'country_id'=>'required|numeric', 'city_id'=>'required|numeric', 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', ]; $validator = Validator::make(request()->all(),$rules); $validation_errors = $validator->errors(); if($validator->fails()){ result(401,$validation_errors->first(), null); } else{ $password = Hash::make($request->password); $imageName = time().'.'.$request->image->extension(); $user = new User; $user->name = request('name'); $user->email = request('email'); $user->password = $password; $user->mobile = request('mobile'); $user->country_id = request('country_id'); $user->city_id = request('city_id'); $user->image = $imageName; $user->api_token = Str::random(60); $user->created_at = new \DateTime(); $user->updated_at = new \DateTime(); $user->verify_code = rand(1000,9000); $code = $user->verify_code; $user->save(); $request->image->move('images/users', $imageName); $user_id = $user->id; if(!empty($user->id)){ // AuthController::sendCode($user->email , $user->verify_code); $data = [ 'email'=>$user->email, 'code'=>$user->verify_code ]; if(SendEmailController::mail($data) == true){ result(200 ,null,null); } else{ result(401 , 'sending Email Error', null); } } else{ result(401 , $error ,$user_data); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register(){}", "public function onRegister();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register()\n {\n // maybe something, one day\n }", "abstract public function register ( );", "public function register() {}", "abstract public function register();", "abstract public function register();", "abstract public function register();", "public function register(): void;", "public function registration()\n {\n \n }", "public function _register()\n {\n }", "public function register()\n {\n $this->registration->execute([],$this);\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register()\n\t{\n\t\t\n\t}", "public function register(){\r\n\r\n }", "public function register()\r\n {\r\n //\r\n\t}", "public function register(): void\n {\n\n }", "abstract public function Register();", "public function register()\n\t{\n //\n\t}", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(){\n $this->registration->execute([], $this);\n }", "abstract public function onRegister(): void;", "protected static function register() {}", "function register()\n {\n \t\t$data = file_get_contents('php://input');\n \t\t$this->logservice->log($this->module_name, \"DEBUG\",\"EVENT\",$this->IP,\"$data \");\n\t\t$busData = json_decode($data ,true);\n\t\t//查找是否有重名\n\t\t$criteria = array();\n\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"]);\n\t\t$result = $this->User->count_results($criteria);\n\n\t\tif ($result > 0) {\n\t\t\t$rspData[\"userID\"] =0;\n\t\t\t$rspData[\"state\"] = \"ERRO\";\n\t\t\t$rspData[\"erroInfo\"] = \"该用户名已经被使用\";\n\n\t\t\t$rspInfo = json_encode($rspData);\n\t\t\techo $rspInfo;\n\t\t\treturn;\n\t\t}\n\t\t$data_in = array();\n\t\t$data_in[\"Role_Id\"] = 2;\n\t\t$data_in[\"Password\"] = $busData[\"password\"];\n\t\t$data_in[\"Name\"] = $busData[\"name\"];\n\t\t$data_in[\"Phone\"] = $busData[\"name\"];\n\t\t$data_in[\"UpLoad\"] = 0;\n\t\t$data_in[\"DownLoad\"] = 0;\n\t\t$data_in[\"Status\"] = 0;\n \n\t\t$result = $this->User->create($data_in);\n\t\tif ($result) {\n\t\t\t$criteria = array();\n\t\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"]);\n\t\t\t$userDat = $this->User->read($criteria);\n\t\t\tif (!empty($userDat)) {\n\t\t\t\t\n\t\t\t\t$rspData[\"userID\"] =$userDat[0][\"User_Id\"];\n\t\t\t\t$rspData[\"state\"] = \"OK\";\n\t\t\t\t$rspData[\"erroInfo\"] = \"注册成功ID为\".$userDat[0][\"User_Id\"];\n\n\t\t\t\t$rspInfo = json_encode($rspData);\n\t\t\t\techo $rspInfo;\n\t\t\t}\n\n\t\t}\n }", "public function register()\r\n\t{\r\n\r\n\t}", "public function register()\r\n\t{\r\n\r\n\t}", "public function register()\r\n\t{\r\n\r\n\t}", "public function register(){\n\n\t}", "public function registerAction()\n {\n Lb_Points_Helper_Data::debug_log(\"Registration request sent to LB\", true);\n $txtName = $_POST['txtName'];\n $txtEmail = $_POST['txtEmail'];\n $txtPhoneNumber = $_POST['txtPhoneNumber'];\n $result = Lb_Points_Helper_Data::registerUser($txtName,$txtEmail,$txtPhoneNumber);\n echo json_encode($result);\n }", "private function _registerStart()\n\t{\n\t\tglobal $MySmartBB;\n\t\t\n\t\t$MySmartBB->func->showHeader( $MySmartBB->lang[ 'template' ][ 'registering' ] );\n\t\t\n\t\t$MySmartBB->_POST[ 'username' ] \t= \ttrim( $MySmartBB->_POST[ 'username' ] );\n\t\t$MySmartBB->_POST[ 'email' ] \t\t= \ttrim( $MySmartBB->_POST[ 'email' ] );\n\t\t\n\t\t// ... //\n\t\t\n\t\t// A long list of checks before registeration\n\t\t$this->__checkFieldsValidity();\n\t\t$this->__checkAlreadyUsed();\n\t\t$this->__checkBanned();\n\t\t$this->__checkConstraints();\n\t\t$this->__checkLength();\n \t\t\n \t$MySmartBB->_POST[ 'password' ] = md5( $MySmartBB->_POST[ 'password' ] );\n \t\n \t// ... //\n \t\n \t$MySmartBB->plugin->runHooks( 'register_start' );\n \t\n \t// ... //\n \t\n \t// Get the information of default group to set username style cache\n \t$MySmartBB->rec->table = $MySmartBB->table[ 'group' ];\n\t\t$MySmartBB->rec->filter = \"id='\" . $MySmartBB->_CONF[ 'info_row' ][ 'def_group' ] . \"'\";\n\t\t\n\t\t$GroupInfo = $MySmartBB->rec->getInfo();\n\t\t\n\t\t// ... //\n\t\t\n\t\t// Get the stylish username\n\t\t$style = $GroupInfo[ 'username_style' ];\n\t\t$username_style_cache = str_replace( '[username]', $MySmartBB->_POST['username'], $style );\n\t\t\n\t\t// ... //\n\t\t\n\t\t$MySmartBB->rec->table = $MySmartBB->table[ 'member' ];\n\t\t$MySmartBB->rec->fields = array(\t'username'\t\t=>\t$MySmartBB->_POST[ 'username' ],\n \t\t\t\t\t\t\t\t\t\t'password'\t\t=>\t$MySmartBB->_POST[ 'password' ],\n \t\t\t\t\t\t\t\t\t\t'email'\t\t\t=>\t$MySmartBB->_POST[ 'email' ],\n \t\t\t\t\t\t\t\t\t\t'usergroup'\t\t=>\t$MySmartBB->_CONF[ 'info_row']['def_group' ],\n \t\t\t\t\t\t\t\t\t\t'user_gender'\t=>\t$MySmartBB->_POST[ 'gender' ],\n \t\t\t\t\t\t\t\t\t\t'register_date'\t=>\t$MySmartBB->_CONF[ 'now' ],\n \t\t\t\t\t\t\t\t\t\t'user_title'\t=>\t$GroupInfo[ 'user_title' ],\n \t\t\t\t\t\t\t\t\t\t'style'\t\t\t=>\t$MySmartBB->_CONF[ 'info_row' ][ 'def_style' ],\n \t\t\t\t\t\t\t\t\t\t'username_style_cache'\t=>\t$username_style_cache);\n \t\n \t$MySmartBB->rec->get_id = true;\n \t\n \t$insert = $MySmartBB->rec->insert();\n \t\n \tif ( $insert )\n \t{\n \t\t// ... //\n \t\t\n \t\t// Update statistics\n \t\t$MySmartBB->cache->updateLastMember( $MySmartBB->_POST[ 'username' ], $MySmartBB->rec->id );\n \t\t\n \t\t// ... //\n \t\t\n \t\t$MySmartBB->plugin->runHooks( 'register_success' );\n \t\t\n \t\t// ... //\n \t\t\n \t\t// The default group requires an email activation from its members.\n \t\t// Therefore, We register a request and send the activation message to the member's email.\n \t\tif ( $MySmartBB->_CONF[ 'info_row' ][ 'def_group' ] == 5 )\n \t\t{\n \t\t\t$this->__sendActivationCode(); \t\t\t\n\t\t\t}\n\t\t\telse\n \t\t{\n \t\t\t$MySmartBB->func->msg( $MySmartBB->lang[ 'register_succeed' ] );\n \t\t\t$MySmartBB->func->move( 'index.php?page=login&amp;register_login=1&amp;username=' . $MySmartBB->_POST[ 'username' ] . '&amp;password=' . $MySmartBB->_POST[ 'password' ] );\n \t\t}\n \t}\n\t}", "public function action_register() {\n\t\t\t$this->data[] = 0; // record_id - default for increment\n\t\t\t$this->prepareMainData();\n\t\t\t$model = Model::factory($this->modelName)->registerRecord($this->data);\n\t\t\tif ($model) $this->request->redirect($this->redirectURL);\n\t\t\n\t}", "public function doRegister(){\n\t\t\t$requestUser = $this->registerView->getRequestUserName();\n\t\t\t$requestPassword = $this->registerView->getRequestPassword();\n\t\t\t$requestRePassword = $this->registerView->getRequestRePassword();\n\t\t\t\n\t\t\tif($this->registerView->didUserPressRegister() ){\n\t\t\t\ttry{\n\t\t\t\tif($this->checkUsername($requestUser) && $this->checkPassword($requestPassword,$requestRePassword)){\n\t\t\t\t\t//create and add new user\n\t\t\t\t\t$newUser = new User($requestUser,$requestPassword);\n\t\t\t\t\t$this->userList->add($newUser);\n\t\t\t\t\t\n\t\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t\t$this->model->setSessionUsername($requestUser);\n\t\t\t\t\t$this->navView->clearURL();\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\tcatch (UserFewCharException $ufce){\n\t\t\t\t\t$this->registerView->setErrorUsernameFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (UserBadCharException $udce){\n\t\t\t\t\t$this->registerView->setErrorUsernameInvalidChar();\n\t\t\t\t\t$this->registerView->setUsernameField(strip_tags($requestUser));\n\t\t\t\t} \n\t\t\t\tcatch (UserExistsException $uee){\n\t\t\t\t\t$this->registerView->setErrorUsernameExists();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordLenException $ple){\n\t\t\t\t\t$this->registerView->setErrorPasswordFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordMissmatchException $pme){\n\t\t\t\t\t$this->registerView->setErrorPasswordMatch();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t\tif(empty($requestUser) && empty($requestPassword) && empty($requestRePassword))\n\t\t\t\t\t$this->registerView->setErrorMissingFields();\t\t\n\t\t\t}\n\t\t}", "public function register() \n\t{\n $referer = isset($_GET['referer']) ? htmlentities($_GET['referer'], ENT_QUOTES) : '';\n\t\t\n\t\t$this->View->RenderMulti(['_templates/header','user/register']);\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n \r\n }", "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}", "public function register()\n {\n //\n\t\t\n }", "public function register() {\n\t\t$result = $this->Member_Model->get_max_id();\n\t\t$current_next_id = $result + 1;\n\n\t\t$this->breadcrumbs->set(['Register' => 'members/register']);\n\t\t$data['api_reg_url'] = base64_encode(FINGERPRINT_API_URL . \"?action=register&member_id=$current_next_id\");\n\n\t\tif ($this->session->userdata('current_finger_data')) {\n\t\t\t$this->session->unset_userdata('current_finger_data');\n\t\t}\n\n\t\t$this->render('register', $data);\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "public function register(): void\n {\n $response = $this->signedPostRequest('acme/new-acct', [\n 'termsOfServiceAgreed' => true,\n ], true);\n $this->kid = $response->getHeader('Location')[0];\n }", "public function doRegister()\n {\n\n //check if all the fields are filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity based on filled data\n $userEntity = new User(Request::postData());\n\n //check if the user exists and get it as entity if exists\n if ($this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username/email already exists!\", \"type\" => \"error\")));\n exit;\n }\n\n //add the user into DB\n $this->repository->addUser($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"Your account has been created!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "public function registerAction() {\n $request = $this->getRequest();\n\n $fp = new Champs_Form_Account_Register($this->em);\n\n if ($request->isPost()) {\n // get the hash\n $hash = $request->getPost('hash');\n\n if ($this->checkHash($hash)) {\n if ($fp->process($request)) {\n $session = new Zend_Session_Namespace('registration');\n $session->user_id = $fp->user->id;\n $this->_redirect($this->getUrl('complete'));\n }\n }\n }\n\n // setup hash\n $this->initHash();\n // assign form to view\n $this->view->fp = $fp;\n }", "public function register() \n {\n \n\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n\t{\n\n\t}", "public function register()\n\t{\n\n\t}", "public function register()\n\t{\n\n\t}", "public function register()\n\t{\n\n\t}", "public function register(): bool\n {\n\n $serverInfo = new ServerInfo();\n $serverInfo->setServerName(self::$rpcClientConfig->getServerName());\n $serverInfo->setAddress(new Ipv4Address([\n 'ip' => self::$rpcClientConfig->getListen(),\n 'port' => self::$rpcClientConfig->getPort()\n ]));\n $d = $serverInfo->toArray();\n $d['address'] = $serverInfo->getAddress()->toArray();\n $data = new RequestDataMsg([\n 'eventName' => 'register',\n 'data' => $d\n ]);\n $res = $this->sendRequest($data);\n if ($res->getResult() == 1) {\n echo self::$rpcClientConfig->getServerName() . '------------------------注册成功';\n return true;\n }\n return false;\n }", "public function register()\n {\n\t\t\t//\n }", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function Register(){\n\n }", "public function register()\n {\n //\n }", "private function _registerForm()\n\t{\n\t\tglobal $MySmartBB;\n\t\t\n\t\t$MySmartBB->func->showHeader( $MySmartBB->lang[ 'template' ][ 'registering' ] );\n\t\t\n\t\t$MySmartBB->plugin->runHooks( 'register_main' );\n\t\t\n\t\t$MySmartBB->template->display( 'register' );\n\t}", "public function register() {\n\t\t$user_email = $this->input->post(\"email\");\n\t\t$user_password = md5($this->input->post('password'));\n\t\t$user_reg_ip = ip2long($this->input->ip_address());\n\t\t\n\t\t$re = $this->user_lib->save_reg_userInfo($user_email,$user_password,$user_reg_ip);\n\t\t\n\t\tif($re===false){\n\t\t\t//set mc error\n\t\t}\n\t\t/*if(!$this->email_lib->send_active_email($user_email)){\n\t\t\t//send mail error\n\t\t}*/\n\t\t$uid = $this->user_lib->active_process($user_email);\n\t\tif($uid===false){\n\t\t\treturn false;\t\t//for active error\n\t\t}\n\t//\t$this->_set_login_cookie($uid);\n\t\tredirect('/regsuccess'); \n\t}" ]
[ "0.73897564", "0.73803467", "0.7361237", "0.7361237", "0.7361237", "0.7361237", "0.7361237", "0.7361237", "0.7361237", "0.7361237", "0.7320427", "0.7292512", "0.729003", "0.7254866", "0.7254866", "0.7254866", "0.72322065", "0.71015394", "0.7088639", "0.7076044", "0.7055907", "0.7055907", "0.7055907", "0.7055907", "0.7055907", "0.7054149", "0.70261383", "0.7020789", "0.7014628", "0.7011266", "0.7011132", "0.7009175", "0.7009175", "0.7009175", "0.7009175", "0.7009175", "0.69948816", "0.69879407", "0.6960561", "0.69454163", "0.6944334", "0.6944334", "0.6944334", "0.6933737", "0.69123334", "0.6873237", "0.6869485", "0.6851211", "0.68433625", "0.6819242", "0.6819242", "0.6819242", "0.6819242", "0.68100625", "0.67800134", "0.67785096", "0.67749536", "0.67743033", "0.67743033", "0.67743033", "0.67743033", "0.6773248", "0.6771383", "0.67707956", "0.6760034", "0.67367667", "0.6733484", "0.6733484", "0.67208624", "0.67208624", "0.67208624", "0.67208624", "0.67189485", "0.671115", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.67014956", "0.6695006", "0.6676047", "0.66602993", "0.66554576" ]
0.0
-1
/end of register request /start of profile request
public function logout(Request $request){ $error ="Request error"; $success = "success request"; $rules = [ "user_id" =>'required', "api_token" => 'required' ]; $validator = Validator::make(request()->all() , $rules); if($validator->fails()){ result(401 , $validator->messages(),null); } else{ if(User::where('id',request('user_id'))->update(['api_token'=>null])) { result(200 , $success,null); } else{ result(401, $error, null); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function preProcess() {\n $this->request->setParameter('fromReg','1');\n $this->objController->forward('profile','dpp');\n die;\n }", "public function register() {\n\t\t$result = $this->Member_Model->get_max_id();\n\t\t$current_next_id = $result + 1;\n\n\t\t$this->breadcrumbs->set(['Register' => 'members/register']);\n\t\t$data['api_reg_url'] = base64_encode(FINGERPRINT_API_URL . \"?action=register&member_id=$current_next_id\");\n\n\t\tif ($this->session->userdata('current_finger_data')) {\n\t\t\t$this->session->unset_userdata('current_finger_data');\n\t\t}\n\n\t\t$this->render('register', $data);\n\t}", "public function Register()\n\t{\n $this->redirectUserLoggedIn();\n\t\t$locations=$this->fetch->getInfo('locations');\n\t\t$services_nav=$this->fetch->getInfo('services',5);\n\t\t$web=$this->fetch->getWebProfile('webprofile');\n\t\t$this->load->view('header',['title'=>'Register',\n 'locations'=>$locations,\n 'services_nav'=>$services_nav,\n\t\t\t\t\t\t\t\t'web'=>$web\n\t\t\t\t\t\t]\n\t\t\t\t\t);\n\t\t$this->load->view('register');\n\t\t$this->load->view('footer');\n\t\t$this->load->view('custom_scripts');\n }", "private function _registerStart()\n\t{\n\t\tglobal $MySmartBB;\n\t\t\n\t\t$MySmartBB->func->showHeader( $MySmartBB->lang[ 'template' ][ 'registering' ] );\n\t\t\n\t\t$MySmartBB->_POST[ 'username' ] \t= \ttrim( $MySmartBB->_POST[ 'username' ] );\n\t\t$MySmartBB->_POST[ 'email' ] \t\t= \ttrim( $MySmartBB->_POST[ 'email' ] );\n\t\t\n\t\t// ... //\n\t\t\n\t\t// A long list of checks before registeration\n\t\t$this->__checkFieldsValidity();\n\t\t$this->__checkAlreadyUsed();\n\t\t$this->__checkBanned();\n\t\t$this->__checkConstraints();\n\t\t$this->__checkLength();\n \t\t\n \t$MySmartBB->_POST[ 'password' ] = md5( $MySmartBB->_POST[ 'password' ] );\n \t\n \t// ... //\n \t\n \t$MySmartBB->plugin->runHooks( 'register_start' );\n \t\n \t// ... //\n \t\n \t// Get the information of default group to set username style cache\n \t$MySmartBB->rec->table = $MySmartBB->table[ 'group' ];\n\t\t$MySmartBB->rec->filter = \"id='\" . $MySmartBB->_CONF[ 'info_row' ][ 'def_group' ] . \"'\";\n\t\t\n\t\t$GroupInfo = $MySmartBB->rec->getInfo();\n\t\t\n\t\t// ... //\n\t\t\n\t\t// Get the stylish username\n\t\t$style = $GroupInfo[ 'username_style' ];\n\t\t$username_style_cache = str_replace( '[username]', $MySmartBB->_POST['username'], $style );\n\t\t\n\t\t// ... //\n\t\t\n\t\t$MySmartBB->rec->table = $MySmartBB->table[ 'member' ];\n\t\t$MySmartBB->rec->fields = array(\t'username'\t\t=>\t$MySmartBB->_POST[ 'username' ],\n \t\t\t\t\t\t\t\t\t\t'password'\t\t=>\t$MySmartBB->_POST[ 'password' ],\n \t\t\t\t\t\t\t\t\t\t'email'\t\t\t=>\t$MySmartBB->_POST[ 'email' ],\n \t\t\t\t\t\t\t\t\t\t'usergroup'\t\t=>\t$MySmartBB->_CONF[ 'info_row']['def_group' ],\n \t\t\t\t\t\t\t\t\t\t'user_gender'\t=>\t$MySmartBB->_POST[ 'gender' ],\n \t\t\t\t\t\t\t\t\t\t'register_date'\t=>\t$MySmartBB->_CONF[ 'now' ],\n \t\t\t\t\t\t\t\t\t\t'user_title'\t=>\t$GroupInfo[ 'user_title' ],\n \t\t\t\t\t\t\t\t\t\t'style'\t\t\t=>\t$MySmartBB->_CONF[ 'info_row' ][ 'def_style' ],\n \t\t\t\t\t\t\t\t\t\t'username_style_cache'\t=>\t$username_style_cache);\n \t\n \t$MySmartBB->rec->get_id = true;\n \t\n \t$insert = $MySmartBB->rec->insert();\n \t\n \tif ( $insert )\n \t{\n \t\t// ... //\n \t\t\n \t\t// Update statistics\n \t\t$MySmartBB->cache->updateLastMember( $MySmartBB->_POST[ 'username' ], $MySmartBB->rec->id );\n \t\t\n \t\t// ... //\n \t\t\n \t\t$MySmartBB->plugin->runHooks( 'register_success' );\n \t\t\n \t\t// ... //\n \t\t\n \t\t// The default group requires an email activation from its members.\n \t\t// Therefore, We register a request and send the activation message to the member's email.\n \t\tif ( $MySmartBB->_CONF[ 'info_row' ][ 'def_group' ] == 5 )\n \t\t{\n \t\t\t$this->__sendActivationCode(); \t\t\t\n\t\t\t}\n\t\t\telse\n \t\t{\n \t\t\t$MySmartBB->func->msg( $MySmartBB->lang[ 'register_succeed' ] );\n \t\t\t$MySmartBB->func->move( 'index.php?page=login&amp;register_login=1&amp;username=' . $MySmartBB->_POST[ 'username' ] . '&amp;password=' . $MySmartBB->_POST[ 'password' ] );\n \t\t}\n \t}\n\t}", "public function actionRegister() {\n\t\tif (isset($_GET['newModel']) && isset(Yii::app()->session[$this->createBackup.'_Time']) && $_GET['newModel']>Yii::app()->session[$this->createBackup.'_Time']){\n\t\t\t\tunset(Yii::app()->session[$this->createBackup]);\n\t\t\t\tunset(Yii::app()->session[$this->createBackup.'_Time']);\n\t\t\t\tunset($_GET['newModel']);\n\t\t}\n\t\t\n\t\t$Session_Profiles_Backup = Yii::app()->session[$this->createBackup];\n\t\tif (isset($Session_Profiles_Backup)){\n\t\t\t$model = $Session_Profiles_Backup;\n\t\t\t$model->setScenario('register');\n\t\t} else {\n\t\t\t$model=new Profiles('register');\n\t\t}\n\t\t// uncomment the following code to enable ajax-based validation \n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='profiles-register-form') { \n\t\t\techo CActiveForm::validate($model); \n\t\t\tYii::app()->end(); \n\t\t}\n\t\tif(isset($_POST['Profiles'])) \n\t\t{\n\t\t\t$model->attributes=$_POST['Profiles'];\n\t\t\tif (isset($model->birthday_year) && $model->birthday_year != ''){\n\t\t\t\tif ($model->birthday_month == ''){\n\t\t\t\t\t$model->birthday_month = '01';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ($model->birthday_day == ''){\n\t\t\t\t\t$model->birthday_day = '01';\n\t\t\t\t}\n\t\t\t\t$model->PRF_BIRTHDAY = date_create_from_format('Y-m-d', $model->birthday_year . '-' . $model->birthday_month . '-' . $model->birthday_day)->getTimestamp();\n\t\t\t} else {\n\t\t\t\t$model->PRF_BIRTHDAY = null;\n\t\t\t}\n\t\t\t\n\t\t\tYii::app()->session[$this->createBackup] = $model;\n\t\t\tYii::app()->session[$this->createBackup.'_Time'] = time();\n\t\t\tif($model->validate()) {\n\t\t\t\t// all entered values are valid and no constraint has been violated\n\t\t\t\t\n\t\t\t\t// set default values\n\t\t\t\t$model->PRF_ACTIVE = 0;\n\n\t\t\t\t// generate random number for registration link:: needs to be unique\n\t\t\t\t$model->PRF_RND = Randomness::blowfishSalt();\n\t\t\t\t//$found = Profiles::model()->findByAttributes(array('PRF_RND'=>$model->PRF_RND));\n\t\t // while($found !== null) {\n\t\t // $model->PRF_RND = Randomness::blowfishSalt();\n\t\t // $found = Profiles::model()->findByAttributes(array('PRF_RND'=>$model->PRF_RND));\n\t\t // }\n\t\t\t\t\n\t\t\t\t// encrypt password\n\t\t\t\t$model->PRF_PW = crypt($model->PRF_PW, Randomness::blowfishSalt());\n\t\t\t\t\n\t\t\t\t// prepare encryption\n\t\t\t\t//$iterations = 0;\n\t\t\t\t\n\t\t\t\t// generate random number for salt and apply repeated crypt as hash to\n\t\t\t\t// reduce reversed brute-force decryption\n\t\t\t\t//$model->PRF_SALT = Randomness::blowfishSalt();\n\t\t\t\t//$model->PRF_PW = crypt($model->PRF_PW, $model->PRF_SALT);\n\t\t\t\t//for($i = 1; $i < $iterations; $i++) {\n\t\t\t\t//\t$hash = crypt($hash . $password, $salt);\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t\tif($model->save(false)) { //false = not validate again\n\t\t\t\t\tunset(Yii::app()->session[$this->createBackup]);\n\t\t\t\t\tunset(Yii::app()->session[$this->createBackup.'_Time']);\n\t\t\t\t\t// no errors occured during save, send verification mail & and post message\n\t\t\t\t\t//mail($model->PRF_EMAIL,$subject,$body,$headers);\n\t\t\t\t\t\n\t\t\t\t\t$this->sendVerificationMail($model);\n\t\t\t\t\tYii::app()->user->setFlash('register', sprintf($this->trans->REGISTER_REGISTER_SUCCESSFULL, $model->PRF_EMAIL));\n\t\t\t\t\t\n\t\t\t\t\t// set the session language to the newly chosen one\n\t\t\t\t\tYii::app()->session['lang'] = $model->PRF_LANG;\n\t\t\t\t\t\n\t\t\t\t\t// refresh the page to show the flash message\n\t\t\t\t\t$this->refresh();\n\t\t\t\t\t\n\t\t\t\t\t//$this->redirect(array('view','id'=>$model->PRF_UID));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//print_r($model->getErrors());\n\t\t\t}\n\t\t}\n\t\t//$this->render('register',array('model'=>$model));\n\t\t$this->checkRenderAjax('register',array('model'=>$model,));\n\t}", "function user_action_user_register($env, $vars) {\n // Prepare the response object.\n $response = new stdClass();\n $user = UserFactory::requestAction($env, $vars['data']['action'], $vars['data']);\n // Check if there are validation errors.\n if (!empty($user->getData('validation_errors'))) {\n foreach ($user->getData('validation_errors') as $error) {\n new Message($env, $error, MESSAGE_WARNING);\n }\n $response->errors = Message::burnMessages();\n }\n else {\n $username = array_pop($vars['data']['name']);\n $user = UserFactory::load($env, $username);\n $user->logIn(NULL, t('Hello %user, thank you for signing up. You are now a registered member.', array('%user' => $username)), TRUE);\n $response->redirect = NodeFactory::current($env)->getName();\n }\n\n // Encode the response JSON code.\n $response_json = json_encode($response);\n\n exit($response_json);\n}", "function Register()\r\n\t{\r\n\t\tglobal $Site;\r\n\t\t//if all the details is valid save the user on data base\r\n\t\tif ($this->IsValid())\r\n\t\t{\r\n\t\t\t$MemberID = GetID(\"member\", \"MemberID\");//getting last MemberID +1 for adding one more user\r\n\t\t\t$DateAdded = date(\"Y-m-d H:i:s\");\r\n\t\t\t$DateUpdated = $DateAdded;\r\n\t\t\t$IsEnable = 1;\r\n\t\t\t$pass = base64_encode($this->Password);\r\n\t\t\t$SQL = \"insert into member (MemberID, ProfileType, FirstName, LastName, TelNo, Email, Password, IsActive, IsEnable, DateAdded, DateUpdated) values ($MemberID, 'user', '$this->FirstName', '$this->LastName', '$this->PhoneNumber', '$this->Email', '$pass', '1' , '$IsEnable', '$DateAdded', '$DateUpdated')\";\r\n\t\t\tGetRS($SQL);\r\n\t\t\t$_SESSION['SAWMemberID'] = $MemberID;//cookie- to not allow impersonation of another user PHP gives each customer ID\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t}", "function grabUserAccountInfo(){\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\t\t\n\t\t$app \t = JFactory::getApplication();\n\t\t$session = JFactory::getSession();\n\t\t$post \t = $app->input->post->getArray();\n\t\t\n\t\t$session->set('userInfo', $post, 'register');\n\t\t\n\t\t//find step 3 or 4; step 4 = normal registration; step 3 = skip plan\n\t\t$skipPlan \t= $session->get('skipPlan', 0, 'register');\n\t\t$step = ($skipPlan) ? 'step=3' : 'step=4';\n\t\t\n\t\t$link = JRoute::_('index.php?option=com_jblance&view=guest&layout=usergroupfield&'.$step, false);\n\t\t$this->setRedirect($link);\n\t\treturn false;\n\t}", "function procRegister() {\n global $session, $form;\n /* Convert username to all lowercase (by option) */\n if (ALL_LOWERCASE) {\n $_POST['user'] = strtolower($_POST['user']);\n }\n /* Registration attempt */\n $retval = $session->register($_POST['user'], $_POST['pass'], $_POST['email']);\n\n /* Registration Successful */\n if ($retval == 0) {\n $_SESSION['reguname'] = $_POST['user'];\n $_SESSION['regsuccess'] = true;\n header(\"Location: \" . $session->referrer);\n }\n /* Error found with form */ else if ($retval == 1) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n }\n /* Registration attempt failed */ else if ($retval == 2) {\n $_SESSION['reguname'] = $_POST['user'];\n $_SESSION['regsuccess'] = false;\n header(\"Location: \" . $session->referrer);\n }\n }", "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 }", "public function register() \n\t{\n $referer = isset($_GET['referer']) ? htmlentities($_GET['referer'], ENT_QUOTES) : '';\n\t\t\n\t\t$this->View->RenderMulti(['_templates/header','user/register']);\n }", "public function register()\n {\n // Invoke the base class save method to do any preparation work\n parent::save(\"\");\n \n /************ VALIDATION **************/\n $profile = new \\DataFilter\\Profile();\n \n // Set global validation checks\n $profile->addPreFilters(['Trim', 'StripHtml']);\n $profile->setAttribs($this->getValidationAttribs(true));\n \n // Perform validation checks\n if (!$profile->check($_POST)) {\n // The form is NOT valid.\n $message = \"Validation Error:\\n\";\n $res = $profile->getLastResult();\n foreach ($res->getAllErrors() as $error) {\n $message .= \"Err: $error\\n\";\n } \n \n // Send the validation errors back to the browser\n $this->result[\"message\"] = $message;\n $this->send();\n }\n \n // The form was valid. Get the validated and transformed data from the profile.\n $data = $profile->getLastResult()->getValidData();\n \n // If we're adding a new user, ensure this email address does NOT already exist\n $email = INPUT::post(\"email\");\n $users = $this->model->getList(array(\"email\" => $email));\n if(count($users) > 0) {\n $this->result[\"message\"] = \"Sorry, an account with this email address already exists\";\n $this->send(); \n }\n \n // Hash the password\n $this->model->hashPassword($data[\"password\"], $hashed_password, $salt);\n $data[\"password\"] = $hashed_password;\n $data[\"salt\"] = $salt;\n \n // Save the client record (if id = 0 then a new record will be created)\n $id = $this->model->save(0, $data);\n \n // If we're adding a new user, we also need to add the user role.\n // Tthe role is set as the DEFAULT user role which is MYNDIE_ROLE_MEMBER (id 2) as we can't allow\n // unsecure sources to add ADMIN user roles. \n\n // Load the user bean\n $user = $this->model->get($id);\n if(!$user) {\n $this->result[\"message\"] = \"Your account could not be created\";\n $this->send(); \n }\n \n // Create the default role.\n $objRole = new \\Myndie\\Model\\Role($this->app);\n $roleBean = $objRole->get(MYNDIE_DEFAULT_USER_ROLE);\n if(!$roleBean) {\n $this->result[\"message\"] = \"Default role is invalid\";\n $this->send(); \n }\n \n $user->sharedRole[] = $roleBean; // Users to Roles is a many to many relationship so we use a shared list.\n R::store($user);\n\n // Send the OK result back, along with the ID of the new user.\n $this->OK($id); \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 remote_register() {\n\t\t$this->layout = \"ajax\";\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->loadModel('AclManagement.User');\n\t\t\tif($this->request->data['User']['password'] == $this->request->data['User']['repeat_password']) {\n\t\t\t\t\n\t\t\t\t$token = md5(time());\n\t\t\t\t$this->request->data['User']['token'] = $token;//key\n\t\t\t\t\n\t\t\t\t$this->request->data['User']['name'] = $this->request->data['UserProfile']['first_name'].\" \".$this->request->data['UserProfile']['last_name'];\n\t\t\t\t$this->request->data['User']['group_id'] = 3;\n\t\t\t\t$this->request->data['User']['status'] = 1;\n\t\t\t\t\n\t\t\t\t$this->User->create();\n\t\t\t\tif($this->User->save($this->request->data)) {\n\t\t\t\t\t$user_id = $this->User->id;\n\t\t\t\t\t$this->request->data['UserProfile']['user_id'] = $user_id;\n\t\t\t\t\t\n\t\t\t\t\t$this->User->UserProfile->create();\n\t\t\t\t\tif($this->User->UserProfile->save($this->request->data)) {\n\t\t\t\t\t\t$user = $this->User->findById($user_id);\n\t\t\t\t\t\t$user = $user['User'];\n\t\t\t\t\t\tif($this->Auth->login($user)) {\n\t\t\t\t\t\t\t$temp_answer = $this->Session->read('temp_answers');\n\t\t\t\t\t\t\tif(!empty($temp_answer)) {\n\t\t\t\t\t\t\t\t// 2 means to redirect to answer's controller to save the session based answer\n\t\t\t\t\t\t\t\techo \"2\";\n\t\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t\t} else {\t\t\t\t\t\n\t\t\t\t\t\t\t\techo \"1\";\n\t\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"0\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"0\";\n\t\t\t}\n\t\t}\n\t\texit();\n\t}", "function register() {\n\n/* ... this form is not to be shown when logged in; if logged in just show the home page instead (unless we just completed registering an account) */\n if ($this->Model_Account->amILoggedIn()) {\n if (!array_key_exists( 'registerMsg', $_SESSION )) {\n redirect( \"mainpage/index\", \"refresh\" );\n }\n }\n\n/* ... define values for template variables to display on page */\n $data['title'] = \"Account Registration - \".$this->config->item( 'siteName' );\n\n/* ... set the name of the page to be displayed */\n $data['main'] = \"register\";\n\n/* ... complete our flow as we would for a normal page */\n $this->index( $data );\n\n/* ... time to go */\n return;\n }", "function register()\n {\n \t\t$data = file_get_contents('php://input');\n \t\t$this->logservice->log($this->module_name, \"DEBUG\",\"EVENT\",$this->IP,\"$data \");\n\t\t$busData = json_decode($data ,true);\n\t\t//查找是否有重名\n\t\t$criteria = array();\n\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"]);\n\t\t$result = $this->User->count_results($criteria);\n\n\t\tif ($result > 0) {\n\t\t\t$rspData[\"userID\"] =0;\n\t\t\t$rspData[\"state\"] = \"ERRO\";\n\t\t\t$rspData[\"erroInfo\"] = \"该用户名已经被使用\";\n\n\t\t\t$rspInfo = json_encode($rspData);\n\t\t\techo $rspInfo;\n\t\t\treturn;\n\t\t}\n\t\t$data_in = array();\n\t\t$data_in[\"Role_Id\"] = 2;\n\t\t$data_in[\"Password\"] = $busData[\"password\"];\n\t\t$data_in[\"Name\"] = $busData[\"name\"];\n\t\t$data_in[\"Phone\"] = $busData[\"name\"];\n\t\t$data_in[\"UpLoad\"] = 0;\n\t\t$data_in[\"DownLoad\"] = 0;\n\t\t$data_in[\"Status\"] = 0;\n \n\t\t$result = $this->User->create($data_in);\n\t\tif ($result) {\n\t\t\t$criteria = array();\n\t\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"]);\n\t\t\t$userDat = $this->User->read($criteria);\n\t\t\tif (!empty($userDat)) {\n\t\t\t\t\n\t\t\t\t$rspData[\"userID\"] =$userDat[0][\"User_Id\"];\n\t\t\t\t$rspData[\"state\"] = \"OK\";\n\t\t\t\t$rspData[\"erroInfo\"] = \"注册成功ID为\".$userDat[0][\"User_Id\"];\n\n\t\t\t\t$rspInfo = json_encode($rspData);\n\t\t\t\techo $rspInfo;\n\t\t\t}\n\n\t\t}\n }", "public function register_fingerprint() {\n\t\t$status = $_GET['status'];\n\n\t\tif ($status === 'success') {\n\t\t\t$finger_data = array(\n\t\t\t\t'finger_id' => $_GET['finger_id'],\n\t\t\t\t'finger_data' => $_GET['finger_data'],\n\t\t\t\t'member_id' => (int)$_GET['member_id']\n\t\t\t);\n\t\t\t$this->session->set_userdata('current_finger_data', $finger_data);\n\t\t}\n\n\t\techo \"<script>window.close();</script>\";\n\t}", "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 _register_1(request $request){\n $url = '/user/registration';\n $request_param = [\n 'userId' => \"\",\n 'email' => $request->email,\n 'firstName' => $request->name,\n 'lastName' => $request->lastname,\n 'phoneNumber' => $request->phone,\n 'password' => $request->password,\n 'confirmPassword' => $request->passwordconfirm,\n 'token' =>''\n ];\n session()->put('profile', $request_param);\n $data = $this->send_request($url, $request_param);\n if($data){\n if(isset($data->result)){\n if($data->result==1){\n session()->put('user_reponse_1', $data->data);\n return redirect()->route('fontent.reg_step2')->with(['messenge'=> $data->message,'data'=>$data]);\n }\n }else{\n echo \"<pre>\";print_r($data);\n echo \"statusCode:\".$data->statusCode;\n if(isset($data->statusCode)){\n\n return redirect()->route('fontent.reg_step1')->with(['messenge'=> $data->statusCode]);\n }\n }\n }\n }", "public function registration() {\r\n \r\n if (isset($_GET[\"submitted\"])) {\r\n $this->registrationSubmit();\r\n } else {\r\n \r\n }\r\n }", "public function register() {\n\t\t$user_email = $this->input->post(\"email\");\n\t\t$user_password = md5($this->input->post('password'));\n\t\t$user_reg_ip = ip2long($this->input->ip_address());\n\t\t\n\t\t$re = $this->user_lib->save_reg_userInfo($user_email,$user_password,$user_reg_ip);\n\t\t\n\t\tif($re===false){\n\t\t\t//set mc error\n\t\t}\n\t\t/*if(!$this->email_lib->send_active_email($user_email)){\n\t\t\t//send mail error\n\t\t}*/\n\t\t$uid = $this->user_lib->active_process($user_email);\n\t\tif($uid===false){\n\t\t\treturn false;\t\t//for active error\n\t\t}\n\t//\t$this->_set_login_cookie($uid);\n\t\tredirect('/regsuccess'); \n\t}", "public function doRegister(){\n\t\t\t$requestUser = $this->registerView->getRequestUserName();\n\t\t\t$requestPassword = $this->registerView->getRequestPassword();\n\t\t\t$requestRePassword = $this->registerView->getRequestRePassword();\n\t\t\t\n\t\t\tif($this->registerView->didUserPressRegister() ){\n\t\t\t\ttry{\n\t\t\t\tif($this->checkUsername($requestUser) && $this->checkPassword($requestPassword,$requestRePassword)){\n\t\t\t\t\t//create and add new user\n\t\t\t\t\t$newUser = new User($requestUser,$requestPassword);\n\t\t\t\t\t$this->userList->add($newUser);\n\t\t\t\t\t\n\t\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t\t$this->model->setSessionUsername($requestUser);\n\t\t\t\t\t$this->navView->clearURL();\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\tcatch (UserFewCharException $ufce){\n\t\t\t\t\t$this->registerView->setErrorUsernameFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (UserBadCharException $udce){\n\t\t\t\t\t$this->registerView->setErrorUsernameInvalidChar();\n\t\t\t\t\t$this->registerView->setUsernameField(strip_tags($requestUser));\n\t\t\t\t} \n\t\t\t\tcatch (UserExistsException $uee){\n\t\t\t\t\t$this->registerView->setErrorUsernameExists();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordLenException $ple){\n\t\t\t\t\t$this->registerView->setErrorPasswordFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordMissmatchException $pme){\n\t\t\t\t\t$this->registerView->setErrorPasswordMatch();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t\tif(empty($requestUser) && empty($requestPassword) && empty($requestRePassword))\n\t\t\t\t\t$this->registerView->setErrorMissingFields();\t\t\n\t\t\t}\n\t\t}", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "public function register()\n {\n // maybe something, one day\n }", "public function createTask()\n\t{\n\t\tif (!User::isGuest() && !User::get('tmp_user'))\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=' . $this->_option . '&task=myaccount'),\n\t\t\t\tLang::txt('COM_MEMBERS_REGISTER_ERROR_NONGUEST_SESSION_CREATION'),\n\t\t\t\t'warning'\n\t\t\t);\n\t\t}\n\n\t\tif (!isset($this->_taskMap[$this->_task]))\n\t\t{\n\t\t\t$this->_task = 'create';\n\t\t\tRequest::setVar('task', 'create');\n\t\t}\n\n\t\t// If user registration is not allowed, show 403 not authorized.\n\t\t$usersConfig = Component::params('com_members');\n\t\tif ($usersConfig->get('allowUserRegistration') == '0')\n\t\t{\n\t\t\treturn App::abort(404, Lang::txt('JGLOBAL_RESOURCE_NOT_FOUND'));\n\t\t}\n\n\t\t$hzal = null;\n\t\tif (User::get('auth_link_id'))\n\t\t{\n\t\t\t$hzal = \\Hubzero\\Auth\\Link::find_by_id(User::get('auth_link_id'));\n\t\t}\n\n\t\t// Instantiate a new registration object\n\t\t$xregistration = new \\Components\\Members\\Models\\Registration();\n\n\t\tif (Request::getMethod() == 'POST')\n\t\t{\n\t\t\t// Check for request forgeries\n\t\t\tRequest::checkToken();\n\n\t\t\t// Load POSTed data\n\t\t\t$xregistration->loadPost();\n\n\t\t\t// Perform field validation\n\t\t\t$result = $xregistration->check('create');\n\n\t\t\t// Incoming profile edits\n\t\t\t$profile = Request::getArray('profile', array(), 'post');\n\n\t\t\t// Compile profile data\n\t\t\tforeach ($profile as $key => $data)\n\t\t\t{\n\t\t\t\tif (isset($profile[$key]) && is_array($profile[$key]))\n\t\t\t\t{\n\t\t\t\t\t$profile[$key] = array_filter($profile[$key]);\n\t\t\t\t}\n\t\t\t\tif (isset($profile[$key . '_other']) && trim($profile[$key . '_other']))\n\t\t\t\t{\n\t\t\t\t\tif (is_array($profile[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$profile[$key][] = $profile[$key . '_other'];\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$profile[$key] = $profile[$key . '_other'];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($profile[$key . '_other']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Validate profile data\n\t\t\t$fields = \\Components\\Members\\Models\\Profile\\Field::all()\n\t\t\t\t->including(['options', function ($option){\n\t\t\t\t\t$option\n\t\t\t\t\t\t->select('*');\n\t\t\t\t}])\n\t\t\t\t->where('action_create', '!=', \\Components\\Members\\Models\\Profile\\Field::STATE_HIDDEN)\n\t\t\t\t->ordered()\n\t\t\t\t->rows();\n\n\t\t\t// Validate profile fields\n\t\t\tif ($fields->count())\n\t\t\t{\n\t\t\t\t$form = new \\Hubzero\\Form\\Form('profile', array('control' => 'profile'));\n\t\t\t\t$form->load(\\Components\\Members\\Models\\Profile\\Field::toXml($fields, 'create', $profile));\n\t\t\t\t$form->bind(new \\Hubzero\\Config\\Registry($profile));\n\n\t\t\t\tif (!$form->validate($profile))\n\t\t\t\t{\n\t\t\t\t\t$result = false;\n\n\t\t\t\t\tforeach ($form->getErrors() as $key => $error)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($error instanceof \\Hubzero\\Form\\Exception\\MissingData)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$xregistration->_missing[$key] = $error;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$xregistration->_invalid[$key] = $error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Passed validation?\n\t\t\tif ($result)\n\t\t\t{\n\t\t\t\t// Get required system objects\n\t\t\t\t$user = clone(User::getInstance());\n\n\t\t\t\t// Initialize new usertype setting\n\t\t\t\t$newUsertype = $usersConfig->get('new_usertype');\n\t\t\t\tif (!$newUsertype)\n\t\t\t\t{\n\t\t\t\t\t$db = App::get('db');\n\t\t\t\t\t$query = $db->getQuery()\n\t\t\t\t\t\t->select('id')\n\t\t\t\t\t\t->from('#__usergroups')\n\t\t\t\t\t\t->whereEquals('title', 'Registered');\n\t\t\t\t\t$db->setQuery($query->toString());\n\t\t\t\t\t$newUsertype = $db->loadResult();\n\t\t\t\t}\n\n\t\t\t\t$user->set('username', $xregistration->get('login', ''));\n\t\t\t\t$user->set('name', $xregistration->get('name', ''));\n\t\t\t\t$user->set('givenName', $xregistration->get('givenName', ''));\n\t\t\t\t$user->set('middleName', $xregistration->get('middleName', ''));\n\t\t\t\t$user->set('surname', $xregistration->get('surname', ''));\n\t\t\t\t$user->set('email', $xregistration->get('email', ''));\n\t\t\t\t$user->set('usageAgreement', (int)$xregistration->get('usageAgreement', 0));\n\t\t\t\t$user->set('sendEmail', -1);\n\t\t\t\tif ($xregistration->get('sendEmail') >= 0)\n\t\t\t\t{\n\t\t\t\t\t$user->set('sendEmail', (int)$xregistration->get('sendEmail'));\n\t\t\t\t}\n\n\t\t\t\t// Set home directory\n\t\t\t\t$hubHomeDir = rtrim($this->config->get('homedir'), '/');\n\t\t\t\tif (!$hubHomeDir)\n\t\t\t\t{\n\t\t\t\t\t// try to deduce a viable home directory based on sitename or live_site\n\t\t\t\t\t$sitename = strtolower(Config::get('sitename'));\n\t\t\t\t\t$sitename = preg_replace('/^http[s]{0,1}:\\/\\//', '', $sitename, 1);\n\t\t\t\t\t$sitename = trim($sitename, '/ ');\n\t\t\t\t\t$sitename_e = explode('.', $sitename, 2);\n\t\t\t\t\tif (isset($sitename_e[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$sitename = $sitename_e[0];\n\t\t\t\t\t}\n\t\t\t\t\tif (!preg_match(\"/^[a-zA-Z]+[\\-_0-9a-zA-Z\\.]+$/i\", $sitename))\n\t\t\t\t\t{\n\t\t\t\t\t\t$sitename = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (empty($sitename))\n\t\t\t\t\t{\n\t\t\t\t\t\t$sitename = strtolower(Request::base());\n\t\t\t\t\t\t$sitename = preg_replace('/^http[s]{0,1}:\\/\\//', '', $sitename, 1);\n\t\t\t\t\t\t$sitename = trim($sitename, '/ ');\n\t\t\t\t\t\t$sitename_e = explode('.', $sitename, 2);\n\t\t\t\t\t\tif (isset($sitename_e[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sitename = $sitename_e[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!preg_match(\"/^[a-zA-Z]+[\\-_0-9a-zA-Z\\.]+$/i\", $sitename))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sitename = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$hubHomeDir = DS . 'home';\n\n\t\t\t\t\tif (!empty($sitename))\n\t\t\t\t\t{\n\t\t\t\t\t\t$hubHomeDir .= DS . $sitename;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$user->set('homeDirectory', $hubHomeDir . DS . $user->get('username'));\n\t\t\t\t$user->set('loginShell', '/bin/bash');\n\t\t\t\t$user->set('ftpShell', '/usr/lib/sftp-server');\n\n\t\t\t\t// Set some initial user values\n\t\t\t\t$user->set('id', 0);\n\t\t\t\t$user->set('accessgroups', array($newUsertype));\n\t\t\t\t$user->set('registerDate', Date::toSql());\n\n\t\t\t\t// Check user activation setting\n\t\t\t\t// 0 = automatically confirmed\n\t\t\t\t// 1 = require email confirmation (the norm)\n\t\t\t\t// 2 = require admin confirmation\n\t\t\t\t$useractivation = $usersConfig->get('useractivation', 1);\n\n\t\t\t\t// If requiring admin approval, set user to block\n\t\t\t\tif ($useractivation == 2)\n\t\t\t\t{\n\t\t\t\t\t$user->set('approved', 0);\n\t\t\t\t}\n\n\t\t\t\t$user->set('access', 5);\n\t\t\t\t$user->set('activation', -rand(1, pow(2, 31)-1));\n\n\t\t\t\tif (is_object($hzal))\n\t\t\t\t{\n\t\t\t\t\tif ($user->get('email') == $hzal->email)\n\t\t\t\t\t{\n\t\t\t\t\t\t$user->set('activation', 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($useractivation == 0)\n\t\t\t\t{\n\t\t\t\t\t$user->set('activation', 1);\n\t\t\t\t\t$user->set('access', (int)$this->config->get('privacy', 1));\n\t\t\t\t}\n\n\t\t\t\t$user->set('password', \\Hubzero\\User\\Password::getPasshash($xregistration->get('password')));\n\n\t\t\t\t// Do we have a return URL?\n\t\t\t\t$regReturn = Request::getString('return', '');\n\n\t\t\t\tif ($regReturn)\n\t\t\t\t{\n\t\t\t\t\t$user->setParam('return', $regReturn);\n\t\t\t\t}\n\n\t\t\t\t// If we managed to create a user\n\t\t\t\tif ($user->save())\n\t\t\t\t{\n\t\t\t\t\t$access = array();\n\t\t\t\t\tforeach ($fields as $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$access[$field->get('name')] = $field->get('access');\n\t\t\t\t\t}\n\n\t\t\t\t\t$profile = $xregistration->_registration['_profile'];\n\n\t\t\t\t\t// Save profile data\n\t\t\t\t\t$member = Member::oneOrNew($user->get('id'));\n\t\t\t\t\t$orcidID = Session::get('orcid');\n\t\t\t\t\tif ($orcidID != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t$profile['orcid'] = $orcidID;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$member->saveProfile($profile, $access))\n\t\t\t\t\t{\n\t\t\t\t\t\t\\Notify::error($member->getError());\n\t\t\t\t\t\t// Don't stop the registration process!\n\t\t\t\t\t\t// At this point, the account was successfully created.\n\t\t\t\t\t\t// The profile info, however, may have issues. But, it's not crucial.\n\t\t\t\t\t\t//$result = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\\Notify::error($user->getError());\n\t\t\t\t\t$result = false;\n\t\t\t\t}\n\n\t\t\t\t// If everything is OK so far...\n\t\t\t\tif ($result)\n\t\t\t\t{\n\t\t\t\t\t$result = \\Hubzero\\User\\Password::changePassword($user->get('id'), $xregistration->get('password'));\n\n\t\t\t\t\t// Set password back here in case anything else down the line is looking for it\n\t\t\t\t\t$user->set('password', $xregistration->get('password'));\n\n\t\t\t\t\t// Did we successfully create/update an account?\n\t\t\t\t\tif (!$result)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn App::abort(500, Lang::txt('COM_MEMBERS_REGISTER_ERROR_CREATING_ACCOUNT'));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Send confirmation email\n\t\t\t\t\tif ($user->get('activation') < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t\\Components\\Members\\Helpers\\Utility::sendConfirmEmail($user, $xregistration);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Instantiate a new view\n\t\t\t\t\t$this->view\n\t\t\t\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_CREATE_ACCOUNT'))\n\t\t\t\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t\t\t\t->set('xprofile', $user)\n\t\t\t\t\t\t->setErrors($this->getErrors())\n\t\t\t\t\t\t->setLayout('create')\n\t\t\t\t\t\t->display();\n\n\t\t\t\t\tif (is_object($hzal))\n\t\t\t\t\t{\n\t\t\t\t\t\t$hzal->set('user_id', $user->get('id'));\n\n\t\t\t\t\t\tif ($hzal->user_id > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hzal->update();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tUser::set('auth_link_id', null);\n\t\t\t\t\tUser::set('tmp_user', null);\n\t\t\t\t\tUser::set('username', $xregistration->get('login'));\n\t\t\t\t\tUser::set('email', $xregistration->get('email'));\n\t\t\t\t\tUser::set('id', $user->get('id'));\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (Request::method() == 'GET')\n\t\t{\n\t\t\tif (User::get('tmp_user'))\n\t\t\t{\n\t\t\t\t$xregistration->loadAccount(User::getInstance());\n\n\t\t\t\t$username = $xregistration->get('login');\n\t\t\t\t$email = $xregistration->get('email');\n\t\t\t\tif (is_object($hzal))\n\t\t\t\t{\n\t\t\t\t\t$xregistration->set('login', $hzal->username);\n\t\t\t\t\t$xregistration->set('email', $hzal->email);\n\t\t\t\t\t$xregistration->set('confirmEmail', $hzal->email);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Set the page title\n\t\t$this->_buildTitle();\n\n\t\treturn $this->_show_registration_form($xregistration, 'create');\n\t}", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function action_register() {\n\t\t\t$this->data[] = 0; // record_id - default for increment\n\t\t\t$this->prepareMainData();\n\t\t\t$model = Model::factory($this->modelName)->registerRecord($this->data);\n\t\t\tif ($model) $this->request->redirect($this->redirectURL);\n\t\t\n\t}", "public function registerDetails(Request $request)\n {\n DB::beginTransaction();\n\n try {\n validateInput($request->all(), User::updateRulesOnRegister());\n\n $user = $this->jobChoiceService->user()->verifyUser($request);\n Auth::loginUsingId($user->id);\n $this->jobChoiceService->user()->saveClientType($request, $user);\n\n $this->data['results']['token'] = $user->createToken('JobChoice')->accessToken;\n $this->jobChoiceService->slug()->store($user);\n $user = $this->jobChoiceService->user()->updateUserOnRegister($request, $user->id);\n $this->data['results']['message'] = \"Successfully registered\";\n $this->data['results']['user'] = $user;\n $this->data['status'] = 200;\n\n // Validate User ID\n if($user->type == 'job_seeker') {\n // Set Data\n $data = [\n 'user_id' => $user->id,\n 'contact_no' => $request->contact_no,\n 'action' => 'send',\n 'lang' => $request->lang\n ];\n // Send Verification Code\n $twilio = $this->jobChoiceService->twilio()->store($data);\n }\n\n Auth::logout();\n\n } catch (\\Exception $e) {\n DB::rollBack();\n $this->data['error'] = $e->getMessage();\n }\n\n // return 'let me know';\n DB::commit();\n return response()->json($this->data, $this->data['status']);\n }", "public function register_action() \n\t{\n $rules = array(\n 'username' => 'required',\n 'email' => 'valid_email|required',\n 'password' => 'required',\n 'password2' => 'required',\n 'securityq1' => 'required',\n 'securityq2' => 'required',\n 'securitya1' => 'required',\n 'securitya2' => 'required',\n\n );\n \n // Readible array\n $readible = \n [ \n 'securityq1' => 'Security Queston 1',\n 'securityq2' => 'Security Queston 2',\n 'securitya1' => 'Security Answer 1',\n 'securitya2' => 'Security Answer 2'\n ];\n\n // readible inputs\n FormValidation::set_field_names($readible);\n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n\n UserModel::register();\n }", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "function register(){ \t\n\t\t$table = 'users';\n\t\t$capability =$sessionrole='';\t\t\n\t\t$type = $this->input->post('type');\n\t\t$redirect__url = base_url();\n\t\tif( $type == 'client' ):\n\t\t\t$role = 'client';\n\t\t\t$redirect__url = base_url('Interact/add_client');\n\t\telse:\n\t\t\t$role = $this->input->post('role');\n\t\t\t$redirect__url = base_url('Interact/add_user');\n\t\tendif; \n\t\t$attorney_id = $this->input->post('attorney_id');\n\t\t$user_name = $this->input->post('personInput');\n\t\t$current_url = $this->input->post('current_url');\n\t\t$companyName = $this->input->post('nameInput');\n\t\t$email = $this->input->post('emailInput');\n\t\t$password = $this->input->post('passInput');\n\t\t$confirm_password = $this->input->post('confirmPassInput');\n\t\t$phoneInput = $this->input->post('phoneInput');\n\t\t$screen_name = $this->input->post('screen_name');\t\t\n\t\tif( $role == 'admin' ):\t\t\t\n\t\t\t$customer_address = $this->input->post('customer_address');\n\t\t\t$street_number = $this->input->post('street_number');\n\t\t\t$city = $this->input->post('city');\n\t\t\t$state = $this->input->post('state');\n\t\t\t$postal_code = $this->input->post('postal_code');\n\t\tendif;\n\t\t$check_data = array('user_email' => $email);\n\t\t$check_user_availability = $this->InteractModal->check_user_availability( $check_data, $table );\n\t\tif(!empty($check_user_availability )):\n\t\t\t$this->session->set_flashdata('msg', 'User already exist with similar email!');\n\t\t\tif(!empty($current_url)){\n\t\t\tredirect( $current_url );\n\t\t\t}else{\n\t\t\tredirect( $redirect__url );\n\t\t\t}\n\t\telse:\n\t\t\t$data = array('user_email' => $email ,\n\t\t\t\t\t 'password' => md5( $password ),\n\t\t\t\t\t 'role' => $role,\n\t\t\t\t\t 'status' => 1,\n\t\t\t\t\t 'create_date' => date('Y-m-d h:i:s')\n\t\t\t);\t\t\t\n\t\t\t$response = $this->InteractModal->register_user($data, $table);\t\t\t\n\t\t\tif( array_key_exists('id', $response )): // update user meta in database \n\t\t\t\t$user_id = $response['id'];\t\n\t\t\t\t\t\n\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'concerned_person' , $user_name );\n\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'company_name' , $companyName );\n\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'phone_number' , $phoneInput );\t\t\t\t\n\t\t\t\tif( $role == 'admin' ):\n\t\t\t\t\tif(!empty($attorney_id)){\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'atterney_id' , $attorney_id );\n\t\t\t\t\t}\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'customer_address' , $customer_address );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'street_number' , $street_number );\n\t\t\t\t\t//$this->InteractModal->add_user_meta( $user_id, 'route' , $route );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'city' , $city );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'state' , $state );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'postal_code' , $postal_code );\n\t\t\t\t\t//$this->InteractModal->add_user_meta( $user_id, 'country' , $country );\t\t\t\t\t\n\t\t\t\tendif;\t\t\t\t\n\t\t\t\tif( $role =='client' ):\n\t\t\t\t\t$company_id = $this->input->post('company_id');\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'company_id' , $company_id );\n\t\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'screen_name' , $screen_name );\n\t\t\t\tendif;\n\t\t\t\t$company = preg_replace('/\\s+/', '+', $companyName);\n\t\t\t\t//$login_url = base_url('Interact/userlogin/'.$company.'&'.$user_id);\n\t\t\t\t$login_url = base_url();\n\t\t\t\t$this->InteractModal->add_user_meta( $user_id, 'login_url' , $login_url );\t\n\t\t\t\t$login_deatil = 'Your credentials for login in interactACM account is: <br /> username: '. $email .'<br /> Password: '. $password .'<br /> Login Url: '. $login_url. ' ';\n\t\t///get auto email content data \n\t\t\tif($role==\"client\"){\n\t\t\t\t$status_template = $this->InteractModal->get_user_meta( $company_id, 'status_template_id_1' );\n\t\t\t\tif(($status_template ==1) ){\n\t\t\t\t\t$subject = $this->InteractModal->get_user_meta( $company_id, 'subject_template_id_1' );\n\t\t\t\t\t$content = $this->InteractModal->get_user_meta( $company_id, 'content_template_id_1' );\n\t\t\t\t\t$logo_content = '<img src=\"'.base_url().'/assets/img/profiles/logo_(2).png\" height=\"auto\" width=\"100\" alt=\"Logo\">'; \n\t\t\t\t\t$content=nl2br($content);\n\t\t\t\t\t$content = str_replace(\"_NAME_\",$user_name,$content);\n\t\t\t\t\t$content = str_replace(\"_DATE_\",date('d-F-Y'),$content);\n\t\t\t\t\t$content = str_replace(\"_LOGO_\",$logo_content,$content);\n\t\t\t\t\t$content = str_replace(\"_EMAIL_\",$email,$content);\n\t\t\t\t\t$content = str_replace(\"_PHONE_\",$phoneInput,$content); \n\t\t\t\t\tif (strpos($content, '_LOGIN_DETAILS_') !== false) {\n\t\t\t\t\t\t $content = str_replace(\"_LOGIN_DETAILS_\",$login_deatil,$content); \n\t\t\t\t\t}else{\n\t\t\t\t\t\t $content = $content.'<br>'.$login_deatil;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$template_list = $this->InteractModal->get_email_template(1);\n\t\t\t\t\tforeach( $template_list as $template_lists ):\n\t\t\t\t\t\t$subject = $template_lists['subject']; \n\t\t\t\t\t\t$content = $login_deatil;\n\t\t\t\t\tendforeach;\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t\t///get auto email content data \t\t\t\t\n\t\t\t\t\t$email_data = array('email' => $email,\n\t\t\t\t\t\t\t\t\t\t'content' => $content,\n\t\t\t\t\t\t\t\t\t\t'subject' => $subject\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t$this->send_email($email_data );\n\t\t\t}else{\n\t\t\t\t$email_content = 'Welcome to interactACM. Your credentials for login in interactACM account is: <br /> username: '. $email .'<br /> Password: '. $password .'<br /> Login Url: '. $login_url. ' ';\t\t\t\t\n\t\t\t\t$email_data = array('email' => $email,\n\t\t\t\t\t\t\t\t\t'content' => $email_content,\n\t\t\t\t\t\t\t\t\t'subject' => 'Welcome to interactACM'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t$this->send_email( $email_data ); \n\t\t\t\t/*====Email send super admin =======*/\n\t\t\t\t$content_superadmin='Hi interactACM<br/> A new broker is register with us. The details of which are following<br>Broker Name: '.$user_name.'<br> Contact Number: '.$phoneInput.'<br> Contact Email: '.$email; \n\t\t\t\t\t$email_data1 = array('email' => '[email protected]', \n\t\t\t\t\t\t\t\t\t\t'content' => $content_superadmin, \n\t\t\t\t\t\t\t\t\t\t'subject' => 'New Broker Registration'\n\t\t\t\t\t\t\t\t\t\t); \t\t\t\t\t\n\t\t\t\t\t$this->send_email($email_data1);\n\t\t\t\t/*======Email send super admin========*/\n\t\t\t\tif(!empty($current_url)):\n $this->session->set_flashdata('msg', 'Thank you for registering with us. Your login credentials has been sent in registered email. Please check your mailbox.');\n\t\t\t redirect( $current_url ); \n\t\t\t\tendif;\n\t\t\t}\n\t\t\t\t$regex = \"/^(\\(?\\d{3}\\)?)?[- .]?(\\d{3})[- .]?(\\d{4})$/\"; \n\t\t\t\t$mobile = preg_replace($regex, \"\\\\1\\\\2\\\\3\", $phoneInput); \n\t\t\t\t//$this->send_text_message($mobile,$email);\t\t\t\t\n\t\t\t\tif( $role =='client' ):\n\t\t\t\t\tredirect( base_url('Interact/afterAddClient/'.urlencode(base64_encode($user_id )))); \n\t\t\t\telse:\n\t\t\t\t redirect( base_url( 'Interact/all_users/'.$role ) );\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\telse:\n\t\t\t\techo $response['error'];\n\t\t\tendif; //==== error or id check ends\n\t\t\t//echo $response;\n\t\tendif;\t//==== user not exist proceed ends\n\t}", "function user_register($user_info)\n {\n }", "public function register_post() \n {\n $first_name = $this->post('fname');\n $last_name = $this->post('lname');\n $username = $this->post('username');\n $email = $this->post('email');\n $password = $this->post('password');\n $dob = $this->post('dob');\n $contact_no = $this->post('contact_no');\n $gender = $this->post('gender');\n $address = $this->post('address');\n $user_type = 2;//Member user\n $status = 1;//Active\n $added_date = time();\n if($first_name != '' && $last_name != '' && $username != '' && $email != '' && $password != '' && $dob != '' && $gender != '' && $address != '')\n {\n $userData = array('fname'=>$first_name,'lname'=>$last_name,'username'=>$username,'status'=>$status,\n 'email'=>$email,'password'=>$password,'dob'=>$dob,'contact_no'=>$contact_no,'address'=>$address,\n 'user_type'=>$user_type,'gender'=>$gender,'added_date'=>$added_date);\n \n $record = $this->artists_model->register_member($userData);\n $message = [\n 'status' => TRUE, \n 'message' => 'Registered successfully',\n 'status_code'=> 200\n ];\n $this->set_response($message, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }\n else\n {\n $message = [\n 'status' => FALSE,\n 'message' => 'Not register,please enter required fields properly',\n 'status_code'=> 400\n ];\n $this->set_response($message, REST_Controller::HTTP_BAD_REQUEST); \n \n }\n }", "public function register() {\n $this->autoLayout = false;\n header('Content-Type: application/json');\n $this->User->recursive = -1;\n if ($this->request->is('post')) {\n $is_present = $this->User->findByEmail($this->request->data['User']['email'], 'User.email');\n if (empty($is_present)) {\n $this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n $this->request->data['User']['is_login'] = 1;\n $image_upload_user = $this->_upload($this->request->data['Picture']['imagex']);\n /*if (!empty($image_upload_user)) {\n $this->loadModel('Picture');\n $this->_upload($this->request->data['Picture']['round_image'], 'round_images', $image_upload_user);\n $data['Picture']['image'] = $image_upload_user;\n //$data['Picture']['user_id'] = $user_obj['User']['id'];\n $this->Picture->create();\n $this->Picture->save($data);\n $this->request->data['User']['profile_img'] = $data['Picture']['image'];\n }*/\n $this->User->create();\n if ($this->User->save($this->request->data)) {\n if (!empty($image_upload_user)) {\n $this->loadModel('Picture');\n $this->_upload($this->request->data['Picture']['round_image'], 'round_images', $image_upload_user);\n $data['Picture']['image'] = $image_upload_user;\n $data['Picture']['user_id'] = $this->User->id;\n $this->Picture->create();\n $this->Picture->save($data);\n $this->request->data['User']['profile_img'] = $data['Picture']['image'];\n }\n // call device token function \n $device_type = $this->request->data['DeviceToken']['device_type'];\n $this->_deviceToken($this->User->id, $this->request->data['DeviceToken']['device_token'], $device_type, $this->request->data['DeviceToken']['stage']);\n $user = $this->User->findById($this->User->id);\n $user = $user['User'];\n \n // Add 10 credits\n $Transaction = array();\n $Transaction['user_id'] = $this->User->id;\n if ($device_type == 'ios') {\n $Transaction['itunes_product'] = 'com.dicu.app.10credits';\n } else {\n $Transaction['android_product'] = 'com.dicu.app.10credits';\n }\n $Transaction['amount'] = 0;\n $Transaction['description'] = '10 Credits Points';\n //$Transaction['time_stamp'] = date('Y-m-d H:i:s');\n $Transaction['credit'] = 10;\n $this->_credit(compact('Transaction'));\n \n // Send Welcome Email\n $body = '<br/><br/>Hi there,<br/><br/>'\n . 'I\\'d like to thank you for joining the Did I See U Real Time Dating App…. the app that is powered by real life interactions! '\n . 'As a thank you for joining our online dating community, I have credited your account with 10 Free Credits.<br/><br/>'\n . 'Go out and see the people around you and never miss a dating opportunity again!<br/><br/>'\n . 'The app that gives you a second chance to make a first impression.<br/><br/>'\n . 'Good Luck! Best regards, <br/>The Did I See U Team!<br/><br/><a href=\"www.didiseeu.com\"><img width=\"150\" src=\"http://didiseeu.com/resources/images/did-see-u-logo.png\" title=\"DidISeeU.com\" alt=\"DidISeeU.com\"></a>';\n \n $Email = new CakeEmail();\n $Email->from(array('[email protected]' => 'DidISeeU.com'));\n $Email->to($this->request->data['User']['email']);\n $Email->subject('Welcome to DID I SEE U!');\n $Email->emailFormat('html');\n $sent_email = $Email->send($body);\n \n $this->set(compact('user', 'sent_email', 'device_type')); \n //die(json_encode(array('success' => true, 'user' => $user['User']))); \n }\n } else {\n die(json_encode(array('success' => false, 'msg' => 'This email is already in use, please try another.')));\n }\n } else {\n die(json_encode(array('success' => false, 'msg' => 'Invalid request')));\n }\n }", "public function register()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'register');\n\n switch ($page) {\n case 'register':\n break;\n\n case 'register_end':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n $user->email = Param::get('email');\n\n try {\n $user->register();\n } catch (ValidationException $e) {\n $page = 'register';\n }\n break;\n\n default:\n throw new PageNotFoundExcpetion(\"{$page} not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function doRegister()\n {\n\n //check if all the fields are filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity based on filled data\n $userEntity = new User(Request::postData());\n\n //check if the user exists and get it as entity if exists\n if ($this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username/email already exists!\", \"type\" => \"error\")));\n exit;\n }\n\n //add the user into DB\n $this->repository->addUser($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"Your account has been created!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "abstract public function register ( );", "public function registerAction() {\n $request = $this->getRequest();\n\n $fp = new Champs_Form_Account_Register($this->em);\n\n if ($request->isPost()) {\n // get the hash\n $hash = $request->getPost('hash');\n\n if ($this->checkHash($hash)) {\n if ($fp->process($request)) {\n $session = new Zend_Session_Namespace('registration');\n $session->user_id = $fp->user->id;\n $this->_redirect($this->getUrl('complete'));\n }\n }\n }\n\n // setup hash\n $this->initHash();\n // assign form to view\n $this->view->fp = $fp;\n }", "public function registerPost(){\n\t\t\t$this->modelRegister();\n\t\t\t//quay lai trang dang ky\n\t\t\t//header(\"location:index.php?controller=account&action=register&notify=success\");\n\t\t\techo \"<script>location.href='login/register-success';</script>\";\n\t\t}", "public function tut_register1(Request $req){\n\t\t\t$userData = array(\n\t\t\t'username' => $req->get('username'),\n\t\t\t'email' => $req->get('email'),\n\t\t\t'password' => $req->get('password'),\n\t\t\t'pp' => $req->get('pp'),\n\t\t\t);\n\t\t\t\n\t\t\t/* Initializing validator */\n\t\t\t$validator = $this->validator($userData);\n\t\t\t\n\t\t\t/* validating user input */\n\t\t\tif($validator->fails()){\n\t\t\t\treturn redirect()->back()->withErrors($validator, 'tutorsignup');\n }else{\n\t\t\t\t$userData['role']=1;\n\t\t\t\t$Crostutor = new Crostutor();\n\t\t\t\t$response = $Crostutor->register($userData);\n\t\t\t\t\n\t\t\t\tif(isset($response['status']) && $response['status'] == 0){\n\t\t\t\t\t$userData['uid']=$response['message']['uid'];\n\t\t\t\t\t$userData['token']=$response['message']['token'];\n\t\t\t\t\t//session('userdata',$userData);\n\t\t\t\t\t$parameter = array(\n\t\t\t\t\t'email' => $req->get('email'),\n\t\t\t\t\t'password' => $req->get('password'),\n\t\t\t\t\t);\n\t\t\t\t\t$response1 = $Crostutor->login($parameter);\n\t\t\t\t\tif(isset($response1['status']) && $response1['status'] == 0){\n\t\t\t\t\t\t$userData1 = array_merge($response1['message'],$parameter);\n\t\t\t\t\t\tsession($userData1);\n\t\t\t\t\t\tToastr::success('Account created successfully.', 'Success', ['options']);\n\t\t\t\t\t\treturn redirect(url('tutor/dashboard'));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn redirect(url('/'));\n\t\t\t\t\t}else{ \n\t\t\t\t\t$validator->errors()->add('custom_error', $response['message']); \n\t\t\t\t\treturn redirect()->back()->withErrors($validator, 'signupErrors');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function profileAction() {\n\t\t$this->view->assign('account', $this->accountManagementService->getProfile());\n\t}", "public function register(){\n\t\t//Better to be implemented through db table\n\t\t$userRole = array('Job Seeker'=>'Job Seeker', 'Employer'=>'Employer');\n\t\t$this->set('userRole',$userRole);\n\n\t\tif($this->request->is('post')){\n\t\t\t$this->User->create();\n\t\t\t\n\t\t\tif($this->User->save($this->request->data)){\n\t\t\t\t$this->Session->setFlash(__('You are now registered and may login'));\n\t\t\t\treturn $this->redirect(array('controller'=>'jobs','action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Unable to create new user'));\n\n\t\t\t}\n\t\t}\n\t}", "function users_user_register($args)\n{\n // If has logged in, header to index.php\n if (pnUserLoggedIn()) {\n return pnRedirect(pnConfigGetVar('entrypoint', 'index.php'));\n }\n\n $template = 'users_user_register.htm';\n // check if we've agreed to the age limit\n if (pnModGetVar('Users', 'minage') != 0 && !stristr(pnServerGetVar('HTTP_REFERER'), 'register')) {\n $template = 'users_user_checkage.htm';\n }\n\n // create output object\n $pnRender = & pnRender::getInstance('Users', false);\n\n // other vars\n $modvars = pnModGetVar('Users');\n\n $pnRender->assign($modvars);\n $pnRender->assign('sitename', pnConfigGetVar('sitename'));\n $pnRender->assign('legal', pnModAvailable('legal'));\n $pnRender->assign('tou_active', pnModGetVar('legal', 'termsofuse', true));\n $pnRender->assign('pp_active', pnModGetVar('legal', 'privacypolicy', true));\n\n return $pnRender->fetch($template);\n}", "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}", "public function registerFamilyAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authRegisterParent' );\n }", "function profile() {\r\n\t\t# INIT\r\n\t\t$this->middleware ( 'googlemaps', 'googlemaps' );\r\n\t\t$this->middleware ( 'verotimage', 'upload' );\r\n\t\t$this->model ( 'users' );\r\n\t\t$data ['user'] = $this->model->users->getData ( $this->sessions->get ( 'uid' ) );\r\n\t\t\r\n\t\tif (! empty ( $data ['user'] ['address'] )) {\r\n\t\t\t$this->googlemaps->init ( array ('size' => '220x220', 'address' => $data ['user'] ['address'], 'language' => 'Disini', 'path' => STORAGE ) );\r\n\t\t}\r\n\t\t\r\n\t\tif (is_post ( 'edit' )) {\r\n\t\t\t\r\n\t\t\t#GET DATA\r\n\t\t\t$e ['address'] = $this->validation->safe ( $_POST ['address'] );\r\n\t\t\t$e ['phone'] = $_POST ['phone'];\r\n\t\t\t$e ['email'] = $_POST ['email'];\r\n\t\t\t$e ['uid'] = $this->sessions->get ( 'uid' );\r\n\t\t\t\r\n\t\t\t# VALIDATION\r\n\t\t\t$this->validation->required ( $e ['address'], l ( 'edit_address_error' ) );\r\n\t\t\t$this->validation->regex ( $e ['phone'], '/^[0]([0-9]{2}|[0-9]{3})[-][0-9]{6,8}|[0][8]([0-9]{8,12})$/', l ( 'register_phone_error' ) );\r\n\t\t\t$this->validation->regex ( $e ['email'], '/^[a-zA-Z0-9-_.]+@([a-zA-Z0-9-_]{1,67}\\.){1,5}[a-zA-Z]{2,4}$/', l ( 'edit_email_error' ) );\r\n\t\t\t\r\n\t\t\tif (! sizeof ( $this->validation->errors )) {\r\n\t\t\t\t\r\n\t\t\t\t# DEL IMAGE ( SHOULD BE WHEN CHANGE ADDRESS )\r\n\t\t\t\tif ($e ['address'] !== $data ['user'] ['address']) {\r\n\t\t\t\t\t$image = STORAGE . DS . $this->sessions->get ( 'uid' ) . DS . 'staticmap.png';\r\n\t\t\t\t\tif (file_exists ( $image )) {\r\n\t\t\t\t\t\tunlink ( $image );\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# IF IMAGE EXIST\r\n\t\t\t\tif (! empty ( $_FILES ['logo'] ['size'] )) {\r\n\t\t\t\t\t$this->validation->image ( $_FILES ['logo'], l ( 'edit_logo_error' ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t# START PLUGIN\r\n\t\t\t\t\t$savepath = STORAGE . DS . $e ['uid'];\r\n\t\t\t\t\t$randomid = md5 ( $e ['uid'] . 'redlogo' );\r\n\t\t\t\t\t$this->upload->vupload ( $_FILES ['logo'] );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($this->upload->uploaded) {\r\n\t\t\t\t\t\t$this->upload->file_auto_rename = false;\r\n\t\t\t\t\t\t$this->upload->image_resize = true;\r\n\t\t\t\t\t\t$this->upload->file_overwrite = true;\r\n\t\t\t\t\t\t$this->upload->image_x = 220;\r\n\t\t\t\t\t\t$this->upload->image_ratio_y = true;\r\n\t\t\t\t\t\t$this->upload->file_new_name_body = 'logo' . $randomid;\r\n\t\t\t\t\t\t$this->upload->allowed = array ('image/*' );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->upload->Process ( $savepath );\r\n\t\t\t\t\t\tif ($this->upload->processed) {\r\n\t\t\t\t\t\t\t/* give another edit variable for update */\r\n\t\t\t\t\t\t\t$e ['logo'] = $this->upload->file_dst_name;\r\n\t\t\t\t\t\t\tchmod ( $savepath . '/' . $e ['logo'], 0644 );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$this->upload->clean ();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->model->users->updateData ( $e );\r\n\t\t\t\t\tredirect ( '/edit/profile' );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t/* IMAGE TIDAK */\r\n\t\t\t\tif (empty ( $_FILES ['logo'] ['size'] )) {\r\n\t\t\t\t\t$this->model->users->updateData ( $e );\r\n\t\t\t\t\tredirect ( '/edit/profile' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->view ( 'users/header' );\r\n\t\t$this->active->menu ( $this->sessions->get ( 'uid' ), $this );\r\n\t\t$this->view ( 'users/profile', $data );\r\n\t\t$this->view ( 'users/footer' );\r\n\t}", "function registration() {\r\n\r\n $this->layout = 'default';\r\n if ($this->Session->check(md5(SITE_TITLE) . 'USERID') == true) {\r\n //$this->Session->setFlash('The URL you\\'ve followed requires you login.');\r\n //$this->redirect(DEFAULT_ADMINURL);\r\n $this->redirect(DEFAULT_ADMINURL . 'users/dashboard');\r\n exit();\r\n }\r\n\r\n if (!empty($this->data)) {\r\n\r\n $errorarray = array();\r\n $errorarray = $this->register_validate($this->data,'registration');\r\n $this->set('errorarray',$errorarray);\r\n\r\n// $this->pre($errorarray);\r\n// exit;\r\n\r\n if(empty($errorarray))\r\n {\r\n\r\n $this->request->data['User']['user_type'] = 'user';\r\n $this->request->data['User']['password'] = md5($this->data['User']['newpwd']);\r\n $this->request->data['User']['encrypt_password'] = $this->encrypt_pass($this->data['User']['newpwd']);\r\n $this->request->data['User']['status'] = '0';\r\n $this->request->data['User']['created_date'] = date('Y-m-d H:i:s', time());\r\n $this->request->data['User']['modified_date'] = date('Y-m-d H:i:s', time());\r\n\r\n unset($this->request->data['User']['newpwd']);\r\n unset($this->request->data['User']['confirmpwd']);\r\n $this->User->save($this->data['User']);\r\n\r\n $this->redirect(DEFAULT_ADMINURL . 'users/registration/'.SUCADD);\r\n\r\n// $this->pre($this->data);\r\n// exit;\r\n }\r\n\r\n }\r\n }", "public function registration()\n {\n \n }", "public function action_register(){\n\t\t\n\t\t$user = CurUser::get();\n\t\t\n\t\tif($user->save($_POST, User_Model::SAVE_REGISTER)){\n\t\t\t$user->login($user->{CurUser::LOGIN_FIELD}, $_POST['password']);\n\t\t\tApp::redirect('user/profile/greeting');\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\tMessenger::get()->addError('При регистрации возникли ошибки:', $user->getError());\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function add() {\n\t\tRouter::redirect('/users/profile');\t\n\t}", "public function onRegister();", "public function profileAction() {\n $user = User::getCurrent();\n if (!$user instanceOf BaseUser) {\n throw new \\Exception (\"No current user in Profile action\");\n }\n $data = array();\n $user = $this->processPost($user);\n $formElements = array(\n 'uname'=>array('label'=>'User Name', 'name_segment'=>'uname',\n 'placeholder'=>'User Name',),\n 'email'=>array('label'=>'Email?', 'name_segment'=>'email',\n 'placeholder'=>'Email',),\n 'fname'=>array('label'=>'First Name', 'name_segment'=>'fname',\n 'placeholder'=>'Your First Name',),\n 'lname'=>array('label'=>'Last Name', 'name_segment'=>'lname',\n 'placeholder'=>'Your Last Name', ),\n 'profiles'=>array('input'=>'formset','subform'=>'profiles',\n 'name_segment'=>'profiles', 'class'=> 'doggy','create_label'=>'Create New',\n 'elements'=> array(\n 'profile_description'=>array('name_segment'=>'profile_description', \n 'data-stuff'=>'fromUserController', 'label' => 'Prof Desc',\n 'placeholder'=>\"Describe your profile\", ),\n 'profile_name'=>array('type'=>'text', 'name_segment'=>'profile_name',\n 'data-stuff'=>'fromUserController', 'label'=>'Prof Name',\n 'placeholder'=>\"Profile Name of Blue Blazer\", )\n ),\n ),\n );\n $formArgs = array('base_object'=>$user, 'elements'=>$formElements,\n 'name_segment'=>'user');\n $form = new BaseForm($formArgs);\n $form->bind($user);\n $data['form'] = $form;\n return $data;\n }", "function subsite_manager_action_register_hook($hook_name, $entity_type, $return_value, $parameters){\n\n\t\telgg_make_sticky_form('register');\n\t\telgg_make_sticky_form('profile_manager_register');\n\n\t\t$required_fields = array();\n\n\t\t// new\n\t\tif($fields = subsite_manager_get_main_profile_fields_configuration(true)){\n\t\t\tforeach($fields as $field_name => $field_config){\n\t\t\t\tif($field_config[\"mandatory\"] == \"yes\"){\n\t\t\t\t\t$required_fields[] = $field_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($required_fields){\n\n\t\t\t$custom_profile_fields = array();\n\n\t\t\tforeach($_POST as $key => $value){\n\t\t\t\tif(strpos($key, \"custom_profile_fields_\") == 0){\n\t\t\t\t\t$key = substr($key, 22);\n\t\t\t\t\t$custom_profile_fields[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($required_fields as $field_name){\n\n\t\t\t\t$passed_value = $custom_profile_fields[$field_name];\n\n\t\t\t\tif(empty($passed_value)){\n\t\t\t\t\tregister_error(elgg_echo(\"profile_manager:register_pre_check:missing\", array(elgg_echo(\"profile:\" . $field_name))));\n\t\t\t\t\tforward(REFERER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "abstract public function register();", "abstract public function register();", "abstract public function register();", "public function post_register() {\n try {\n $i = Input::post();\n $validation = \\Fuel\\Core\\Validation::forge();\n $validation->add('email', 'Email')\n ->add_rule('required')\n ->add_rule('valid_email');\n $validation->add('username', 'Username')\n ->add_rule('required')\n ->add_rule('min_length', 6)\n ->add_rule('max_length', 18);\n $validation->add('password', 'Password')\n ->add_rule('required')\n ->add_rule('min_length', 6)\n ->add_rule('max_length', 18);\n\n if ($validation->run()) {\n $email = $i['email'];\n if (\\Utils::isDisposableEmail($email)) throw new \\Craftpip\\Exception(\"$email is a disposable Email, please use a genuine Email-id to signup.\");\n\n $auth = new \\Craftpip\\OAuth\\Auth();\n\n $user = $auth->getByUsernameEmail($i['email']);\n if ($user) throw new \\Craftpip\\Exception('This Email-ID is already registered.');\n\n $user_id = $auth->create_user($i['username'], $i['password'], $i['email'], 1, array());\n $auth->setId($user_id);\n $auth->setAttr('verified', false);\n $auth->setAttr('project_limit', 2);\n\n\n $mail = new \\Craftpip\\Mail($user_id);\n $mail->template_signup();\n if (!$mail->send()) {\n $auth->removeUser($user_id);\n }\n }\n else {\n throw new \\Craftpip\\Exception('Something is not right. Please try again');\n }\n $response = array(\n 'status' => true\n );\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage()\n );\n }\n\n echo json_encode($response);\n }", "public function completeWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/complete\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "private function display()\n\t{\n\t\t//get member params\n\t\t$rparams = new \\Hubzero\\Config\\Registry($this->member->get('params'));\n\n\t\t//get profile plugin's params\n\t\t$params = $this->params;\n\t\t$params->merge($rparams);\n\n\t\t$xreg = null;\n\n\t\t$fields = Components\\Members\\Models\\Profile\\Field::all()\n\t\t\t->including(['options', function ($option){\n\t\t\t\t$option\n\t\t\t\t\t->select('*')\n\t\t\t\t\t->ordered();\n\t\t\t}])\n\t\t\t->where('action_edit', '!=', Components\\Members\\Models\\Profile\\Field::STATE_HIDDEN)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\tif (App::get('session')->get('registration.incomplete'))\n\t\t{\n\t\t\t$xreg = new \\Components\\Members\\Models\\Registration();\n\t\t\t$xreg->loadProfile($this->member);\n\n\t\t\t$check = $xreg->check('update');\n\n\t\t\t// Validate profile data\n\t\t\t// @TODO Move this to central validation model (e.g., registraiton)?\n\n\t\t\t// Compile profile data\n\t\t\t$profile = array();\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\t$profile[$field->get('name')] = $this->member->get($field->get('name'));\n\t\t\t}\n\n\t\t\t// Validate profile fields\n\t\t\t$form = new Hubzero\\Form\\Form('profile', array('control' => 'profile'));\n\t\t\t$form->load(Components\\Members\\Models\\Profile\\Field::toXml($fields, 'edit', $profile));\n\t\t\t$form->bind(new Hubzero\\Config\\Registry($profile));\n\n\t\t\tif (!$form->validate($profile))\n\t\t\t{\n\t\t\t\t$check = false;\n\n\t\t\t\tforeach ($form->getErrors() as $key => $error)\n\t\t\t\t{\n\t\t\t\t\tif ($error instanceof Hubzero\\Form\\Exception\\MissingData)\n\t\t\t\t\t{\n\t\t\t\t\t\t$xreg->_missing[$key] = (string)$error;\n\t\t\t\t\t}\n\n\t\t\t\t\t$xreg->_invalid[$key] = (string)$error;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If no errors, redirect to where they were going\n\t\t\tif ($check)\n\t\t\t{\n\t\t\t\tApp::get('session')->set('registration.incomplete', 0);\n\t\t\t\tApp::redirect($_SERVER['REQUEST_URI']);\n\t\t\t}\n\t\t}\n\n\t\t$view = $this->view('default', 'index')\n\t\t\t->set('params', $params)\n\t\t\t->set('option', 'com_members')\n\t\t\t->set('profile', $this->member)\n\t\t\t->set('fields', $fields)\n\t\t\t->set('completeness', $this->getProfileCompleteness($fields, $this->member))\n\t\t\t->set('registration_update', $xreg);\n\n\t\treturn $view\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->loadTemplate();\n\t}", "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 profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}", "function launch() {\n\n $session = \\Config\\Services::session();\n $model = new M_register();\n\n\n $id_profile = $session->get('sess_id_profile');\n\n $data = array(\n\n 'starter' => 1\n );\n return $model->model_prosesupdatestarter( $id_profile, $data );\n }", "function procAddUser() {\n\t\tglobal $session, $database, $form;\n\t\t/* Convert username to all lowercase (by option) */\n\t\tif(ALL_LOWERCASE){\n\t\t $_POST['user'] = strtolower($_POST['user']);\n\t\t}\n\t\t/* Registration attempt */\n\t\t$retval = $session->register($_POST['user'], $_POST['pass'], $_POST['email'], $_POST['fullname'], $_POST['ulevel']);\n\n\t\t/* Registration Successful */\n\t\tif($retval == 0){\n\t\t $_SESSION['reguname'] = $_POST['user'];\n\t\t $_SESSION['regsuccess'] = true;\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n\t\t/* Error found with form */\n\t\telse if($retval == 1){\n\t\t $_SESSION['value_array'] = $_POST;\n\t\t $_SESSION['error_array'] = $form->getErrorArray();\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n\t\t/* Registration attempt failed */\n\t\telse if($retval == 2){\n\t\t $_SESSION['reguname'] = $_POST['user'];\n\t\t $_SESSION['regsuccess'] = false;\n\t\t header(\"Location: \".$session->referrer);\n\t\t}\n }", "protected function process() {\n $username = $this->app()->request->post(\"username\");\n $fullName = $this->app()->request->post(\"fullname\");\n $phone = $this->app()->request->post(\"phone\");\n $password = $this->app()->request->post(\"password\");\n $cpassword = $this->app()->request->post(\"cpassword\");\n $currentLocation = $this->app()->request->post(\"curr-location\");\n $preferredLocation = $this->app()->request->post(\"pref-location\");\n $experience = $this->app()->request->post(\"experience\");\n $skills = $this->app()->request->post(\"skills\");\n\n $skillSet = explode(',', $skills);\n\n // Validation stuff\n if(!($this->validateRegistration($username, $phone, $password, $cpassword,$currentLocation,$preferredLocation,$skills,$experience))) {\n $this->setRedirectUri(\"home\");\n }\n\n require_once 'libs/Auth.php';\n $volunteerId = Auth::userId();\n\n require_once 'models/Volunteer.php';\n \n $volunteer = new Volunteer($volunteerId);\n $volunteer->registerSeeker($username, $fullName, $phone, $password, $currentLocation, $preferredLocation, $experience, $skillSet);\n }", "public function register()\n {\n $this->registration->execute([],$this);\n }", "public function doRegister(RegisterRequest $request)\n {\n try {\n $data = $request->all();\n // $image = \"/assets/photo/no_avatar.jpg\";\n //get avatar form account fb or google\n // if ($data['fb_google'] == 1)\n // $image = DB::table('facebook_temp')->where('facebook_id', $data['facebook_id'])->first()->picture;\n // else if ($data['fb_google'] == 2)\n // $image = DB::table('google_temp')->where('google_id', $data['google_id'])->first()->avatar;\n $profile_sample = \"\";\n if ($data['manage_flag'] == 0) {\n $profile_sample = \"assets/photo/client_sample.png\";\n } else if ($data['manage_flag'] == 1) {\n $profile_sample = \"assets/photo/agency_sample.png\";\n }\n $expire_date = date(\"Y-m-d H:i:s\");\n $token = md5($expire_date).md5($data['e_mail']);\n $created_at = date('Y-m-d');\n $param = [\n 'e_mail' => $data['e_mail'],\n 'password' => md5($data['password']),\n 'username' => $data['username'],\n 'displayname' => '',\n 'manage_flag' => $data['manage_flag'],\n 'fb_google' => 0,\n 'api_token' => $token,\n 'expire_date' => $expire_date,\n 'zip_code' => '',\n 'created_at' => $created_at,\n 'set_cost' => \"[]\", \n 'image' => $profile_sample\n ];\n $id = DB::table('users')->insertGetId($param);\n if (!empty($id)) {\n $user = DB::table('users')->where('id', $id)->first();\n $dataLog = [\n 'user_id' => $user->id,\n 'ipaddress' => $request->ip(),\n 'login_day' => date(\"Y-m-d\"),\n ];\n DB::table('user_login_info')->insert($dataLog);\n //send mail\n $data['token'] = $token;\n $this->insertDefaultUserData($id);\n Mail::queue(new \\App\\Mail\\RegisterSuccess($data));\n return redirect('/registersuccess');\n }\n return redirect('/register');\n } catch(Exception $e) {\n return response()->json([\n 'status' => false,\n ]);\n }\n }", "public function register(){\n\t\t$password= $this->input->post('sign_password');\t\t\t\t\t\t\t\t\t\t\n\t\t$emailID=$this->input->post('sign_email');\n\n\t\t//validation check\n\t\tif($emailID=='' || $password=='')\n\t\t{\n\t\t\tredirect('login');\n\t\t\tdie();\n\t\t}\n\n\t\t$enc_password= base64_encode($password);\t//encrypt password\n\n\t\t//check email-Id is already registered \n\t\t$this->load->model('logged_user');\n\t\t$checkEmail=$this->logged_user->checkEmail_exist($emailID);\n\t\t\n\n\t\tif($checkEmail){\t\n\n\t\t\t//Connection establishment, processing of data and response from REST API\n\t\t\t$data=array(\n\t\t\t\t'email' =>$emailID,\n\t\t\t\t'password' => $enc_password\n\t\t\t);\n\t\t\t$path=base_url();\n\t\t\t$url = $path.'api/register.php';\n\t\t\t$ch = curl_init($url);\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t$response_json = curl_exec($ch);\n\t\t\tcurl_close($ch);\n\t\t\t$response=json_decode($response_json, true);\n\t\t//API processing end\n\n\n\t\t//if status returned is 0 then registering failed, if 1 then redirect to signup page\n\t\t\tif($response['status']==0){\n\t\t\t\t$data['account_registered']=$response['status_message'];\n\n\t\t\t\t$this->load->view('includes/header.php');\n\t\t\t\t$this->load->view('pages/member_signup.php',$data);\n\t\t\t\t$this->load->view('includes/footer.php');\t\t\t\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$session_data= array(\n\t\t\t\t\t'email_id' => $response['email_id'],\n\t\t\t\t\t'is_logged' => $response['is_logged'],\n\t\t\t\t\t'unique_id'=>'',\n\t\t\t\t\t'user_name'=>''\n\t\t\t\t);\n\n\t\t\t\t//after registering login user and redirect to edit-details page\n\t\t\t\t$this->session->set_userdata($session_data);\n\t\t\t\tredirect('edit_account');\n\n\t\t\t}\n\t\t//if-else stmt end\n\t\t}\n\t\telse{\n\n\t\t\t//if email-Id already regiterd then show error\n\t\t\t$data['account_registered']=\"Email ID Already Registered. Login by same or use another Email-ID!!!\";\n\n\t\t\t$this->load->view('includes/header.php');\n\t\t\t$this->load->view('pages/member_signup.php',$data);\n\t\t\t$this->load->view('includes/footer.php');\n\t\t}\n\t\t\n\t}", "function register_dz40()\n\t\t{\n\t\t\tglobal $db,$bbspre,$registerinfo;\n\t\t\t$this->username\t\t=\t$registerinfo[user]\t;\n\t\t\t$this->password\t\t=\t$registerinfo[pass]\t;\n\n\t\t\t$this->userkind\t\t=\t'10'\t\t\t\t;\t//\tCHANGE BY YOUR BBS CONFIG\n\n\t\t\t$this->email\t\t=\t$email\t\t\t\t;\n\n\t\t\tif (!$db->num($db->query(\"select username from {$bbspre}members where username='\".$this->username.\"'\")))\n\t\t\t{\n\t\t\t\t$db->query(\"INSERT INTO {$bbspre}members\n\t\t\t\t\t(username,password,groupid,regip,regdate,email,timeoffset)\n\t\t\t\t\tVALUES\n\t\t\t\t\t('\".$this->username.\"','\".$this->password.\"','10','\".getenv(\"REMOTE_ADDR\").\"','\".time().\"','\".$this->email.\"','8')\");\n\t\t\t\t$uid = $db->query_id();\n\t\t\t\t$db->query(\"INSERT INTO {$bbspre}memberfields (uid, site, icq) VALUES ('$uid', '$site', '$icq')\");\n\t\t\t}\n\t\t}", "public function register() {\n $next = $this->input->get('next');\n $data['next'] = $next;\n $data['title'] = translate('register');\n $this->load->view('front/register', $data);\n }", "public function registerAction()\n {\n Lb_Points_Helper_Data::debug_log(\"Registration request sent to LB\", true);\n $txtName = $_POST['txtName'];\n $txtEmail = $_POST['txtEmail'];\n $txtPhoneNumber = $_POST['txtPhoneNumber'];\n $result = Lb_Points_Helper_Data::registerUser($txtName,$txtEmail,$txtPhoneNumber);\n echo json_encode($result);\n }", "function register(){\n $title = \"Inscription\";\n\n if (isset($_GET['pseudo'])){\n if($_GET['pseudo'] != \"\"){\n $test = selectInfoUser($_GET['pseudo']);\n print_r($_GET);\n if (!$test) {\n if (isset($_GET['pw']) && isset($_GET['pwV']) && $_GET['pwV'] == $_GET['pw'] && $_GET['pw'] != \"\" ){\n addUser($_GET['pseudo'],$_GET['pw']);\n $_SESSION['error'] = \"\";\n connection($_GET);\n }else{\n $_SESSION['error'] = \"Erreur : les mots de passe ne correspondent pas !\";\n header('Location: index.php?action=register');\n }\n }else{\n $_SESSION['error'] = \"Erreur : Compte déjà existant !\";\n header('Location: ./index.php?action=register');\n }\n }else {\n $_SESSION['error'] = \"Erreur : Un des champs est mal rempli.\";\n header('Location: ./index.php?action=register');\n }\n }else{\n require('view/template/navbar.php');\n require('view/template/top.php');\n require('view/formRegister.php');\n require('view/template/bottom.php');\n }\n}", "function action_register() {\n if(model_user::userLoggedIn()) {\n header('Location: /home/track');\n }\n $jobs = model_job::getAllJobs();\n $displayError = FALSE;\n\n if (isset($_POST['btn-register'])) {\n $user_data = array(\n 'lastname' => model_user::sanitizeInput($_POST['form']['lastname']),\n 'firstname' => model_user::sanitizeInput($_POST['form']['firstname']),\n 'email' => $_POST['form']['email'],\n 'password' => $_POST['form']['password'],\n 'confirmPassword' => $_POST['form']['confirmPass'],\n 'job' => $_POST['form']['job'],\n );\n\n $form_errors = array(\n 'emailMessage' => '',\n 'limitMessage' => '',\n 'errorEmail' => FALSE,\n 'errorPassword' => FALSE,\n 'errorConfirmPass' => FALSE,\n 'errorLastName' => FALSE,\n 'errorFirstName' => FALSE,\n 'isPasswordNotMatching' => FALSE,\n );\n\n // Check user's lastname and firstname.\n model_user::validateUserName($form_errors, $user_data, $displayError);\n\n // Check user's email.\n model_user::validateUserEmail($form_errors, $user_data, $displayError);\n\n // Check user's password and user's confirm password.\n model_user::validatePassword($form_errors, $user_data, $displayError);\n\n // If there are no errors displayed, attempt to add the user.\n if (!$displayError) {\n try {\n $user = model_user::addUser(\n $user_data['lastname'],\n $user_data['firstname'],\n $user_data['email'],\n $user_data['password'],\n $user_data['job']\n );\n header('Location: /home/login');\n } catch (Exception $e) {\n header('Location: /500/index');\n }\n }\n }\n @include_once APP_PATH . 'view/user_register.tpl.php';\n }", "public function profile()\n {\n if (isset($_REQUEST['submit'])) {\n\n $fullname = $_POST['fullname'];\n\n $phone = $_POST['phone'];\n\n $username = $_POST['username'];\n\n $des = $_POST['des'];\n\n $user = $_POST['user'];\n\n\n //Checking for User login or not\n $change = $this->getChange($username, $fullname, $phone ,$des, $user);\n\n if ($change) {\n $success = 'Change profile successful!';\n echo \"<p><span class='error' style='color: green'>\" . $success . \"</span></p><br>\";\n } else {\n // Registration Failed\n $fail = 'Change profile failed. Account already not exits, please try again.';\n echo \"<p><span class='error' style='color: red;'>\" . $fail . \"</span></p><br>\";\n };\n }\n }", "public function register() {\n\n define('KDEBUG_JSON', true);\n\n $errors = array();\n $success = true;\n\n $slug = user::generateUniqueUsername($_REQUEST['username']);\n if (!isset($_REQUEST['username']) || empty($_REQUEST['username']) || $_REQUEST['username'] == 'Full name') {\n $errors['register_username'] = 'You must specify your Full Name';\n $success = false;\n } elseif (user::findOne(array('slug' => $slug))) {\n $errors['register_username'] = 'This username already exists';\n $success = false;\n }\n\n if (!isset($_REQUEST['email']) || empty($_REQUEST['email']) || $_REQUEST['email'] == 'email address') {\n $errors['register_email'] = 'You must specify an e-mail address';\n $success = false;\n } elseif (!filter_var($_REQUEST['email'], FILTER_VALIDATE_EMAIL)) {\n $errors['register_email'] = 'Invalid e-mail address';\n $success = false;\n } elseif (user::findOne(array('email' => $_REQUEST['email'])) != null) {\n $errors['register_email'] = 'This e-mail address already exists';\n $success = false;\n }\n\n\n if (!isset($_REQUEST['password']) || empty($_REQUEST['password']) || $_REQUEST['password'] == 'password') {\n $errors['register_password'] = 'You must specify a password';\n $success = false;\n } elseif (user::verify('password', $_REQUEST['password']) !== true) {\n $errors['register_password'] = user::verify('password', $_REQUEST['password']);\n $success = false;\n }\n\n if ($_REQUEST['password'] != $_REQUEST['verify']) {\n $errors['register_verify'] = 'Your passwords do not match';\n $success = false;\n }\n\n if ($success) {\n\n // create our new user\n $user = new user();\n $user->email = $_REQUEST['email'];\n $user->username = $_REQUEST['username'];\n $user->slug = $slug;\n\n $user->public = 1;\n $user->created = time();\n $user->updated = time();\n $user->password = crypt($_REQUEST['password']);\n $user->save();\n $user->login();\n\n }\n\n echo json_encode(array('success' => $success, 'errors' => $errors));\n return true;\n\n }", "public function register($data, Form $form) {\n if($member = $this->addMember($form)) {\n if(!$this->RequireApproval && $this->EmailType != 'Validation' && !$this->AllowAdding) {\n $member->logIn();\n }\n\n if(isset($data['backURL'])){\n $this->redirect($data['backURL']);\n }\n\n if ($this->RegistrationRedirect) {\n if ($this->PostRegistrationTargetID) {\n $this->redirect($this->PostRegistrationTarget()->Link());\n return;\n }\n\n if ($sessionTarget = Session::get('MemberProfile.REDIRECT')) {\n Session::clear('MemberProfile.REDIRECT');\n if (Director::is_site_url($sessionTarget)) {\n $this->redirect($sessionTarget);\n return;\n }\n }\n }\n\n return $this->redirect($this->Link('afterregistration'));\n } else {\n return $this->redirectBack();\n }\n }", "function requestProfile() {\n $username = $_GET['username'];\n\n $response = retrieveProfile($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "public function setprofile(){\n \n \n \n $region=M('region');\n $user=D('user');\n $userinfo=M('userinfo');\n $ucenter_member=M('ucenter_member');\n $member=M('member');\n //main menu\n $channel = new \\Common\\Model\\ChannelModel();\n $menu = $channel->getMenu(\"Blog\");\n $this->assign('menu', $menu);\n $uid = I('get.uid');\n $choice = I('get.type');\n if(!(session('username') || cookie('username'))){\n $url = \"http://\".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].\"?s=/Home/User/login.html\";\n header('Location:'.$url);\n }\n if(IS_POST){\n //判断是否已存在信息\n $isset=$userinfo->where(\"user_id=$uid\")->find();\n $array=I('post.');\n $judge1=$ucenter_member->where(\"id=$uid\")->setField('username',$array['nickname']);\n $judge2=$member->where(\"uid=$uid\")->setField('nickname',$array['nickname']);\n $save['user_id']=$uid;\n $save['sex']=$array['sex'];\n $save['introduce']=$array['introduce'];\n $save['sign']=$array['sign'];\n $save['create_time']=$save['update_time']=time();\n if($array['town']){\n $save['region_id']=$array['town'];\n }else {\n $save['region_id']=$array['city'];\n }\n if($isset){\n $judge3=$userinfo->where(\"user_id=$uid\")->save($save);\n }else {\n $judge3=$userinfo->add($save);\n }\n }\n \n //判断有没有填写过个人信息\n $user_info=M('ucenter_member')->alias('u')\n ->where(\"u.id=$uid\") \n ->join('lsgoweb_userinfo i on u.id=i.user_id','left')\n ->field('i.sex,i.introduce,i.sign,i.region_id,u.username')\n ->find();\n if($user_info['region_id']){\n $path=$region->where(array(id=>$user_info['region_id']))->find();\n $path_id=explode('.',$path['path_id']);\n $path_name=explode('.',$path['path_name']);\n }\n $province=$region->where(\"parent=86\")->select();\n $this->assign('path_name',$path_name);\n $this->assign('path_id',$path_id);\n $this->assign('nickname',$user_info['username']);\n $this->assign('province',$province);\n $this->assign('sex',$user_info['sex']);\n $this->assign('introduce',$user_info['introduce']);\n $this->assign('sign',$user_info['sign']);\n $this->assign('urlinfo',$this->getMenu2($uid));\n $this->assign('judge',$this->showchoice($choice));\n $this->assign('info',$user->info($uid));\n \n $this->display('setprofile');\n }", "public function endRegistration( UserRequest $request )\n\t{\n\t\t$querry = \"SELECT * FROM \". DBTool::rawTable('users') . \" WHERE phone = '\" . $request->input('phone') . \"'\";\n\t\t$user = DB::select(DB::raw($querry));\n\t\t$user = ArrayHelper::fromObject($user);\n\t\t$pass = Hash::make($request->input('password'));\n\t\t$id = $user[0]['id'];\n\t\t$update = \t\"UPDATE \". DBTool::rawTable('users') . \" SET \" . \n\t\t\t\t\t\" name = '\" . $request->input('name') .\n\t\t\t\t\t \"', password = '\" . $pass .\n\t\t\t\t\t \"' WHERE phone = \" . $request->input('phone')\n\t\t\t\t\t. \" AND id = \" . $id ;\n\t\tDB::update(DB::raw($update));\n\n\t\t// R.S.\n\t\t$updatePosts = \t\"UPDATE \". DBTool::rawTable('posts') .\n\t\t\t\t\t\" SET user_id = '\" . $id .\n\t\t\t\t\t\"', contact_name = '\" . $request->input('name') .\n\t\t\t\t\t\"' WHERE phone = '\" . $request->input('phone') . \"'\";\n\t\tDB::update(DB::raw($updatePosts));\n\n\t\tAuth::loginUsingId($id);\n\n\t\t$nextUrl = config('app.locale') . '/register/finish';\n\t\t\n\t\t// Redirection\n\t\treturn redirect($nextUrl);\n\t}", "public function profile(Request $request){\n $user = $this->getUser(); // permet de récupérer l'utilisateur connecté\n $form = $this->createForm(AccountType::class, $user);\n\n $form->handleRequest($request); //on demande au formulaire de gérer la request\n\n $manager = $this->getDoctrine()->getManager();\n\n if($form->isSubmitted() && $form->isValid()){\n $manager->flush();\n\n $this->addFlash('success', 'Les données du profil ont été enregistré avec succès !');\n\n }\n\n\n return $this->render('account/profile.html.twig', [\n 'form' => $form->createView()\n ]);\n\n }", "public function register(): void\n {\n $response = $this->signedPostRequest('acme/new-acct', [\n 'termsOfServiceAgreed' => true,\n ], true);\n $this->kid = $response->getHeader('Location')[0];\n }", "public function tut_register(Request $req){\n\t\t\t$userData = array(\n\t\t\t'username' => $req->get('username'),\n\t\t\t'email' => $req->get('email'),\n\t\t\t'password' => $req->get('password'),\n\t\t\t'pp' => $req->get('pp'),\n\t\t\t);\n\t\t\t\n\t\t\t/* Initializing validator */\n\t\t\t$validator = $this->validator($userData);\n\t\t\t\n\t\t\t/* validating user input */\n\t\t\tif($validator->fails()){\n\t\t\t\treturn redirect()->back()->withErrors($validator, 'tutorsignup');\n }else{\n\t\t\t\t$userData['role']=1;\n\t\t\t\t$Crostutor = new Crostutor();\n\t\t\t\t$response = $Crostutor->register($userData);\n\t\t\t\t\n\t\t\t\tif(isset($response['status']) && $response['status'] == 0){\n\t\t\t\t\t$userData['uid']=$response['message']['uid'];\n\t\t\t\t\t$userData['token']=$response['message']['token'];\n\t\t\t\t\t//session('userdata',$userData);\n\t\t\t\t\t$parameter = array(\n\t\t\t\t\t'email' => $req->get('email'),\n\t\t\t\t\t'password' => $req->get('password'),\n\t\t\t\t\t);\n\t\t\t\t\t$response1 = $Crostutor->login($parameter);\n\t\t\t\t\tif(isset($response1['status']) && $response1['status'] == 0){\n\t\t\t\t\t\t$userData1 = array_merge($response1['message'],$parameter);\n\t\t\t\t\t\tsession($userData1);\n\t\t\t\t\t\treturn redirect(url('tutor/dashboard'));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn redirect(url('/'));\n\t\t\t\t\t}else{ \n\t\t\t\t\t$validator->errors()->add('custom_error', $response['message']); \n\t\t\t\t\treturn redirect()->back()->withErrors($validator, 'signupErrors');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function profileAction()\n\t{\n\t\t$store = $this->getBrowserStore();\n\n\t\t$params = $this->getRequest()->getPost();\n\t\tif(!isset($params['uri']) || empty($params['uri'])) {\n\t\t\t$this->_forward('error', 'api', null, array(\n\t\t\t\t'code' => 'RequiredError',\n\t\t\t\t'message' => 'Not all parameters given. This method requires: uri.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\n\t\t$uri = $this->escape($params['uri'], 'uri');\n\t\tif(!($id = $this->loadUri($uri))) {\n\t\t\treturn;\n\t\t}\n\n\t\t$profile = $this->getProfile($id, $store);\n\t\tif($profile === false) \n\t\t\treturn;\n\n\t\t$this->outputXml('<result>' . $profile . '</result>');\n\t}", "function register(){\n\t\t\t$this->__dataDecode();\n\t\t\t\t$data = $this->data;\n\t\t\t\t$username = $data['User']['userName'];\n\t\t\t\t$response\t= array();\n\t\t\t\t$emptyuserName = $this->User->findByUsername($username);\n\t\t\t \t$emptyEmail = $this->User->findByEmail($this->data['User']['email']);\n\t\t\t\n\t\t\t \t\n\t\t\tif(isset($this->data['User']['password']))\n\t\t\t{\n\t\t\t\t$this->data['User']['confirm_password'] = $this->data['User']['password'] \t= md5($this->data['User']['password']);\n\t\t\t\t$this->data['User']['email_confirmation']\t= 1;\n\t\t\t\t$this->data['User']['status']\t\t\t= 1;\n\t\t\t\t$data = $this->data;\n\t\t\t\t$data['User']['firstname']=$this->data['User']['firstName'];\n\t\t\t\t$data['User']['lastname']=$this->data['User']['lastName'];\n\t\t\t\t$data['User']['username']=$this->data['User']['userName'];\n\t\t\t\t}\n\n\t\t\tif(!($this->__validEmail($this->data['User']['email'])) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Please enter a valid email.';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t \t}\n\t\t\tif(!empty($emptyuserName) && !empty($data['User']['username']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'userName Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\n\t\t\t}\n\t\t\tif(!empty($emptyuserName) && !empty($data['User']['username']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'userName Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\n\t\t\tif(!empty($emptyEmail) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Email Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\n\t\t\t}\n\t\t\tif(!empty($emptyemail) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'email Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\tif(!($this->validateUSAZip($this->data['User']['zip'])) && !empty($this->data['User']['zip']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Please enter a valid Zip Code.';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t \t}\n\t\t\n\t\t\telse if($this->User->save($data))\n\t\t\t{\n\t\t\t\t$message\t= \"registered successfully\";\n\t\t\t\t$response['error']\t= 0;\n\t\t\t\t$response['response']['result'] = 'success';\n\t\t\t\t$response['response']['message'] = 'registered successfully';\n\t\t\t\t$this->set('response', $response);\t\t\t\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['result'] = 'failure';\n\t\t\t\t$response['response']['message']\t= 'registered unsuccessfully';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\n\t\t\techo json_encode($response);\n\t\t\tdie();\n\t\t}", "function register(){\r\n //FullName\r\n $fullName = $this->safety($_REQUEST['reg_fullName']);\r\n \t$_SESSION['reg_fullName'] = $fullName;\r\n //Email\r\n \t$email = $this->safety($_REQUEST['reg_email']);\r\n \tif (! filter_var($email, FILTER_VALIDATE_EMAIL) ){\r\n \t\t$errors[] = \"Invalid email format\";\r\n \t}\r\n \telseif( $this->emailExists($email) ) {\r\n \t\t\t$errors[] = \"Email already in use\";\r\n \t}\r\n \t$_SESSION['reg_email'] = $email; //Stores email into session variable\r\n \t//Password\r\n \t$password = $_REQUEST['reg_password'];\r\n //Fav. Quote\r\n \t$quote = $this->safety($_REQUEST['reg_quote']);\r\n //Current date\r\n \t$date = date(\"Y-m-d\");\r\n //Validate name\r\n \tif(strlen($fullName) > 100 || strlen($fullName) < 2) {\r\n \t\t$errors[] = \"Your name must be between 2 and 100 characters\";\r\n \t}\r\n //Validate password\r\n \tif (strlen($password) < 6) {\r\n \t $errors[] = \"Password is too short!\";\r\n \t}\r\n \t/* Check Password Strength */\r\n /* More about regular expressions https://www.w3schools.com/php/php_regex.asp */\r\n \tif (!preg_match(\"#[0-9]+#\", $password)) {\r\n \t $errors[] = \"Password must include at least one number!\";\r\n \t}\r\n \tif (!preg_match(\"#[a-zA-Z]+#\", $password)) {\r\n \t $errors[] = \"Password must include at least one letter!\";\r\n \t}\r\n // only proceed if there are no errors.\r\n \tif(empty($errors)) {\r\n //Encrypt before sending to database\r\n $password = password_hash($password, PASSWORD_DEFAULT);\r\n \t\t//Assign a random profile picture\r\n \t\t$number = rand(1, 16); //Random number between 1 and 16\r\n \t\t$avatar = 'assets/avatars/'.$number.'.png';\r\n \t\t// prepare data to be inserted\r\n $data = [\r\n 'fullName' => $fullName,\r\n 'email' => $email,\r\n 'password' => $password,\r\n 'quote' => $quote,\r\n 'signup_date' => $date,\r\n 'avatar' => $avatar\r\n ];\r\n // wrap structure with `backticks` and content with regular \"quotemarks\"\r\n $columns = '`'.implode('`,`',array_keys($data)).'`';\r\n $values = '\"'.implode('\",\"', $data).'\"';\r\n $sql = \"INSERT INTO `users` ($columns) VALUES ($values) \";\r\n if ( $this->q($sql) ){\r\n // redirect if registration was successful.\r\n header('Location: '.site_root.'?login_form&reg_success='.$email);\r\n \t\t}\r\n \t\telse{\t$errors[] = \"Something went wrong: \".$this->ixd->error; }\r\n \t}\r\n return $errors;\r\n }", "function update_user_profile() {\n global $DB,$CFG;\n require_once($CFG->dirroot . '/local/elggsync/classes/curl.php');\n $config = get_config('local_elggsync');\n $elggdomainname = $CFG->wwwroot.$config->elggpath;\n $elggmethod = 'get.user.info';\n $elgg_api_key = $config->elggapikey;\n $curl = new local_elggsync\\easycurl;\n\n $results = $DB->get_records_sql(\"SELECT u.id,u.username,u.city, u.description FROM {user} AS u WHERE u.suspended = 0\");\n foreach($results as $result) {\n $url = $elggdomainname.'/services/api/rest/json/?method='.$elggmethod.'&api_key='.$elgg_api_key;\n $fetched = $curl->post($url,array('username'=>$result->username));\n $fetched = json_decode($fetched);\n if(isset($fetched) && $fetched->status == 0) {\n if(isset($fetched->result) && $fetched->result->success == true) {\n $dataobject = new stdClass;\n $dataobject->id = $result->id;\n if($fetched->result->firstname || $fetched->result->firstname !== null) {\n $dataobject->firstname = $fetched->result->firstname;\n }\n if($fetched->result->lastname || $fetched->result->lastname !== null) {\n $dataobject->lastname = $fetched->result->lastname;\n }\n if($fetched->result->email || $fetched->result->email !== null) {\n $dataobject->email = $fetched->result->email;\n }\n if($fetched->result->phone || $fetched->result->phone !== null) {\n $dataobject->phone1 = $fetched->result->phone;\n }\n if($fetched->result->mobile || $fetched->result->mobile !== null) {\n $dataobject->phone2 = $fetched->result->mobile;\n }\n if($fetched->result->city || $fetched->result->city !== null) {\n $dataobject->city = $fetched->result->city;\n $dataobject->country = 'BR';\n }\n if($fetched->result->description || $fetched->result->description !== null) {\n $dataobject->description = $fetched->result->description;\n }\n $DB->update_record('user',$dataobject);\n unset($dataobject);\n if($fetched->result->company || $fetched->result->company !== null) {\n $companyfieldid =[];\n try {\n $companyfieldid = $DB->get_record_sql(\"SELECT uid.id,uid.data\n FROM {user_info_data} AS uid\n JOIN {user_info_field} AS uif ON (uif.id = uid.fieldid)\n WHERE uid.userid = :userid\n AND uif.shortname = 'empresa'\",array('userid'=>$result->id),MUST_EXIST);\n if(strcmp($companyfieldid->data,$fetched->result->company) !== 0) {\n $DB->update_record('user_info_data',array('id'=>$companyfieldid->id,'data'=>$fetched->result->company));\n }\n }\n catch(Exception $e) {\n echo $e;\n }\n }\n }\n }\n }\n return true;\n}", "public function register()\n\t{\n\t\t$result['status'] = 100;\n\t\t$this->load->view('register',$result);\n\t}", "public function register(Request $req){\n\t\t\t$userData = array(\n\t\t\t'username' => $req->get('username'),\n\t\t\t'email' => $req->get('email'),\n\t\t\t'password' => $req->get('password'),\n\t\t\t'pp' => $req->get('pp'),\n\t\t\t'referral' => $req->get('refId'),\n\t\t\t);\n\t\t\t\n\t\t\t/* Initializing validator */\n\t\t\t$validator = $this->validator($userData);\n\t\t\t\n\t\t\t/* validating user input */\n\t\t\tif($validator->fails()){\n\t\t\t\treturn redirect()->back()->withErrors($validator, 'signupErrors');\n }else{\n\t\t\t\t$userData['role']=0;\n\t\t\t\t$Crostutor = new Crostutor();\n\t\t\t\t$response = $Crostutor->register($userData);\n\t\t\t\t\n\t\t\t\tif(isset($response['status']) && $response['status'] == 0){\n\t\t\t\t\t$userData['uid']=$response['message']['uid'];\n\t\t\t\t\t$userData['token']=$response['message']['token'];\n\t\t\t\t\t//session('userdata',$userData);\n\t\t\t\t\t$parameter = array(\n\t\t\t\t\t'email' => $req->get('email'),\n\t\t\t\t\t'password' => $req->get('password'),\n\t\t\t\t\t);\n\t\t\t\t\t$response1 = $Crostutor->login($parameter);\n\t\t\t\t\tif(isset($response1['status']) && $response1['status'] == 0){\n\t\t\t\t\t\t$userData1 = array_merge($response1['message'],$parameter);\n\t\t\t\t\t\t$userData1['usertype'] = $response1['message']['role'] == 1 ? 'teacher' : 'student' ; \n\t\t\t\t\t\tsession($userData1);\n\t\t\t\t\t\tToastr::success('Account created successfully.', 'Success', ['options']);\n\t\t\t\t\t\tif($req->get('cr')== 'questiondetail'){\n\t\t\t\t\t\t\treturn redirect($req->get('cu'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn redirect(url('student/dashboard'));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn redirect(url('/'));\n\t\t\t\t\t\n\t\t\t\t\t}else{ \n\t\t\t\t\t$validator->errors()->add('custom_error', $response['message']); \n\t\t\t\t\treturn redirect()->back()->withErrors($validator, 'signupErrors');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "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 pre_dispatch()\n\t{\n\t\t$this->_memID = currentMemberID();\n\t\t$this->_profile = MembersList::get($this->_memID);\n\t}", "public function register($step = 0)\n {\n $user_details = $this->User->findById($this->Auth->user('id'));\n\n switch($step)\n {\n case 1 :\n $this->_register_step_1($user_details);\n break;\n case 2 :\n $this->_register_step_2();\n break;\n case 3 :\n $this->_register_step_3();\n break;\n default :\n $this->layout = 'home';\n \n if ($this->request->is('post'))\n {\n $this->request->data['User']['status'] = IN_ACTIVE;\n\n if ($this->User->save($this->request->data['User']))\n {\n $username_string = $this->request->data['User']['first_name'] . ' ' . \n $this->request->data['User']['last_name'] . ' ' .\n $this->User->id;\n \n $username_string = $this->sanitize_file_name($username_string);\n $this->User->save(array('username' => $username_string));\n\n if ($this->Auth->login())\n {\n return $this->redirect(array('action' => 'register' , '1'));\n }\n }\n else\n {\n $this->Session->setFlash(__('Unable to save details'));\n }\n } \n }\n }", "function register_profile ($profile, $update = false, $id = null) {\n global $sql;\n // Update or add profile for user\n if ($update === true) {\n return $sql->sql_update('profile', $profile, $id);\n } else {\n $p = $this->profile($profile['user_id']);\n if ($p) {\n $user_id = $profile['user_id'];\n unset($profile['id']);\n unset($profile['user_id']);\n return $sql->sql_update('profile', $profile, ['user_id' => $user_id]);\n } else {\n return $sql->sql_insert('profile', $profile);\n }\n }\n }", "function register() {\n\t\treturn array(\n\t\t\t\"Title\" => _t('ForumMemberProfile.FORUMREGTITLE','Forum Registration'),\n\t\t \t\"Subtitle\" => _t('ForumMemberProfile.REGISTER','Register'),\n\t\t\t\"Abstract\" => $this->getForumHolder()->ProfileAbstract,\n\t\t);\n\t}", "public function __invoke(CreateProfileRequest $request)\n {\n }", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();" ]
[ "0.63743407", "0.63326186", "0.6034295", "0.60105366", "0.60035205", "0.59805727", "0.5954078", "0.59370375", "0.5915459", "0.5907805", "0.5870602", "0.5858597", "0.5844271", "0.58420455", "0.5837274", "0.58264136", "0.5811395", "0.5800513", "0.578516", "0.57529974", "0.5750736", "0.5742366", "0.573928", "0.57375836", "0.57363915", "0.57317257", "0.57301915", "0.570964", "0.5699113", "0.5692758", "0.5691503", "0.5690262", "0.568769", "0.5687505", "0.56742585", "0.5673725", "0.5661463", "0.565903", "0.56467456", "0.5637626", "0.56361514", "0.5632822", "0.5631262", "0.5628318", "0.56266356", "0.5622898", "0.5619861", "0.56183493", "0.5608056", "0.56073475", "0.5599548", "0.55972105", "0.5580753", "0.5580066", "0.5580066", "0.5580066", "0.5578768", "0.55760425", "0.5570358", "0.5567738", "0.55655277", "0.5557129", "0.55555296", "0.55554986", "0.5554483", "0.554779", "0.55477124", "0.5538324", "0.55373", "0.5534336", "0.5531371", "0.55185914", "0.5518382", "0.5512295", "0.5508204", "0.55066395", "0.55037016", "0.55015445", "0.5497588", "0.5495288", "0.54834545", "0.5477486", "0.5477185", "0.54740393", "0.54627067", "0.54626125", "0.54558295", "0.544311", "0.54406995", "0.54400796", "0.5436576", "0.5435998", "0.5427588", "0.54240537", "0.54240537", "0.54240537", "0.54240537", "0.54240537", "0.54240537", "0.54240537", "0.54240537" ]
0.0
-1
Instantiates a new teamworkApplicationIdentity and sets the default values.
public function __construct() { parent::__construct(); $this->setOdataType('#microsoft.graph.teamworkApplicationIdentity'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createFromDiscriminatorValue(ParseNode $parseNode): TeamworkApplicationIdentity {\n return new TeamworkApplicationIdentity();\n }", "public function __construct()\n {\n $this->userID = 0;\n $this->programID = NULL;\n $this->typeID = NULL;\n $this->firstName = NULL;\n $this->lastName = NULL;\n $this->email = NULL;\n $this->password = NULL;\n\t\t$this->timezoneID = NULL;\n\t\t$this->timezone = NULL;\n $this->lastLogin = NULL;\n\t\t$this->active = 0;\n }", "public function __construct(array $workteam = array())\n {\n $this\n ->setWorkteam($workteam);\n }", "public function init()\n {\n if (null === $this->identityClass) {\n $this->identityClass = 'year\\user\\models\\User';\n }\n parent::init();\n }", "function __construct5($team, $username, $email, $position, $password)\n\t{\n\t\tcreateEmployee($team, $username, $position, $password, '', '', '', '', '', '', '');\n\n\t\t$this->setUsername($username);\n\t}", "public function __construct($userInfo = [])\n {\n if (empty($userInfo[self::EMPLOYEE_ID])) {\n throw new InvalidArgumentException('Employee ID cannot be empty.', 1493733219);\n }\n\n // Set all of the provided fields, taking whatever value was given.\n foreach (self::getAllFieldNames() as $fieldName) {\n if (array_key_exists($fieldName, $userInfo)) {\n $this->values[$fieldName] = $userInfo[$fieldName];\n }\n }\n\n // Ensure fields with stricter constraints have valid values.\n $this->values[self::EMPLOYEE_ID] = (string)$userInfo[self::EMPLOYEE_ID];\n $this->setLocked($userInfo[self::LOCKED] ?? null);\n $this->setRequireMfa($userInfo[self::REQUIRE_MFA] ?? null);\n }", "public function __construct(Application $wechat)\n {\n $host = explode('.', request()->getHttpHost());\n $subDomain = array_first($host);\n $this->wechatCacheKey =\n 'wechat-oauth-user:' . $subDomain . '-' . session_id();\n $this->wechat = $wechat;\n }", "public function _initialize(Tinebase_Model_Application $_application, $_options = null)\r\n {\r\n #$initialAdminUserOptions = $this->_parseInitialAdminUserOptions($_options);\r\n #Tinebase_User::getInstance()->importUsers($initialAdminUserOptions); //import users(ldap)/create initial users(sql)\r\n #Tinebase_Group::getInstance()->importGroupMembers(); //import groups members(ldap)\r\n\r\n if(Tinebase_User::getInstance() instanceof Tinebase_User_Interface_SyncAble) {\r\n // import users\r\n Tinebase_User::syncUsers(true);\r\n } else {\r\n $initialAdminUserOptions = $this->_parseInitialAdminUserOptions($_options);\r\n Tinebase_User::createInitialAccounts($initialAdminUserOptions);\r\n }\r\n parent::_initialize($_application, $_options);\r\n $this->_initializeFavorites();\r\n }", "public function setApplicationIdentityType(?TeamworkApplicationIdentityType $value): void {\n $this->getBackingStore()->set('applicationIdentityType', $value);\n }", "private function __construct() {\n\n $this->\n database = \\FluitoPHP\\Database\\Database::GetInstance();\n\n require_once( dirname(__FILE__) . DS . 'User.class.php' );\n\n $appConfig = \\FluitoPHP\\FluitoPHP::GetInstance()->\n GetConfig('AUTHENTICATION');\n\n $appConfig = $appConfig ? $appConfig : [];\n\n $moduleConfig = \\FluitoPHP\\FluitoPHP::GetInstance()->\n GetModuleConfig('AUTHENTICATION');\n\n $moduleConfig = $moduleConfig ? $moduleConfig : [];\n\n $appConfig = array_replace_recursive($appConfig, $moduleConfig);\n\n $this->\n UpdateConfig($appConfig);\n }", "public function __construct() {\n\t\tswitch (TRUE) {\n\t\t\tcase (func_num_args() == 1 && is_array(func_get_arg(0))):\n\t\t\t\t$data = func_get_arg(0);\n\n\t\t\t\t$this->application_id = intval($data['application_id']);\n\t\t\t\t$this->email = strtolower(trim($data['email']));\n\t\t\t\t$this->dep_account = intval(array_search(strtoupper($data['dep_account']), self::$dep_accounts));\n\t\t\t\t$this->income_frequency = intval(array_search(strtoupper($data['income_frequency']), self::$income_frequencies));\n\t\t\t\t$this->income_monthly_net = intval($data['income_monthly_net']);\n\t\t\t\t$this->dob = $data['dob'];\n\t\t\t\tbreak;\n\t\t\tcase (func_num_args() == 6):\n\t\t\t\tlist ($application_id, $email, $dep_account, $income_frequency, $income_monthly_net, $dob) = func_get_args();\n\t\t\n\t\t\t\t$this->application_id = intval($application_id);\n\t\t\t\t$this->email = strtolower(trim($email));\n\t\t\t\t$this->dep_account = intval(array_search(strtoupper($dep_account), self::$dep_accounts));\n\t\t\t\t$this->income_frequency = intval(array_search(strtoupper($income_frequency), self::$income_frequencies));\n\t\t\t\t$this->income_monthly_net = intval($income_monthly_net);\n\t\t\t\t$this->dob = $dob;\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Not implemented.\n\t\t\t\tbreak;\n\t\t}\t\n\t}", "public function __construct($app_name) {\n\t\t$this->tfa = new RobThree\\Auth\\TwoFactorAuth($app_name); //, 6, 60, 'sha1'/*, $this->qr*/);\t\n\t\t$this->app_name = $app_name;\n\t}", "public function __construct() {\n $this->config = $config\t = &get_config();\n\n $this->app_id\t\t= $config['linkedin_app_id'];\n $this->app_secret\t= $config['linkedin_app_secret'];\n\n if(!$this->app_id || !$this->app_secret) {\n throw new Exception('Application ID not set', APP_ID_OR_SECRET_NOT_SET);\n }\n\n }", "function __construct($isCreationAction = false, $codeonly = false, $onetime = false)\n {\n parent::__construct();\n if (! $isCreationAction) {\n return $this;\n }\n $objRequest = Container_Request::getRequest();\n $arrSession = $objRequest->get_arrSession();\n $this->reqCreatorToMod = false;\n if (Base_GeneralFunctions::getValue($objRequest->get_arrSession(), 'intUserAuthID', false, true)) {\n unset($_SESSION['intUserAuthID']);\n }\n if (isset($arrSession['OPENID_AUTH']['url'])) {\n $this->setKey('enumAuthType', 'openid');\n $this->setKey('strAuthValue', $arrSession['OPENID_AUTH']['url']);\n unset($_SESSION['OPENID_AUTH']);\n } elseif (\n Base_GeneralFunctions::getValue($objRequest->get_arrRqstParameters(), 'username', false, true) != false\n && Base_GeneralFunctions::getValue($objRequest->get_arrRqstParameters(), 'password', false, true) != false\n ) {\n if (count(Object_Userauth::brokerByColumnSearch('strAuthValue', Base_GeneralFunctions::getValue($objRequest->get_arrRqstParameters(), 'username') . ':%')) > 0) {\n throw new Exception_AuthenticationFailed(\"This username already exists, please select another\");\n }\n $this->setKey('enumAuthType', 'basicauth');\n $this->setKey('strAuthValue', array('password' => Base_GeneralFunctions::getValue($objRequest->get_arrRqstParameters(), 'password'), 'username' => Base_GeneralFunctions::getValue($objRequest->get_arrRqstParameters(), 'username')));\n } elseif ($codeonly != false) {\n $this->setKey('enumAuthType', 'codeonly');\n $authString = '';\n while ($authString == '') {\n $authString = Base_GeneralFunctions::genRandStr(5, 9);\n if (count(Object_Userauth::brokerByColumnSearch('strAuthValue', '%:' . sha1(Container_Config::getSecureByID('salt', 'Not Yet Set!!!')->getKey('value') . $authString))) > 0) {\n $authString = '';\n }\n }\n $this->setKey('strAuthValue', array('password' => $authString, 'username' => $codeonly));\n } elseif ($onetime == true) {\n $this->setKey('enumAuthType', 'onetime');\n $authString = '';\n while ($authString == '') {\n $authString = Base_GeneralFunctions::genRandStr(8, 12);\n if (count(Object_Userauth::brokerByColumnSearch('strAuthValue', '%:' . $authString)) > 0) {\n $authString = '';\n }\n }\n $this->setKey('strAuthValue', array('password' => $authString, 'username' => 'onetime'));\n } else {\n return false;\n }\n $this->create();\n return $this;\n }", "public function Initialize()\n\t\t{\n\t\t\t$this->intId = PersonWithLock::IdDefault;\n\t\t\t$this->strFirstName = PersonWithLock::FirstNameDefault;\n\t\t\t$this->strLastName = PersonWithLock::LastNameDefault;\n\t\t\t$this->strSysTimestamp = PersonWithLock::SysTimestampDefault;\n\t\t}", "public function testCreateIdentity()\n {\n }", "protected function createDefaultUser()\n {\n $this->user = User::create(config('defaults.user'));\n\n return $this;\n }", "public function init()\n {\n $this->accessToken = 'EAAPgIZBacbTMBAJnVjjmoOW3tjZClqcJDUP3NZB5Dbi72zA2Ix8tE5qviZAE4BF3UqluxlZCLAOnlqe0WYeTXGZBTesuyGPQXb7iPZAC2qOWnX376GvrvZAiO34bcEJ7TYyPqgqV2uLZAkvHD8DkjuPZC7OEpS91ydHnNXbEPpclLSQQZDZD';\n }", "public function __construct()\n {\n $this->roles = 'ROLE_USER';\n $this->createAt = new \\DateTime();\n }", "function __construct(int $idNum, String $firstName, String $lastName, String $email, String $phoneNumber, \n int $userRole, int $active, UserCredential $userCredentials, UserInformation $userInforamtion)\n {\n $this->idNum = $idNum;\n $this->firstName = $firstName;\n $this->lastName = $lastName;\n $this->email = $email;\n $this->phoneNumber = $phoneNumber;\n $this->userRole = $userRole;\n $this->active = $active;\n $this->userCredentials = $userCredentials;\n $this->userInformation = $userInforamtion;\n }", "public function __construct()\n {\n $this->createdAt = new \\DateTime();\n $this->salt = md5(uniqid(null, true));\n $this->roles = [];\n }", "private function _setIdentity(){\n $this->_setUserData($this->getClassUser()->getIdentity());\n }", "public function __construct() {\r\n\t\t$this->user_id = null;\r\n\t\t$this->username = 'Anonymous';\r\n\t\t$this->avatar = ANONYMOUS_AVATAR;\r\n\t\t$this->date_joined = '2015-8-7';\r\n\t}", "public function __construct($app = null)\n {\n $app = $app ?: app();\n\n $em = $app['Doctrine\\ORM\\EntityManager'];\n\n parent::__construct($em, new \\Doctrine\\ORM\\Mapping\\ClassMetadata('User'));\n }", "private static function init_microsoft() {\n // Microsoft is a custom setup.\n $record = (object) [\n 'name' => 'Microsoft',\n 'image' => 'https://www.microsoft.com/favicon.ico',\n 'baseurl' => '',\n 'loginscopes' => 'openid profile email user.read',\n 'loginscopesoffline' => 'openid profile email user.read offline_access',\n 'showonloginpage' => true\n ];\n\n $issuer = new issuer(0, $record);\n return $issuer;\n }", "public function __construct()\n {\n $this->rememberIdentifier = bin2hex(random_bytes(32));\n $this->enabled = '0';\n $this->confirmationToken = bin2hex(random_bytes(32));\n }", "public function setApplicationTemplateId($val)\n {\n $this->_propDict[\"applicationTemplateId\"] = $val;\n return $this;\n }", "public function __construct()\n {\n $this->salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);\n $this->enabled = false;\n $this->locked = false;\n $this->expired = false;\n $this->roles = new ArrayCollection();\n $this->credentialsExpired = false;\n $this->confirmationToken = base64_encode(utf8_encode(openssl_random_pseudo_bytes(10)));\n $this->createdAt = new \\DateTime();\n }", "public function __construct()\n {\n parent::__construct();\n $this->client_id = Tool::config('client_id');\n $this->client_secret = Tool::config('client_secret');\n $this->redirect_uri = Tool::config('redirect_uri');\n $this->authorize_url = Tool::config('app_type', 'com') === 'com'\n ? Constants::AUTHORITY_URL.Constants::AUTHORIZE_ENDPOINT\n : Constants::AUTHORITY_URL_21V.Constants::AUTHORIZE_ENDPOINT_21V;\n $this->access_token_url = Tool::config('app_type', 'com') === 'com'\n ? Constants::AUTHORITY_URL.Constants::TOKEN_ENDPOINT\n : Constants::AUTHORITY_URL_21V.Constants::TOKEN_ENDPOINT_21V;\n $this->scopes = Constants::SCOPES;\n }", "function __construct($requireSignIn = false) {\n\n\t}", "private function __construct0() {\n\t\t\t$this->idea_uniqueId = $this->createUniqueId();\n\t\t}", "public function fakeFtthApplication($ftthApplicationFields = [])\n {\n return new FtthApplication($this->fakeFtthApplicationData($ftthApplicationFields));\n }", "public function __construct($userId, $verificationCode)\n {\n try\n {\n $this->setUserId($userId);\n $this->setVerificationCode($verificationCode);\n }\n catch(Exception $exception)\n {\n // rethrow exception\n throw(new Exception(\"Unable to build verification code\"));\n }\n }", "public function Initialize()\n\t\t{\n\t\t\t$this->intId = Person::IdDefault;\n\t\t\t$this->strFirstName = Person::FirstNameDefault;\n\t\t\t$this->strLastName = Person::LastNameDefault;\n\t\t}", "function __construct() {\n\t\t# Global Variables\n\t\tglobal $app, $_GLOBALS;\n\t\t\n\t\t# Ensure Singleton\n\t\tif (is_object($app)) {\n\t\t\treturn $app;\n\t\t}\n\t\t\n\t\t# Include Models\n\t\t$this->include_models();\n\t\t$this->include_helpers();\n\t\t\n\t\t# Check Installation\n\t\tcheck_installation();\n\t\t\n\t\t# Connect to Database\n\t\t$this->db_connect();\n\t\t\n\t\t# Initialise Variables\n\t\t$this->config\t\t\t\t\t\t\t\t\t\t\t\t= array();\n\t\t$this->template\t\t\t\t\t\t\t\t\t\t\t\t= new Template();\n\t\t$this->user\t\t\t\t\t\t\t\t\t\t\t\t\t= new User(get_user_uid());\n\t\t\n\t\t# Load Configuration\n\t\tforeach($_GLOBALS as $key => $value) {\n\t\t\t$this->config[$key]\t\t\t\t\t\t\t\t\t\t= $value;\n\t\t}\n\t\t\n\t\t# Sanitize all User Input\n\t\t$this->sanitize();\n\t\t\n\t\t# Authenticate User\n\t\tif($this->conf(\"requires_login\")) {\n\t\t\t$this->authenticate();\n\t\t}\n\t}", "public function getApplicationIdentityType(): ?TeamworkApplicationIdentityType {\n $val = $this->getBackingStore()->get('applicationIdentityType');\n if (is_null($val) || $val instanceof TeamworkApplicationIdentityType) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'applicationIdentityType'\");\n }", "public function __construct($id = null) {\n if ($id == null) {\n $id = IdGenerator::generateSecureUniqueId();\n $this->setId($id);\n $this->setType(new UserType());\n $this->setAuthProvider(new UserAuthProvider());\n $this->setSalutation(new UserSalutation());\n $this->setDateCreated(new \\DateTime(\"now\")); //Edit made on 3/31/23 not tested\n } else {\n $this->setId($id);\n }\n }", "public function __construct()\n {\n parent::__construct();\n\n /** @var Config $oConfig */\n $oConfig = Factory::service('Config');\n\n $this->authMfaMode = $oConfig->item('authTwoFactorMode');\n $aConfig = $oConfig->item('authTwoFactor');\n $this->authMfaConfig = $aConfig[$this->authMfaMode];\n }", "public function __construct(array $data = [])\n\t{\n\t\t$this->id = isset($data['id']) ? $data['id'] : $this->generateRequestId();\n\t\t$this->time = microtime(true);\n\t\t$this->updateToken = isset($data['updateToken']) ? $data['updateToken'] : $this->generateUpdateToken();\n\n\t\tforeach ($data as $key => $val) $this->$key = $val;\n\n\t\t$this->currentLog = new Log($this->log);\n\t\t$this->currentTimeline = new Timeline\\Timeline($this->timelineData);\n\t}", "public function Initialize()\n\t\t{\n\t\t\t$this->intIdOrganization = Organization::IdOrganizationDefault;\n\t\t\t$this->strName = Organization::NameDefault;\n\t\t\t$this->strPhone = Organization::PhoneDefault;\n\t\t\t$this->strQrCode = Organization::QrCodeDefault;\n\t\t\t$this->strOrganizationImage = Organization::OrganizationImageDefault;\n\t\t\t$this->strLatitude = Organization::LatitudeDefault;\n\t\t\t$this->strLongitude = Organization::LongitudeDefault;\n\t\t\t$this->strCountry = Organization::CountryDefault;\n\t\t\t$this->strCity = Organization::CityDefault;\n\t\t\t$this->strAddress = Organization::AddressDefault;\n\t\t\t$this->intIdOrganizationType = Organization::IdOrganizationTypeDefault;\n\t\t\t$this->intIdOwner = Organization::IdOwnerDefault;\n\t\t}", "public function __construct()\n {\n Config::set('jwt.user', User::class);\n Config::set('auth.providers', [\n 'users' => [\n 'driver' => 'eloquent',\n 'model' => User::class,\n ]]);\n }", "protected function create(array $data)\n {\n\t\t/*\n\t // Recogemos los valores de la fecha de hoy\n\t $hoy = Carbon::now();\n\n\n return UserApplication::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n\t 'phone' => $data['phone'],\n\t 'birthdate' => Carbon::parse($data['birthdate']),\n 'password' => $data['password'],\n\t 'genre'=>$data['genre'],\n\t 'application_date' => $hoy,\n\t 'ip' => \\Request::ip(),\n\t 'validation_token'=> $data['_token'], //$token,\n\t 'validated_email'=>false,\n ]);*/\n }", "public function __construct()\n {\n $this->setTokenName(config('infusionsoft.token_name'));\n $this->setClientId(config('infusionsoft.client_id'));\n $this->setClientSecret(config('infusionsoft.client_secret'));\n $this->setRedirectUri(url(config('infusionsoft.redirect_uri')));\n if (config('infusionsoft.debug')) {\n $this->setDebug(true);\n }\n $new_token = false;\n if (Storage::exists($this->token_name)) {\n $token = unserialize(Storage::get($this->token_name));\n $this->setToken(new Token($token));\n } elseif (Request::has('code')) {\n $this->requestAccessToken(Request::get('code'));\n $new_token = true;\n } else {\n throw new InfusionsoftException(sprintf(\n 'You must authorize your application here: %s',\n $this->getAuthorizationUrl()\n ), 1);\n }\n $token = $this->getToken();\n $expired = ($token->getEndOfLife() - (time() * 2)) <= 0 ? true : false;\n if ($expired || $new_token) {\n $extra = $token->getExtraInfo();\n if (!$new_token) {\n $token = $this->refreshAccessToken();\n }\n Storage::disk(config('infusionsoft.filesystem'))->put($this->token_name, serialize([\n \"access_token\" => $token->getAccessToken(),\n \"refresh_token\" => $token->getRefreshToken(),\n \"expires_in\" => $token->getEndOfLife(),\n \"token_type\" => $extra['token_type'],\n \"scope\" => $extra['scope'],\n ]));\n }\n }", "public function __construct()\n {\n// var_dump(\"UserName: \".$user->getId());\n// $this->tokenStorage = $tokenStorage;\n// $this->creator = $tokenStorage->getToken()->getUser();\n $this->created = new \\DateTime('now');\n $this->roles = ['ROLE_USER'];\n }", "public function __construct(CreateUserActivityUseCase $usecase)\n {\n $this->usecase = $usecase;\n }", "public function init()\n {\n \t$auth = Zend_Auth::getInstance();\n \tif($auth->hasIdentity()){\n \t\t$this->identity = $auth->getIdentity();\n \t}\n }", "public function __construct(Application $application)\n\t{\n\t\t$this->application = $application;\n\t}", "public function __construct()\n {\n $this->setCreationDate(new \\DateTime());\n $this->setIsActive(true);\n }", "public function createApplication()\n {\n }", "public function __construct(BaseApplication $application)\n\t{\n\t\t$this->_application = $application;\n\t}", "public function __construct()\n {\n $this->userModel = new User();\n $this->instituteModel = new Institute(UserCommon::getLoggedInUserId());\n $this->common = new InstituteType();\n \n }", "private function __construct() {\r\n\t\t$this->_applicationName = 'Membership';\r\n\t\t$this->_backend = new Membership_Backend_MembershipData();\r\n\t\t$this->_modelName = 'Membership_Model_MembershipData';\r\n\t\t$this->_currentAccount = Tinebase_Core::getUser();\r\n\t\t$this->_purgeRecords = FALSE;\r\n\t\t$this->_doContainerACLChecks = FALSE;\r\n\t\t$this->_config = isset(Tinebase_Core::getConfig()->somembers) ? Tinebase_Core::getConfig()->somembers : new Zend_Config(array());\r\n\t}", "public function makeFtthApplication($ftthApplicationFields = [])\n {\n /** @var FtthApplicationRepository $ftthApplicationRepo */\n $ftthApplicationRepo = App::make(FtthApplicationRepository::class);\n $theme = $this->fakeFtthApplicationData($ftthApplicationFields);\n return $ftthApplicationRepo->create($theme);\n }", "public function setIdentity($var)\n {\n GPBUtil::checkString($var, True);\n $this->identity = $var;\n\n return $this;\n }", "public function __construct() {\n header('P3P:CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"');\n $config = array(\n 'appId' => FBConfig::appID(),\n 'secret' => FBConfig::appSecret());\n parent::__construct($config);\n return ($this->getUser());\n }", "public function __construct($model = null)\n {\n if ($model) {\n $this->model = $model;\n }\n\n $this->lockID = bin2hex(random_bytes(32));\n }", "private function createAppReviewUser()\n {\n\n $user = new Users();\n $user->setFullname(self::AppReviewName);\n $user->setIsActive(true);\n $user->setLegacyPassword('');\n $user->setSalt('');\n $user->setSingleMsg(false);\n $this->pwdHelper->SaveUserPassword($user, self::AppReviewPassword);\n $this->em->persist($user);\n $this->em->flush();\n\n // Add the user to the org\n\n $orgMember = new OrgMembers();\n $orgMember->setUser($user);\n $orgMember->setOrg($this->appReviewOrg);\n $orgMember->setIsHidden(false);\n $orgMember->setIsAdmin(true);\n $orgMember->setIsApproved(true);\n $this->em->persist($orgMember);\n $this->em->flush();\n\n // Add the user to each of the three groups\n\n $this->addUserToGroup($user, $this->mentors);\n $this->addUserToGroup($user, $this->students);\n $this->addUserToGroup($user, $this->parents);\n\n $this->mentorUserIds[] = $user->getId();\n $this->studentUserIds[] = $user->getId();\n $this->parentUserIds[] = $user->getId();\n\n // Add an email contact record\n\n $contactEmail = new Contacts();\n $contactEmail->setContact(self::AppReviewEmail);\n $contactEmail->setContactType(Contacts::TYPE_EMAIL);\n $contactEmail->setUser($user);\n $this->em->persist($contactEmail);\n $this->em->flush();\n\n // Add a phone contact record\n\n $contactPhone = new Contacts();\n $contactPhone->setContact($this->generateRandomPhone());\n $contactPhone->setContactType(Contacts::TYPE_PHONE);\n $contactPhone->setUser($user);\n $this->em->persist($contactPhone);\n $this->em->flush();\n }", "public function __construct( $config )\n\t\t{\n\t\t\t$CI =& get_instance();\n\t\t\t$CI->load->library('session');\n\t\t\t\n\t\t\t$this->session =& $CI->session;\n\t\t\t\n\t\t\t// add default session-key to config, the parent will overwrite this if \n\t\t\t// present in config\n\t\t\t$this->setConfig( 'session-key', 'emol-{instancename}-apihash' );\n\t\t\t\n\t\t\t$result = parent::__construct( $config );\n\t\t}", "public function __construct( int|string|null $Value = null )\n\t{\n\t\t$this->Data = gmp_init( 0 );\n\n\t\tif( $Value === null )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// SetFromString\n\t\tif( preg_match( '/^STEAM_(?P<universe>[0-4]):(?P<authServer>[0-1]):(?P<id>0|[1-9][0-9]{0,9})$/', (string)$Value, $Matches ) === 1 )\n\t\t{\n\t\t\t$AccountID = $Matches[ 'id' ];\n\n\t\t\t// Check for max unsigned 32-bit number\n\t\t\tif( gmp_cmp( $AccountID, '4294967295' ) > 0 )\n\t\t\t{\n\t\t\t\tthrow new InvalidArgumentException( 'Provided SteamID exceeds max unsigned 32-bit integer.' );\n\t\t\t}\n\n\t\t\t$Universe = (int)$Matches[ 'universe' ];\n\n\t\t\t// Games before orange box used to incorrectly display universe as 0, we support that\n\t\t\tif( $Universe === self::UniverseInvalid )\n\t\t\t{\n\t\t\t\t$Universe = self::UniversePublic;\n\t\t\t}\n\n\t\t\t$AuthServer = (int)$Matches[ 'authServer' ];\n\t\t\t$AccountID = ( (int)$AccountID << 1 ) | $AuthServer;\n\n\t\t\t$this->SetAccountUniverse( $Universe );\n\t\t\t$this->SetAccountInstance( self::DesktopInstance );\n\t\t\t$this->SetAccountType( self::TypeIndividual );\n\t\t\t$this->SetAccountID( $AccountID );\n\t\t}\n\t\t// SetFromSteam3String\n\t\telse if( preg_match( '/^\\\\[(?P<type>[AGMPCgcLTIUai]):(?P<universe>[0-4]):(?P<id>0|[1-9][0-9]{0,9})(?:\\:(?P<instance>[0-9]+))?\\\\]$/', (string)$Value, $Matches ) === 1 )\n\t\t{\n\t\t\t$AccountID = $Matches[ 'id' ];\n\n\t\t\t// Check for max unsigned 32-bit number\n\t\t\tif( gmp_cmp( $AccountID, '4294967295' ) > 0 )\n\t\t\t{\n\t\t\t\tthrow new InvalidArgumentException( 'Provided SteamID exceeds max unsigned 32-bit integer.' );\n\t\t\t}\n\n\t\t\t$Type = $Matches[ 'type' ];\n\n\t\t\tif( $Type === 'i' )\n\t\t\t{\n\t\t\t\t$Type = 'I';\n\t\t\t}\n\n\t\t\tif( $Type === 'T' || $Type === 'g' )\n\t\t\t{\n\t\t\t\t$InstanceID = self::AllInstances;\n\t\t\t}\n\t\t\telse if( isset( $Matches[ 'instance' ] ) )\n\t\t\t{\n\t\t\t\t$InstanceID = (int)$Matches[ 'instance' ];\n\t\t\t}\n\t\t\telse if( $Type === 'U' )\n\t\t\t{\n\t\t\t\t$InstanceID = self::DesktopInstance;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$InstanceID = self::AllInstances;\n\t\t\t}\n\n\t\t\tif( $Type === 'c' )\n\t\t\t{\n\t\t\t\t$InstanceID = self::InstanceFlagClan;\n\n\t\t\t\t$this->SetAccountType( self::TypeChat );\n\t\t\t}\n\t\t\telse if( $Type === 'L' )\n\t\t\t{\n\t\t\t\t$InstanceID = self::InstanceFlagLobby;\n\n\t\t\t\t$this->SetAccountType( self::TypeChat );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/** @var int $AccountType */\n\t\t\t\t$AccountType = array_search( $Type, self::$AccountTypeChars, true );\n\n\t\t\t\t$this->SetAccountType( $AccountType );\n\t\t\t}\n\n\t\t\t$this->SetAccountUniverse( (int)$Matches[ 'universe' ] );\n\t\t\t$this->SetAccountInstance( $InstanceID );\n\t\t\t$this->SetAccountID( $AccountID );\n\t\t}\n\t\telse if( self::IsNumeric( $Value ) )\n\t\t{\n\t\t\t$this->Data = gmp_init( $Value, 10 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new InvalidArgumentException( 'Provided SteamID is invalid.' );\n\t\t}\n\t}", "public function setUp()\n {\n $this->application = new Application([\n 'donor' => [\n 'name' => [\n 'title' => 'Dr',\n 'first' => 'Ross',\n 'last' => 'Gellar',\n ],\n 'dob' => $this->dateTimeToString(new DateTime('1966-11-02')),\n ],\n 'attorney' => [\n 'name' => [\n 'title' => 'Miss',\n 'first' => 'Monica',\n 'last' => 'Gellar',\n ],\n 'dob' => $this->dateTimeToString(new DateTime('1964-06-15')),\n ],\n 'contact' => [\n 'email' => '[email protected]',\n 'mobile' => '07712 123456',\n ],\n 'verification' => [\n 'case-number' => '123456789',\n 'donor-postcode' => 'AB1 2CD',\n 'attorney-postcode' => 'WX9 8YZ',\n ],\n 'account' => [\n 'name' => 'DR R GELLAR',\n ],\n ]);\n\n $this->payment = new Payment([\n 'amount' => '',\n 'method' => '',\n 'added-date-time' => $this->dateTimeToString(new DateTime()),\n 'processed-date-time' => $this->dateTimeToString(new DateTime()),\n ]);\n }", "public function __construct()\n {\n require_once(dirname(__FILE__).'/../../../behat4eve2Plugin/vendor/autoload.php');\n require_once(dirname(__FILE__).'/../../../../config/ProjectConfiguration.class.php');\n\n $configuration = ProjectConfiguration::getApplicationConfiguration('default', 'dev', true);\n sfContext::createInstance($configuration);\n }", "public function __construct(){\r\n //$this->id = $id;\r\n //$this->email = $email;\r\n //$this->username = $username;\r\n //$this->password = $password;\r\n //$this->TDG = new UserTDG;\r\n }", "public function __construct($appId = null, $appSecret = null)\r\r\n {\r\r\n $this->appId = FacebookSession::_getTargetAppId($appId);\r\r\n $this->appSecret = FacebookSession::_getTargetAppSecret($appSecret);\r\r\n\r\r\n $this->instantiateSignedRequest();\r\r\n }", "public function __construct($email, $password, $lookup_data){\n\t\t$this->identity = $email;\n\t\t$this->password = md5($password);\n\t\t$this->lookup_data = $lookup_data;\n\t\t$this->roles = array(\"admin\",\"customer\",\"agent\",\"landlord\",\"tenant\",\"tech\");\n\t\t\t\n\t}", "function __construct()\n {\n parent::__construct();\n $this->load->helper(array(\n 'form',\n 'url',\n 'security'\n ));\n $this->load->model('api/TasklistAccountPlanning_model');\n $this->load->model('PerformanceAccountPlanning_model');\n $this->load->model('MonitoringAccountPlanning_model');\n $this->load->model('MonitoringRm_model');\n\n $current_datetime = new DateTime(date('Y-m-d H:i:s'));\n $this->current_year = $current_datetime->format('Y');\n $this->month_current = $current_datetime->format('m');\n $this->current_date = $current_datetime->format('Y-m-d');\n $this->current_datetime = $current_datetime->format('Y-m-d H:i:s');\n\n $this->checkTokenMobile();\n }", "protected function create(array $data)\n {\n unset($data['approved_at']);\n unset($data['password_confirmation']);\n\n $data['approval_token'] = sha1(uniqid('approval'));\n\n return User::create($data);\n }", "public function testAuthenticateNonExistingIdentity()\n {\n $this->mockWebApplication([\n 'modules' => [\n 'oauth2' => [\n 'resourceServerAccessTokenRevocationValidation' => false, // Token revocation validation is tested during functional testing.\n ]\n ],\n 'components' => [\n 'user' => [\n 'identityClass' => get_class(new class extends TestUserModel {\n public static function findIdentityByAccessToken($token, $type = null)\n {\n return null;\n }\n })\n ],\n ],\n ]);\n // phpcs:enable Generic.Files.LineLength.TooLong\n\n $request = Yii::$app->request;\n $response = Yii::$app->response;\n $request->headers->set('Authorization', 'Bearer ' . $this->validAccessToken);\n\n $httpBearerAuth = new Oauth2HttpBearerAuth([\n 'realm' => 'test-realm',\n ]);\n\n try {\n $httpBearerAuth->authenticate(Yii::$app->user, $request, $response);\n } catch (\\Exception $e) {\n }\n\n $this->assertInstanceOf(UnauthorizedHttpException::class, $e);\n $this->assertEquals('Bearer realm=\"test-realm\"', $response->headers->get('WWW-Authenticate'));\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "public function setUp() {\n $this->command = new GeneratePrivateKey();\n\n $application = new Application();\n $application->add($this->command);\n }", "public function __construct(ProgramManagerTwigExtensions $app)\n {\n $this->twigExt = $app;\n $this->app = $app->app;\n $this->config = $this->app[Extension::CONTAINER]->config;\n //$this->program = $program_id;\n // $this->app->post($this->submitUrl(), function(Request $request) { \n // return $this->handleForm($request); \n // });\n //$this->app['twig.loader.filesystem']->addPath(dirname(__DIR__) . \"/assets\");\n //Session behaves weirdly inside the following \"after\" middleware, so capture needed session info here.\n $this->contact_success = $this->twigExt->getExtensionBase()->getFlash('registration_success');\n $this->contact_invalid_form = $this->twigExt->getExtensionBase()->getFlash('registration_invalid_form'); \n $client = new Google_Client();\n \n }", "public function setIdentity(string $identity): self\n {\n $this->options['identity'] = $identity;\n return $this;\n }", "public function setIdentity(string $identity): self\n {\n $this->options['identity'] = $identity;\n return $this;\n }", "public function __construct(array $config = array()) {\n $defaults = array(\n 'filters' => array(),\n 'field' => 'openid_identifier',\n 'domain' => 'localhost'\n );\n \n parent::__construct($config + $defaults);\n }", "function __construct()\n {\n $this ->user = User::createInstance();\n }", "protected function createSchedulerUser() {}", "public function defaultUser()\n {\n if ($this->defaultUser){\n\n return $this->defaultUser;\n }\n\n return $this->defaultUser = factory(\\App\\User::class)->create();\n }", "public function __construct()\n {\n $this->user_id = Auth::id();\n }", "public function __construct()\n {\n $this->initCurrentUser();\n }", "public function __construct(int $id = null)\n {\n if ($id !== null) {\n $id = (int) $id;\n $token = $this->execute_query(\n \"SELECT * FROM email_credential\n WHERE id = '$id'\n AND deleted IS NULL\"\n )->fetch_object(\"Sizzle\\Bacon\\Database\\EmailCredential\");\n if (is_object($token)) {\n foreach (get_object_vars($token) as $key => $value) {\n $this->$key = $value;\n }\n }\n }\n }", "public function createIdentityFor(RequestPayload $payload);", "public function setIdentity($value)\n {\n $this->_identity = $value;\n return $this;\n }", "public function setIdentity($value)\n {\n $this->_identity = $value;\n return $this;\n }", "public function setIdentity($value)\n {\n $this->_identity = $value;\n return $this;\n }", "public function __construct(Application $application)\n\t{\n\t\tparent::__construct();\n\t\t$this->application = $application;\n\t\t\n\t}", "public function __construct(){\r\n\t\techo \"123\";\r\n\t\t$INI=$this->Ini();\r\n\t\tif(!isset($_SESSION['enterprise_id']))\r\n\t\t{\r\n\r\n\t\t\tUtility::Redirect(URL_HOME_ENTERPRISE.'/user/login');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->enterprise_id =intval($_SESSION['enterprise_id']);\r\n\r\n\t\t}\r\n\t\tparent::__construct();\r\n\t}", "public function __construct() {\r\n $this->firstname=NULL;\r\n $this->lastname=NULL;\r\n $this->email=NULL;\r\n $this->password=NULL;\r\n $this->authenticated=FALSE;\r\n $this->club_id=NULL;\r\n }", "abstract public function createApplication();", "public function __construct($data = null)\n {\n $data= Core::getUser()->accountId;\n $this->data = $data;\n }", "public function mapToEntity(array $data)\n {\n $identity = new Paysera_WalletApi_Entity_User_Identity();\n\n if (isset($data['name'])) {\n $identity->setName($data['name']);\n }\n\n if (isset($data['surname'])) {\n $identity->setSurname($data['surname']);\n }\n\n if (isset($data['nationality'])) {\n $identity->setNationality($data['nationality']);\n }\n\n if (isset($data['code'])) {\n $identity->setCode($data['code']);\n }\n\n return $identity;\n }", "public function setIdentityClass($className)\n {\n $this->identityClass = $className;\n return $this;\n }", "public function __construct($appId = null)\n {\n $this\n ->setAppId($appId);\n }", "public function __construct() {\n $this->middleware('auth');\n\n $date = new Datetime('now');\n $this->current_timestamp = strtotime($date->format('Y-m-d H:i:s'));\n\n $this->user = UserHelper::getUserInfo();\n $this->roles = Session::get('roles');\n\n $this->tb_unique_id = IdGenerator::generateId();\n\n $this->action = Input::has('action') ? Input::get('action') : false;\n $this->txt_hservices_id = Input::has('healthcareservice_id') ? Input::get('healthcareservice_id') : false;\n\n $this->params = array(\n \"txt_id\" => Input::has('examination_id') ? Input::get('examination_id') : false,\n \"txt_anatomy\" => Input::has('anatomy') ? Input::get('anatomy') : false,\n );\n\n\n }", "public function __construct(year $year, week $week, task $task, classified $classified, user $user, vatclients $vatclients)\n\t{\n\t\t$this->middleware('userauth');\n\t\t$this->year = $year;\n\t\t$this->week = $week;\n\t\t$this->task = $task;\n\t\t$this->classified = $classified;\n\t\t$this->user = $user;\n\t\t$this->vatclients = $vatclients;\n\t\tdate_default_timezone_set(\"Europe/Dublin\");\n\t}", "public function __construct() {\r\n\t\t$this->daoFactory = new DaoFactory ();\r\n\t\t$this->daoFactory->initDbResources ();\r\n\t\t$this->appUserDao = $this->daoFactory->getAppUserDao ();\r\n\t\t$this->coreAuthenticationFactory = new CoreAuthenticationFactory ( $this->appUserDao );\r\n\t\t$this->validationFactory = new ValidationFactory ();\r\n\t\t$this->appName = APP_NAME;\r\n\t\t$this->baseUrl = \"http://\" . BASE_URL;\r\n\t}", "public function __construct()\n {\n $this->middleware('auth');\n $this->half_day_holidays = 5;\n $this->holidays = [6];\n $this->choose_start = 'now';\n }", "public function __construct()\n {\n $this->uid = null;\n $this->fields = array('username' => '',\n 'password' => '',\n 'emailAddr' => '',\n 'isActive' => false);\n }", "public function __construct()\n {\n $this->authentication = new Authentication(\n getenv('AUTH_DOMAIN'),\n getenv('AUTH_CLIENT_ID'),\n getenv('AUTH_CLIENT_SECRET'),\n getenv('AUTH_AUDIENCE')\n );\n }", "function __construct() {\n parent::__construct();\n $this->id = $this->getUserID(Session::get('user'));\n $this->FirstName = $this->getUserFirstName($this->id);\n $this->email = $_SESSION['user'];\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->config = config('gitception');\n\n if(!$this->config['email'] || !$this->config['password']){\n return;\n }\n\n $email = Crypt::decrypt($this->config['email']);\n $password = Crypt::decrypt($this->config['password']);\n\n $this->bitbucket = new Issues();\n $this->bitbucket->setCredentials(new Basic($email, $password));\n }", "public static function createTestUser()\n\t{\n\t\tKinvey::setAuthMode('app');\n\t\t$user = new User();\n\t\t$user->setRawAttributes(array(\n\t\t\t'email'\t => '[email protected]',\n\t\t\t'first_name'=> 'Test',\n\t\t\t'last_name' => 'Guy',\n\t\t\t'password' \t=> str_random(8),\n\t\t\t'original' => 'baz'\n\t\t));\n\t\t$user->save();\n\t\tKinvey::setAuthMode('admin');\n\t\treturn $user;\n\t}" ]
[ "0.6750662", "0.510589", "0.5028109", "0.5024034", "0.49640036", "0.49209484", "0.4916008", "0.49033433", "0.48542187", "0.4847906", "0.484605", "0.48248124", "0.48190382", "0.480061", "0.48004574", "0.47996485", "0.47817674", "0.4754837", "0.47523707", "0.47188997", "0.47038215", "0.46849364", "0.46654627", "0.46621573", "0.46516272", "0.46496147", "0.46285397", "0.46280542", "0.462527", "0.45927674", "0.45926476", "0.45906913", "0.4586237", "0.458142", "0.4575029", "0.45710957", "0.45643377", "0.45614806", "0.4555424", "0.45534453", "0.4548378", "0.45469737", "0.4544142", "0.45372424", "0.45324627", "0.45227873", "0.4522143", "0.45183957", "0.45177338", "0.45170185", "0.4516076", "0.45028564", "0.45028254", "0.45027578", "0.4498734", "0.4493328", "0.4467846", "0.44667006", "0.44653973", "0.44618145", "0.44616795", "0.4449915", "0.44455326", "0.4443448", "0.44434103", "0.44393194", "0.44376385", "0.44335997", "0.44278836", "0.4427572", "0.44226053", "0.44226053", "0.44199434", "0.44156998", "0.4414543", "0.44123554", "0.4411927", "0.44092742", "0.44029883", "0.44021225", "0.44005403", "0.44005403", "0.44005403", "0.4400498", "0.43991777", "0.4394081", "0.43893725", "0.4383781", "0.43830803", "0.43780634", "0.43751755", "0.43735972", "0.43734512", "0.43733296", "0.43682227", "0.4365775", "0.43570644", "0.4355018", "0.4354267", "0.43510047" ]
0.6724186
1
Creates a new instance of the appropriate class based on discriminator value
public static function createFromDiscriminatorValue(ParseNode $parseNode): TeamworkApplicationIdentity { return new TeamworkApplicationIdentity(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceManagementConfigurationSettingInstance {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionInstance': return new DeviceManagementConfigurationChoiceSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance': return new DeviceManagementConfigurationChoiceSettingInstance();\n case '#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstance': return new DeviceManagementConfigurationGroupSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationGroupSettingInstance': return new DeviceManagementConfigurationGroupSettingInstance();\n case '#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionInstance': return new DeviceManagementConfigurationSettingGroupCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationSettingGroupInstance': return new DeviceManagementConfigurationSettingGroupInstance();\n case '#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance': return new DeviceManagementConfigurationSimpleSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance': return new DeviceManagementConfigurationSimpleSettingInstance();\n }\n }\n return new DeviceManagementConfigurationSettingInstance();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ThreatSubmission {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.security.emailContentThreatSubmission': return new EmailContentThreatSubmission();\n case '#microsoft.graph.security.emailThreatSubmission': return new EmailThreatSubmission();\n case '#microsoft.graph.security.emailUrlThreatSubmission': return new EmailUrlThreatSubmission();\n case '#microsoft.graph.security.fileContentThreatSubmission': return new FileContentThreatSubmission();\n case '#microsoft.graph.security.fileThreatSubmission': return new FileThreatSubmission();\n case '#microsoft.graph.security.fileUrlThreatSubmission': return new FileUrlThreatSubmission();\n case '#microsoft.graph.security.urlThreatSubmission': return new UrlThreatSubmission();\n }\n }\n return new ThreatSubmission();\n }", "public function setDiscriminator($discriminator)\n {\n $this->discriminator = $discriminator;\n return $this;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): BusinessScenario {\n return new BusinessScenario();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Artifact {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.security.host': return new Host();\n case '#microsoft.graph.security.hostComponent': return new HostComponent();\n case '#microsoft.graph.security.hostCookie': return new HostCookie();\n case '#microsoft.graph.security.hostname': return new Hostname();\n case '#microsoft.graph.security.hostSslCertificate': return new HostSslCertificate();\n case '#microsoft.graph.security.hostTracker': return new HostTracker();\n case '#microsoft.graph.security.ipAddress': return new IpAddress();\n case '#microsoft.graph.security.passiveDnsRecord': return new PassiveDnsRecord();\n case '#microsoft.graph.security.sslCertificate': return new SslCertificate();\n case '#microsoft.graph.security.unclassifiedArtifact': return new UnclassifiedArtifact();\n }\n }\n return new Artifact();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ExactMatchJobBase {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.exactMatchLookupJob': return new ExactMatchLookupJob();\n case '#microsoft.graph.exactMatchSession': return new ExactMatchSession();\n case '#microsoft.graph.exactMatchSessionBase': return new ExactMatchSessionBase();\n }\n }\n return new ExactMatchJobBase();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AndroidWorkProfileCertificateProfileBase {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.androidWorkProfilePkcsCertificateProfile': return new AndroidWorkProfilePkcsCertificateProfile();\n case '#microsoft.graph.androidWorkProfileScepCertificateProfile': return new AndroidWorkProfileScepCertificateProfile();\n }\n }\n return new AndroidWorkProfileCertificateProfileBase();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AuthenticationMethodTarget {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.microsoftAuthenticatorAuthenticationMethodTarget': return new MicrosoftAuthenticatorAuthenticationMethodTarget();\n case '#microsoft.graph.smsAuthenticationMethodTarget': return new SmsAuthenticationMethodTarget();\n case '#microsoft.graph.voiceAuthenticationMethodTarget': return new VoiceAuthenticationMethodTarget();\n }\n }\n return new AuthenticationMethodTarget();\n }", "public function create(string $class);", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DelegatedPermissionClassification {\n return new DelegatedPermissionClassification();\n }", "public static final function of($class) {\n return self::typeOf($class)->newInstance();\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ObjectMapping {\n return new ObjectMapping();\n }", "function get_new($class, $params=NULL)\r\n\t{\r\n\t\t$obj = $this->singularize(ucwords($class));\r\n\t\treturn new $obj($params);\r\n\t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): StsPolicy {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.activityBasedTimeoutPolicy': return new ActivityBasedTimeoutPolicy();\n case '#microsoft.graph.claimsMappingPolicy': return new ClaimsMappingPolicy();\n case '#microsoft.graph.homeRealmDiscoveryPolicy': return new HomeRealmDiscoveryPolicy();\n case '#microsoft.graph.tokenIssuancePolicy': return new TokenIssuancePolicy();\n case '#microsoft.graph.tokenLifetimePolicy': return new TokenLifetimePolicy();\n }\n }\n return new StsPolicy();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): PayloadByFilter {\n return new PayloadByFilter();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): CloudPcGalleryImage {\n return new CloudPcGalleryImage();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): CommsOperation {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.addLargeGalleryViewOperation': return new AddLargeGalleryViewOperation();\n case '#microsoft.graph.cancelMediaProcessingOperation': return new CancelMediaProcessingOperation();\n case '#microsoft.graph.inviteParticipantsOperation': return new InviteParticipantsOperation();\n case '#microsoft.graph.muteParticipantOperation': return new MuteParticipantOperation();\n case '#microsoft.graph.muteParticipantsOperation': return new MuteParticipantsOperation();\n case '#microsoft.graph.playPromptOperation': return new PlayPromptOperation();\n case '#microsoft.graph.recordOperation': return new RecordOperation();\n case '#microsoft.graph.startHoldMusicOperation': return new StartHoldMusicOperation();\n case '#microsoft.graph.stopHoldMusicOperation': return new StopHoldMusicOperation();\n case '#microsoft.graph.subscribeToToneOperation': return new SubscribeToToneOperation();\n case '#microsoft.graph.unmuteParticipantOperation': return new UnmuteParticipantOperation();\n case '#microsoft.graph.updateRecordingStatusOperation': return new UpdateRecordingStatusOperation();\n }\n }\n return new CommsOperation();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): GroupPolicyUploadedPresentation {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.groupPolicyPresentationCheckBox': return new GroupPolicyPresentationCheckBox();\n case '#microsoft.graph.groupPolicyPresentationComboBox': return new GroupPolicyPresentationComboBox();\n case '#microsoft.graph.groupPolicyPresentationDecimalTextBox': return new GroupPolicyPresentationDecimalTextBox();\n case '#microsoft.graph.groupPolicyPresentationDropdownList': return new GroupPolicyPresentationDropdownList();\n case '#microsoft.graph.groupPolicyPresentationListBox': return new GroupPolicyPresentationListBox();\n case '#microsoft.graph.groupPolicyPresentationLongDecimalTextBox': return new GroupPolicyPresentationLongDecimalTextBox();\n case '#microsoft.graph.groupPolicyPresentationMultiTextBox': return new GroupPolicyPresentationMultiTextBox();\n case '#microsoft.graph.groupPolicyPresentationText': return new GroupPolicyPresentationText();\n case '#microsoft.graph.groupPolicyPresentationTextBox': return new GroupPolicyPresentationTextBox();\n }\n }\n return new GroupPolicyUploadedPresentation();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Teamwork {\n return new Teamwork();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Photo {\n return new Photo();\n }", "function _new($classe)\n{\n return new $classe($bdd, $ObjetBDDParam);\n}", "public function getDiscriminator()\n {\n return $this->discriminator;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceManagementConfigurationCategory {\n return new DeviceManagementConfigurationCategory();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): PrivilegedAccessScheduleInstance {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance': return new PrivilegedAccessGroupAssignmentScheduleInstance();\n case '#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance': return new PrivilegedAccessGroupEligibilityScheduleInstance();\n }\n }\n return new PrivilegedAccessScheduleInstance();\n }", "public function setDiscriminatorValue($discriminatorValue)\n {\n $this->discriminatorValue = $discriminatorValue;\n return $this;\n }", "public function make($type);", "public static function create($type = NULL) {\n if ($type) {\n $cname = \"BMAttack\" . ucfirst(strtolower($type));\n if (class_exists($cname)) {\n return $cname::create();\n } else {\n return NULL;\n }\n }\n\n $class = get_called_class();\n return new $class;\n }", "public function func($choice) \n {\n if($choice == \"bs\")\n {\n return (new blood_sugar);\n }\n \n elseif ($choice == \"bp\")\n {\n return (new blood_pressure);\n }\n \n elseif ($choice == \"wt\")\n {\n return (new weight);\n }\n }", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ProcessEvidence {\n return new ProcessEvidence();\n }", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): IosVpnConfiguration {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.iosikEv2VpnConfiguration': return new IosikEv2VpnConfiguration();\n }\n }\n return new IosVpnConfiguration();\n }", "public static function factory($flags = null, $class_name = null) {}", "public static function factory($flags = null, $class_name = null) {}", "public static function get_new($type) {\n // Get type name\n if (!$type) {\n $type = 'general';\n }\n if (!preg_match('~^[a-z][a-z0-9_]*$~', $type)) {\n throw new coding_exception(\"Invalid forum type name: $type\");\n }\n $classname = 'forumngtype_' . $type;\n\n // Require library\n global $CFG;\n require_once(dirname(__FILE__) . \"/$type/$classname.php\");\n\n // Create and return type object\n return new $classname;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): UserExperienceAnalyticsDeviceStartupProcessPerformance {\n return new UserExperienceAnalyticsDeviceStartupProcessPerformance();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceHealthScript {\n return new DeviceHealthScript();\n }", "public static function create($config) {\n if(isset($config['type']) && class_exists($config['type'])) {\n $item = new $config['type'];\n $item->config = $config;\n return $item;\n }\n return null;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AccessPackageQuestion {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.accessPackageMultipleChoiceQuestion': return new AccessPackageMultipleChoiceQuestion();\n case '#microsoft.graph.accessPackageTextInputQuestion': return new AccessPackageTextInputQuestion();\n }\n }\n return new AccessPackageQuestion();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ZebraFotaDeployment {\n return new ZebraFotaDeployment();\n }", "function new_instance($class)\n {\n }", "public function getTargetType($type) {\n $retObj = array();\n switch ($type) {\n case 'Brand':\n $retObj[] = new ProductBrand($this->targetData);\n $retObj[] = new ProductBrand();\n \n return $retObj;\n break;\n case 'Condition':\n $retObj[] = new ProductCanonicalCondition($this->targetData);\n $retObj[] = new ProductCanonicalCondition();\n \n return $retObj;\n break;\n case 'Category':\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1', $this->targetData);\n $retObj[] = new ProductBiddingCategory('BIDDING_CATEGORY_L1');\n \n return $retObj;\n break;\n case 'Channel':\n $retObj[] = new ProductChannel($this->targetData);\n $retObj[] = new ProductChannel();\n \n return $retObj;\n break;\n case 'Item ID':\n $retObj[] = new ProductOfferId($this->targetData);\n $retObj[] = new ProductOfferId();\n \n return $retObj;\n break;\n case 'Product type':\n $retObj[] = new ProductType('PRODUCT_TYPE_L1', $this->targetData);\n $retObj[] = new ProductType('PRODUCT_TYPE_L1');\n \n return $retObj;\n break;\n case 'Channel exclusivity':\n $retObj[] = new ProductChannelExclusivity($this->targetData);\n $retObj[] = new ProductChannelExclusivity();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_0':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_1':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_2':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_3':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n case 'CUSTOM_ATTRIBUTE_4':\n $retObj[] = new ProductCustomAttribute($type, $this->targetData);\n $retObj[] = new ProductCustomAttribute($type);\n $retObj[] = new ProductCustomAttribute();\n \n return $retObj;\n break;\n \n default:\n break;\n }\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): EducationOneRosterApiDataProvider {\n return new EducationOneRosterApiDataProvider();\n }", "static private function createInstance($className, ECash_Config $baseConfig = null)\r\n\t{\r\n\t\t//if (is_null($className))\r\n\t\t//{\r\n\t\t//\tthrow new Exception(\"NULL configuration class name passed\");\r\n\t\t//}\r\n\r\n\t\tif (!class_exists($className))\r\n\t\t{\r\n\t\t\tthrow new Exception(\"$className class does not exist\");\r\n\t\t}\r\n\r\n\t\t$classRefl = new ReflectionClass($className);\r\n\t\tif (!$classRefl->isSubclassOf(__CLASS__))\r\n\t\t{\r\n\t\t\tthrow new Exception(\"$className is not a child of \". __CLASS__);\r\n\t\t}\r\n\r\n\t\treturn new $className($baseConfig);\r\n\t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): MacOSCustomConfiguration {\n return new MacOSCustomConfiguration();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ItemPhone {\n return new ItemPhone();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ManagedMobileApp {\n return new ManagedMobileApp();\n }", "static function make($type)\n {\n $scraper = null;\n\n switch ($type) {\n case 'ElAderezo':\n $scraper = new ScraperElAderezo;\n break; \n case 'GastronomiaYCia':\n $scraper = new ScraperGastronomiaYCia;\n break;\n case 'UtensiliosDeCocina':\n $scraper = new ScraperUtensiliosDeCocina;\n break;\n } \n return $scraper;\n }", "protected static function newFactory()\n {\n return TypeFactory::new();\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "public static function factory($type)\n {\n if (include_once 'Drivers/' . $type . '.php') {\n $classname = 'Driver_' . $type;\n return new $classname;\n } else {\n throw new Exception('Driver not found');\n }\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Filter {\n return new Filter();\n }", "public static function createModel($type)\n {\n $className = 'app'.d_S.'models'.d_S.ucfirst($type).\"Model\";\n if($className!=NULL)\n {\n return new $className($type);\n }\n else\n {\n echo \"$className Not Found!\";\n }\n }", "public function getDiscriminatorValue()\n {\n return $this->discriminatorValue;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Win32LobAppFileSystemDetection {\n return new Win32LobAppFileSystemDetection();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): IosWebContentFilterSpecificWebsitesAccess {\n return new IosWebContentFilterSpecificWebsitesAccess();\n }", "public function createInstance($identifier)\r\n \t{\r\n \t\t$className = $this->getClassMapper($identifier);\r\n\r\n \t\t$params = array_slice(func_get_args(), 1);\r\n\r\n \t\t// We must use reflection in PHP < 5.6 See http://stackoverflow.com/questions/8734522/dynamically-call-class-with-variable-number-of-parameters-in-the-constructor\r\n \t\t$reflection = new \\ReflectionClass($className);\r\n\r\n return $reflection->newInstanceArgs($params);\r\n \t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): GroupPolicyDefinitionFile {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.groupPolicyUploadedDefinitionFile': return new GroupPolicyUploadedDefinitionFile();\n }\n }\n return new GroupPolicyDefinitionFile();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): IpSecurityProfile {\n return new IpSecurityProfile();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): FileClassificationRequest {\n return new FileClassificationRequest();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Win32LobAppPowerShellScriptRule {\n return new Win32LobAppPowerShellScriptRule();\n }", "public function find(string $class): Instantiator;", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AggregatedInboundStatistics {\n return new AggregatedInboundStatistics();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): UnifiedRoleManagementPolicy {\n return new UnifiedRoleManagementPolicy();\n }", "public function createClass()\n {\n return $this->addExcludesNameEntry($this->classes);\n }", "public static function create($kingdom, $species) {\n switch ($kingdom) {\n case 'Animal':\n $organism = new Animal($species);\n break;\n case 'Plant':\n $organism = new Plant($species);\n default:\n // Probably throw an error here.\n }\n return $organism;\n }", "public function getDiscriminator(): string\n {\n return $this->discriminator;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): MeetingParticipantInfo {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.virtualEventPresenterInfo': return new VirtualEventPresenterInfo();\n }\n }\n return new MeetingParticipantInfo();\n }", "public static function instantiate($row)\n {\n switch ($row['type']){\n case Page::TYPE:\n return new Page();\n case Slide::TYPE:\n return new Slide();\n case TopMenu::TYPE:\n return new TopMenu();\n case News::TYPE:\n return new News();\n default:\n return new self;\n }\n }", "public function getNew()\n {\n $class = get_class($this);\n\n return new $class;\n }", "public function create()\n {\n return new $this->class;\n }", "public static function build($type) {\n $product = $type;\n if (class_exists($product)) {\n return new $product();\n }\n else {\n throw new Exception(\"Invalid product type given.\");\n }\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): AccessReviewDecision {\n return new AccessReviewDecision();\n }", "protected static function GetClassForType($sType)\n {\n $oInstance = null;\n $sClassName = null;\n\n // old format (Class, Subtype, Type) lookup\n if (strstr($sType, ',')) {\n $aParts = explode(',', $sType);\n if (3 == count($aParts)) {\n $sClassName = trim($aParts[0]);\n }\n } else {\n $sClassName = $sType;\n }\n\n if (is_null($sClassName)) {\n trigger_error('ERROR: sType has invalid format (must be of the form CLASSNAME,SUBTYPE,TYPE)', E_USER_ERROR);\n } else {\n $oInstance = new $sClassName();\n }\n\n return $oInstance;\n }", "public static function factory($className = __CLASS__)\n {\n return parent::factory($className);\n }", "public function factoryMethod(): Product\n {\n return new ConcreteProduct1;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): ManagedDeviceMobileAppConfigurationState {\n return new ManagedDeviceMobileAppConfigurationState();\n }", "public function instantiate($className);", "public static function createFromDiscriminatorValue(ParseNode $parseNode): TrainingReminderNotification {\n return new TrainingReminderNotification();\n }", "private function defaultCast(string $type, $value)\n {\n return class_exists($type) ? new $type($value) : $value;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): MacOSDmgApp {\n return new MacOSDmgApp();\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): Qna {\n return new Qna();\n }", "public function getMorphClass();", "public function getMorphClass();", "public function getMorphClass();", "private static function getRaceInstance(string $race): Race\n {\n switch ($race) {\n case \"0\":\n case \"Elf\":\n return new Elf();\n case \"1\":\n case \"Human\":\n return new Human();\n case \"2\":\n case \"Dwarf\":\n return new Dwarf();\n default:\n echo \"invalid race\";\n die;\n }\n }", "static function newobj($type /* ... */){\n if(is_null($type)) return;\n\n $ar = func_get_args();\n $type = array_shift($ar); // remove type/object\n \n try{\n // get the asked class\n if(is_string($type)) $cls = defnz(self::$decode_table,$type,'opc_item_' . $type);\n else if (is_object($type)) $cls = get_class($type);\n else throw new Exception('invalid type: ' . strval($type));\n \n // check this class 8exists, implements opi_item\n if(!class_exists($cls)) \n\tthrow new Exception('unknown class: ' . $cls);\n else if(!in_array('opi_item',class_implements($cls)))\n\tthrow new Exception('not able to handle: ' . $cls);\n \n } catch (Exception $ex) {\n trigger_error('error creating a opc_item: ' . $ex->getMessage(),E_USER_WARNING);\n return NULL;\n }\n \n // crate and call init with the other arguments\n $res = new $cls();\n call_user_func_array(array(&$res,'init'),$ar);\n return $res;\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DirectorySetting {\n return new DirectorySetting();\n }", "public function createInstance($processor);", "public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }", "public function newInstance();", "public function newInstance();", "public static function createFromDiscriminatorValue(ParseNode $parseNode): OnPremisesPublishingSingleSignOn {\n return new OnPremisesPublishingSingleSignOn();\n }", "public static abstract function createInstance();", "function case_default()\n{\n return new CaseDefault();\n}", "function createInstance(ClassDefinition $classDefinition);", "public function getNewEntityClass()\n {\n return new $this->entityClassName();\n }", "public static function factory($className)\n {\n return new $className;\n }", "public function create() {\n\t\t$implementationClassName = 'Imagine\\\\' . $this->settings['driver'] . '\\Imagine';\n\t\treturn new $implementationClassName();\n\t}", "public function createType()\n {\n $o = new TypeSelector();\n $this->appendSelector($o);\n\n return $o;\n }" ]
[ "0.5663202", "0.56524795", "0.55938476", "0.5582519", "0.55732256", "0.5502307", "0.54198116", "0.5367442", "0.5345139", "0.5340543", "0.5317889", "0.53125316", "0.5274097", "0.52523774", "0.52451587", "0.5238258", "0.5223514", "0.52152604", "0.5212037", "0.51939124", "0.5174952", "0.515281", "0.5145421", "0.51320994", "0.5126641", "0.51244414", "0.51131696", "0.51095724", "0.5106034", "0.5076475", "0.50683355", "0.5059517", "0.5054157", "0.5041357", "0.5041357", "0.5029067", "0.49990818", "0.49943754", "0.4992221", "0.49901217", "0.497755", "0.49764502", "0.49659026", "0.49652568", "0.49549586", "0.49476686", "0.49223715", "0.4917166", "0.48937762", "0.48900846", "0.4877465", "0.4874357", "0.48657772", "0.48465893", "0.48452786", "0.4841382", "0.48322994", "0.48264185", "0.48192546", "0.48134297", "0.48112124", "0.48106822", "0.48010898", "0.47939616", "0.47873792", "0.4781471", "0.47799864", "0.47753745", "0.4774995", "0.4766917", "0.47521192", "0.47505757", "0.47382355", "0.4737392", "0.47304296", "0.4729597", "0.4712104", "0.4709488", "0.47094297", "0.4701303", "0.46802947", "0.46749547", "0.4673087", "0.46685794", "0.46685794", "0.46685794", "0.4666915", "0.4664548", "0.466203", "0.4656222", "0.46535435", "0.4652453", "0.4652453", "0.4650804", "0.4648183", "0.4646791", "0.46157163", "0.46077174", "0.46037248", "0.4602221", "0.46016708" ]
0.0
-1
Gets the applicationIdentityType property value. Type of application that is referenced. Possible values are: aadApplication, bot, tenantBot, office365Connector, and outgoingWebhook.
public function getApplicationIdentityType(): ?TeamworkApplicationIdentityType { $val = $this->getBackingStore()->get('applicationIdentityType'); if (is_null($val) || $val instanceof TeamworkApplicationIdentityType) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'applicationIdentityType'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApplicationType()\n {\n return $this->applicationType;\n }", "public function getAppType();", "final public function getType() {\n\t\treturn 'app';\n\t}", "public function getTypeAttribute()\n {\n if($this->personal_access_client) {\n return OAuthClientType::PERSONAL();\n }\n\n if($this->password_client) {\n return OAuthClientType::PASSWORD();\n }\n\n if($this->redirect === '') {\n return OAuthClientType::CREDENTIALS();\n }\n\n return OAuthClientType::AUTH_CODE();\n }", "public function getAccidentType()\n {\n return $this->accidentType;\n }", "public function getAccidentType()\n {\n return $this->accidentType;\n }", "public function get_application_id() {\n\t\tif ( ! $this->is_application_id_in_config() ) {\n\n\t\t\treturn (string) get_option( 'algolia_application_id', '' );\n\t\t}\n\n\t\t$this->assert_constant_is_non_empty_string( ALGOLIA_APPLICATION_ID, 'ALGOLIA_APPLICATION_ID' );\n\n\t\treturn ALGOLIA_APPLICATION_ID;\n\t}", "public function setApplicationIdentityType(?TeamworkApplicationIdentityType $value): void {\n $this->getBackingStore()->set('applicationIdentityType', $value);\n }", "public function getApplicationID()\n\t{\n\t\treturn $this->application_id;\n\t}", "public function getApplicationID() \n\t{\n\t\treturn $this->application_id;\n\t}", "public function getClaimType()\r\n {\r\n return $this->claimType;\r\n }", "public function getApplicationTemplateId()\n {\n if (array_key_exists(\"applicationTemplateId\", $this->_propDict)) {\n return $this->_propDict[\"applicationTemplateId\"];\n } else {\n return null;\n }\n }", "public function getDeviceType(){\n if($this->_deviceType === null){\n $this->_setApplicationTypeByDevice();\n }\n\n return $this->_deviceType;\n }", "public function getUserAppId()\n {\n return $this->user_app_id;\n }", "public function getOGApplicationID();", "public function getClientAuthenticationType()\n {\n if (array_key_exists(\"clientAuthenticationType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"clientAuthenticationType\"], \"\\Beta\\Microsoft\\Graph\\Model\\VpnClientAuthenticationType\") || is_null($this->_propDict[\"clientAuthenticationType\"])) {\n return $this->_propDict[\"clientAuthenticationType\"];\n } else {\n $this->_propDict[\"clientAuthenticationType\"] = new VpnClientAuthenticationType($this->_propDict[\"clientAuthenticationType\"]);\n return $this->_propDict[\"clientAuthenticationType\"];\n }\n }\n return null;\n }", "public function getAuthenticationType() {\n\t\treturn $this->_mAuthenticationType;\n\t}", "protected function getApplicationId()\n\t{\n\t\t$application_id = $this->request->input('session.application.applicationId', null);\n\n\t\tif (is_null($application_id) || $application_id === '') {\n\t\t\tthrow new AlexaVerificationException('Request verification failed: application ID not present in request.');\n\t\t}\n\n\t\treturn $application_id;\n\t}", "public function getApplicationId(){\n\t\treturn $this->applicationId;\n\t}", "public function getAppId()\n {\n if (array_key_exists(\"appId\", $this->_propDict)) {\n return $this->_propDict[\"appId\"];\n } else {\n return null;\n }\n }", "public function GetUserType(){\n\t\treturn $this->user_type;\n }", "public function getIdType() {\n\t\treturn $this->id_type;\n\t}", "public function getAuthType()\n {\n return isset($this->authType) ? $this->authType : null;\n }", "public function getTypeAem() {\n return $this->typeAem;\n }", "public function invoicetype()\n {\n if ( ! $this->bean->invoicetype) $this->bean->invoicetype = R::dispense('invoicetype');\n return $this->bean->invoicetype;\n }", "public function getAppId() {\n return $this->app_id;\n }", "public function GetAccountType() {\n return $this->accountType;\n }", "public function getAppVersionType() : string {\n return $this->configVars['version-info']['version-type'];\n }", "public function getIdType()\n {\n return $this->idType;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getUserType()\n {\n return $this->userType;\n }", "public function getApplicationId(): ?string {\n $val = $this->getBackingStore()->get('applicationId');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'applicationId'\");\n }", "public function getApplicationId()\r\n\t{\r\n\t\t$headers = $this->getAllHeaders();\r\n\r\n\t\tif (!preg_match(\"#AppId=(.+)#s\", $headers[\"Authorization\"], $match))\r\n\t\t\treturn false;\r\n\r\n\t\treturn end($match);\r\n\t}", "public function getOwnerAppIdentity();", "public function getType(){\n return ucfirst(array_search($this->type, self::userTypes()));\n }", "public function getType()\n {\n return $this->type()->getID();\n }", "public function getAccountNumberType()\n {\n return $this->account_number_type;\n }", "public function getAccountType()\n {\n return $this->account_type;\n }", "public function getAccountType()\n {\n return $this->account_type;\n }", "public function getAccountType()\n {\n return $this->account_type;\n }", "public function getUserType()\n {\n return $this->type;\n }", "public function getAccountType()\n {\n return $this->accountType;\n }", "public function getTypeId()\n {\n return $this->get(self::_TYPE_ID);\n }", "public function getUserType()\n\t{\n\t\treturn $this->type;\n\t}", "public function getTypeId()\n {\n return $this->readOneof(1);\n }", "public function setApplicationType($applicationType)\n {\n $this->applicationType = $applicationType;\n return $this;\n }", "public function getIdentityClass()\n {\n return $this->identityClass;\n }", "public function getAuthType()\n {\n return $this->auth_type;\n }", "public function getTargetType()\n {\n if (array_key_exists(\"targetType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"targetType\"], \"\\Beta\\Microsoft\\Graph\\Model\\MobileAppRelationshipType\") || is_null($this->_propDict[\"targetType\"])) {\n return $this->_propDict[\"targetType\"];\n } else {\n $this->_propDict[\"targetType\"] = new MobileAppRelationshipType($this->_propDict[\"targetType\"]);\n return $this->_propDict[\"targetType\"];\n }\n }\n return null;\n }", "protected function getApplicationIdAttribute(): string\n {\n if (! isset($this->attributes['application_id'])) {\n return $this->discord->application->id;\n }\n\n return $this->attributes['application_id'];\n }", "public function getConsentType()\n {\n return $this->consentType;\n }", "public function type()\n {\n return $this->session->get('izime.type');\n }", "function getAppId()\n {\n return $this->_props['AppId'];\n }", "public function getTypeId()\n {\n return $this->_getData('type_id');\n }", "public function getLoginType()\n {\n $value = $this->get(self::LOGIN_TYPE);\n return $value === null ? (integer)$value : $value;\n }", "public function getApproval_type()\n {\n return $this->approval_type;\n }", "public function get_context_type()\n {\n return $this->get_default_property(self::PROPERTY_CONTEXT_TYPE);\n }", "function getAssocType() {\n\t\treturn $this->getData('assocType');\n\t}", "public function getUseAppID() \n \t{\n \t\treturn $this->use_appid;\n \t}", "public function getAppId()\n {\n return $this->appId;\n }", "public function getAppId()\n {\n return $this->appId;\n }", "public function getUserObjectType()\n {\n return $this->userObjectType;\n }", "public function getOwnerType()\n {\n if (array_key_exists(\"ownerType\", $this->_propDict)) {\n return $this->_propDict[\"ownerType\"];\n } else {\n return null;\n }\n }", "public function getAppId() : int\n {\n return $this->appId;\n }", "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 getType()\n {\n $rtn = $this->data['type'];\n\n return $rtn;\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 getAnswerInputType()\n {\n if (array_key_exists(\"answerInputType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"answerInputType\"], \"\\Beta\\Microsoft\\Graph\\Model\\VirtualEventRegistrationQuestionAnswerInputType\") || is_null($this->_propDict[\"answerInputType\"])) {\n return $this->_propDict[\"answerInputType\"];\n } else {\n $this->_propDict[\"answerInputType\"] = new VirtualEventRegistrationQuestionAnswerInputType($this->_propDict[\"answerInputType\"]);\n return $this->_propDict[\"answerInputType\"];\n }\n }\n return null;\n }", "public function getType()\n {\n $value = $this->get(self::TYPE);\n return $value === null ? (integer)$value : $value;\n }", "public function typeId()\n {\n return config('entities.ids.' . $this->type);\n }", "public function getType()\n {\n return isset($this->type) ? $this->type : null;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getType() {\n return $this->type;\n }", "public function getDocumentType()\n {\n $value = $this->get(self::DOCUMENTTYPE);\n return $value === null ? (integer)$value : $value;\n }", "public function getAccType()\n {\n return $this->acc_type;\n }", "public function getType()\n {\n return $this->getProperty('type');\n }", "public function getPermissionType()\n {\n if (array_key_exists(\"permissionType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"permissionType\"], \"\\Beta\\Microsoft\\Graph\\Model\\TeamsAppResourceSpecificPermissionType\") || is_null($this->_propDict[\"permissionType\"])) {\n return $this->_propDict[\"permissionType\"];\n } else {\n $this->_propDict[\"permissionType\"] = new TeamsAppResourceSpecificPermissionType($this->_propDict[\"permissionType\"]);\n return $this->_propDict[\"permissionType\"];\n }\n }\n return null;\n }", "public function getType()\r\n {\r\n return $this->m_type;\r\n }", "public function getType()\n {\n return $this->metadata->type;\n }", "public function getMobileAppIdentifier(): ?MobileAppIdentifier {\n $val = $this->getBackingStore()->get('mobileAppIdentifier');\n if (is_null($val) || $val instanceof MobileAppIdentifier) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mobileAppIdentifier'\");\n }", "public function getTypeID() {\n\t\treturn $this->_type_id;\n\t}", "public function getType()\n {\n $config = Config::get('shopify-app.api_grant_mode');\n if ($config === self::GRANT_PERUSER) {\n return self::GRANT_PERUSER;\n }\n\n return self::GRANT_OFFLINE;\n }", "public function getType()\n\t{\n\t\treturn empty($this->type) ? $this->guessType() : $this->type;\n\t}", "public function type()\n {\n return $this->type;\n }" ]
[ "0.74720997", "0.66944945", "0.5748343", "0.5635199", "0.56091756", "0.56091756", "0.5585548", "0.53899217", "0.53681695", "0.5355813", "0.5352589", "0.5350712", "0.53462386", "0.5304733", "0.5261244", "0.52568656", "0.5222017", "0.5210288", "0.52073926", "0.5191555", "0.51672614", "0.516645", "0.515304", "0.5150612", "0.51386976", "0.512654", "0.5122224", "0.5121644", "0.511023", "0.51065075", "0.51065075", "0.51065075", "0.51065075", "0.51065075", "0.51065075", "0.51065075", "0.50974065", "0.5085199", "0.5082825", "0.5080321", "0.50646085", "0.50604934", "0.50593406", "0.50543183", "0.50543183", "0.50543183", "0.505343", "0.5049757", "0.5042116", "0.50325817", "0.50325185", "0.5031196", "0.49941975", "0.49938476", "0.49866924", "0.49752727", "0.4974768", "0.49623618", "0.49437898", "0.49430943", "0.49338475", "0.49006212", "0.48944506", "0.48922715", "0.48906973", "0.4877225", "0.4877225", "0.48764184", "0.48729756", "0.4863225", "0.48628697", "0.48628697", "0.48628697", "0.4862639", "0.4850237", "0.4846593", "0.48451898", "0.484357", "0.4828862", "0.4826201", "0.4826201", "0.4826201", "0.4826201", "0.4826201", "0.4826201", "0.4826201", "0.4826201", "0.4826201", "0.4826201", "0.48209408", "0.48190826", "0.4817141", "0.48048282", "0.48043343", "0.48041666", "0.47998843", "0.47995672", "0.47943577", "0.4790099", "0.4788397" ]
0.62552387
2
The deserialization information for the current model
public function getFieldDeserializers(): array { $o = $this; return array_merge(parent::getFieldDeserializers(), [ 'applicationIdentityType' => fn(ParseNode $n) => $o->setApplicationIdentityType($n->getEnumValue(TeamworkApplicationIdentityType::class)), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalModelInfo()\n {\n return $this->original_model_info;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'detectionStatus' => fn(ParseNode $n) => $o->setDetectionStatus($n->getEnumValue(DetectionStatus::class)),\n 'imageFile' => fn(ParseNode $n) => $o->setImageFile($n->getObjectValue([FileDetails::class, 'createFromDiscriminatorValue'])),\n 'mdeDeviceId' => fn(ParseNode $n) => $o->setMdeDeviceId($n->getStringValue()),\n 'parentProcessCreationDateTime' => fn(ParseNode $n) => $o->setParentProcessCreationDateTime($n->getDateTimeValue()),\n 'parentProcessId' => fn(ParseNode $n) => $o->setParentProcessId($n->getIntegerValue()),\n 'parentProcessImageFile' => fn(ParseNode $n) => $o->setParentProcessImageFile($n->getObjectValue([FileDetails::class, 'createFromDiscriminatorValue'])),\n 'processCommandLine' => fn(ParseNode $n) => $o->setProcessCommandLine($n->getStringValue()),\n 'processCreationDateTime' => fn(ParseNode $n) => $o->setProcessCreationDateTime($n->getDateTimeValue()),\n 'processId' => fn(ParseNode $n) => $o->setProcessId($n->getIntegerValue()),\n 'userAccount' => fn(ParseNode $n) => $o->setUserAccount($n->getObjectValue([UserAccount::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getSerializableData()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'description' => $this->getDescription(),\n 'profile' => $this->getProfile(),\n 'salt' => $this->getSalt(),\n 'type' => $this->getType(),\n 'value' => $this->getValue(),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'cameraMake' => fn(ParseNode $n) => $o->setCameraMake($n->getStringValue()),\n 'cameraModel' => fn(ParseNode $n) => $o->setCameraModel($n->getStringValue()),\n 'exposureDenominator' => fn(ParseNode $n) => $o->setExposureDenominator($n->getFloatValue()),\n 'exposureNumerator' => fn(ParseNode $n) => $o->setExposureNumerator($n->getFloatValue()),\n 'fNumber' => fn(ParseNode $n) => $o->setFNumber($n->getFloatValue()),\n 'focalLength' => fn(ParseNode $n) => $o->setFocalLength($n->getFloatValue()),\n 'iso' => fn(ParseNode $n) => $o->setIso($n->getIntegerValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'orientation' => fn(ParseNode $n) => $o->setOrientation($n->getIntegerValue()),\n 'takenDateTime' => fn(ParseNode $n) => $o->setTakenDateTime($n->getDateTimeValue()),\n ];\n }", "public function getReflectionData()\n {\n return $this->_reflectionData;\n }", "public function deserialize($data)\n {\n }", "public function getSerializer();", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'mobileAppIdentifier' => fn(ParseNode $n) => $o->setMobileAppIdentifier($n->getObjectValue([MobileAppIdentifier::class, 'createFromDiscriminatorValue'])),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getStringValue()),\n ]);\n }", "public function serializer() {\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"FileId\",$param) and $param[\"FileId\"] !== null) {\n $this->FileId = $param[\"FileId\"];\n }\n\n if (array_key_exists(\"SubAppId\",$param) and $param[\"SubAppId\"] !== null) {\n $this->SubAppId = $param[\"SubAppId\"];\n }\n\n if (array_key_exists(\"StartTimeOffset\",$param) and $param[\"StartTimeOffset\"] !== null) {\n $this->StartTimeOffset = $param[\"StartTimeOffset\"];\n }\n\n if (array_key_exists(\"EndTimeOffset\",$param) and $param[\"EndTimeOffset\"] !== null) {\n $this->EndTimeOffset = $param[\"EndTimeOffset\"];\n }\n\n if (array_key_exists(\"RepairInfo\",$param) and $param[\"RepairInfo\"] !== null) {\n $this->RepairInfo = new RepairInfo();\n $this->RepairInfo->deserialize($param[\"RepairInfo\"]);\n }\n\n if (array_key_exists(\"VideoFrameInterpolationInfo\",$param) and $param[\"VideoFrameInterpolationInfo\"] !== null) {\n $this->VideoFrameInterpolationInfo = new VideoFrameInterpolationInfo();\n $this->VideoFrameInterpolationInfo->deserialize($param[\"VideoFrameInterpolationInfo\"]);\n }\n\n if (array_key_exists(\"SuperResolutionInfo\",$param) and $param[\"SuperResolutionInfo\"] !== null) {\n $this->SuperResolutionInfo = new SuperResolutionInfo();\n $this->SuperResolutionInfo->deserialize($param[\"SuperResolutionInfo\"]);\n }\n\n if (array_key_exists(\"HDRInfo\",$param) and $param[\"HDRInfo\"] !== null) {\n $this->HDRInfo = new HDRInfo();\n $this->HDRInfo->deserialize($param[\"HDRInfo\"]);\n }\n\n if (array_key_exists(\"VideoDenoiseInfo\",$param) and $param[\"VideoDenoiseInfo\"] !== null) {\n $this->VideoDenoiseInfo = new VideoDenoiseInfo();\n $this->VideoDenoiseInfo->deserialize($param[\"VideoDenoiseInfo\"]);\n }\n\n if (array_key_exists(\"AudioDenoiseInfo\",$param) and $param[\"AudioDenoiseInfo\"] !== null) {\n $this->AudioDenoiseInfo = new AudioDenoiseInfo();\n $this->AudioDenoiseInfo->deserialize($param[\"AudioDenoiseInfo\"]);\n }\n\n if (array_key_exists(\"ColorInfo\",$param) and $param[\"ColorInfo\"] !== null) {\n $this->ColorInfo = new ColorEnhanceInfo();\n $this->ColorInfo->deserialize($param[\"ColorInfo\"]);\n }\n\n if (array_key_exists(\"SharpInfo\",$param) and $param[\"SharpInfo\"] !== null) {\n $this->SharpInfo = new SharpEnhanceInfo();\n $this->SharpInfo->deserialize($param[\"SharpInfo\"]);\n }\n\n if (array_key_exists(\"FaceInfo\",$param) and $param[\"FaceInfo\"] !== null) {\n $this->FaceInfo = new FaceEnhanceInfo();\n $this->FaceInfo->deserialize($param[\"FaceInfo\"]);\n }\n\n if (array_key_exists(\"LowLightInfo\",$param) and $param[\"LowLightInfo\"] !== null) {\n $this->LowLightInfo = new LowLightEnhanceInfo();\n $this->LowLightInfo->deserialize($param[\"LowLightInfo\"]);\n }\n\n if (array_key_exists(\"ScratchRepairInfo\",$param) and $param[\"ScratchRepairInfo\"] !== null) {\n $this->ScratchRepairInfo = new ScratchRepairInfo();\n $this->ScratchRepairInfo->deserialize($param[\"ScratchRepairInfo\"]);\n }\n\n if (array_key_exists(\"ArtifactRepairInfo\",$param) and $param[\"ArtifactRepairInfo\"] !== null) {\n $this->ArtifactRepairInfo = new ArtifactRepairInfo();\n $this->ArtifactRepairInfo->deserialize($param[\"ArtifactRepairInfo\"]);\n }\n\n if (array_key_exists(\"TargetInfo\",$param) and $param[\"TargetInfo\"] !== null) {\n $this->TargetInfo = new RebuildMediaTargetInfo();\n $this->TargetInfo->deserialize($param[\"TargetInfo\"]);\n }\n\n if (array_key_exists(\"SessionId\",$param) and $param[\"SessionId\"] !== null) {\n $this->SessionId = $param[\"SessionId\"];\n }\n\n if (array_key_exists(\"SessionContext\",$param) and $param[\"SessionContext\"] !== null) {\n $this->SessionContext = $param[\"SessionContext\"];\n }\n\n if (array_key_exists(\"TasksPriority\",$param) and $param[\"TasksPriority\"] !== null) {\n $this->TasksPriority = $param[\"TasksPriority\"];\n }\n\n if (array_key_exists(\"ExtInfo\",$param) and $param[\"ExtInfo\"] !== null) {\n $this->ExtInfo = $param[\"ExtInfo\"];\n }\n }", "public function toObject(){\r\n return json_decode($this->toJson());\r\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'app' => fn(ParseNode $n) => $o->setApp($n->getObjectValue([MobileApp::class, 'createFromDiscriminatorValue'])),\n 'deviceId' => fn(ParseNode $n) => $o->setDeviceId($n->getStringValue()),\n 'deviceName' => fn(ParseNode $n) => $o->setDeviceName($n->getStringValue()),\n 'displayVersion' => fn(ParseNode $n) => $o->setDisplayVersion($n->getStringValue()),\n 'errorCode' => fn(ParseNode $n) => $o->setErrorCode($n->getIntegerValue()),\n 'installState' => fn(ParseNode $n) => $o->setInstallState($n->getEnumValue(ResultantAppState::class)),\n 'installStateDetail' => fn(ParseNode $n) => $o->setInstallStateDetail($n->getEnumValue(ResultantAppStateDetail::class)),\n 'lastSyncDateTime' => fn(ParseNode $n) => $o->setLastSyncDateTime($n->getDateTimeValue()),\n 'mobileAppInstallStatusValue' => fn(ParseNode $n) => $o->setMobileAppInstallStatusValue($n->getEnumValue(ResultantAppState::class)),\n 'osDescription' => fn(ParseNode $n) => $o->setOsDescription($n->getStringValue()),\n 'osVersion' => fn(ParseNode $n) => $o->setOsVersion($n->getStringValue()),\n 'userName' => fn(ParseNode $n) => $o->setUserName($n->getStringValue()),\n 'userPrincipalName' => fn(ParseNode $n) => $o->setUserPrincipalName($n->getStringValue()),\n ]);\n }", "public function onDeserialization($sender) \r\n {\r\n // TODO: Implement onDeserialization() method.\r\n }", "protected function get_decoded_data() {\n return json_decode($this->get_data());\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'classification' => fn(ParseNode $n) => $o->setClassification($n->getEnumValue(WindowsQualityUpdateClassification::class)),\n 'isExpeditable' => fn(ParseNode $n) => $o->setIsExpeditable($n->getBooleanValue()),\n 'kbArticleId' => fn(ParseNode $n) => $o->setKbArticleId($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'bold' => fn(ParseNode $n) => $o->setBold($n->getBooleanValue()),\n 'color' => fn(ParseNode $n) => $o->setColor($n->getStringValue()),\n 'italic' => fn(ParseNode $n) => $o->setItalic($n->getBooleanValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'size' => fn(ParseNode $n) => $o->setSize($n->getFloatValue()),\n 'underline' => fn(ParseNode $n) => $o->setUnderline($n->getStringValue()),\n ]);\n }", "public function getInfo()\n {\n return self::jsonDecode($this->fields['info']->getValue());\n }", "public function getModelsMetaData() {}", "public function jsonSerialize()\n {\n return $this->externalFields;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'currentLabel' => fn(ParseNode $n) => $o->setCurrentLabel($n->getObjectValue([CurrentLabel::class, 'createFromDiscriminatorValue'])),\n 'discoveredSensitiveTypes' => fn(ParseNode $n) => $o->setDiscoveredSensitiveTypes($n->getCollectionOfObjectValues([DiscoveredSensitiveType::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'clientContext' => fn(ParseNode $n) => $o->setClientContext($n->getStringValue()),\n 'resultInfo' => fn(ParseNode $n) => $o->setResultInfo($n->getObjectValue([ResultInfo::class, 'createFromDiscriminatorValue'])),\n 'status' => fn(ParseNode $n) => $o->setStatus($n->getEnumValue(OperationStatus::class)),\n ]);\n }", "function jsonSerialize()\n\t{\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'metadata' => $this->getMetadata()\n\t\t];\n\t}", "public function deserialize($data);", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'ignoreVersionDetection' => fn(ParseNode $n) => $o->setIgnoreVersionDetection($n->getBooleanValue()),\n 'includedApps' => fn(ParseNode $n) => $o->setIncludedApps($n->getCollectionOfObjectValues([MacOSIncludedApp::class, 'createFromDiscriminatorValue'])),\n 'minimumSupportedOperatingSystem' => fn(ParseNode $n) => $o->setMinimumSupportedOperatingSystem($n->getObjectValue([MacOSMinimumOperatingSystem::class, 'createFromDiscriminatorValue'])),\n 'primaryBundleId' => fn(ParseNode $n) => $o->setPrimaryBundleId($n->getStringValue()),\n 'primaryBundleVersion' => fn(ParseNode $n) => $o->setPrimaryBundleVersion($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'applicationId' => fn(ParseNode $n) => $o->setApplicationId($n->getStringValue()),\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'discoverable' => fn(ParseNode $n) => $o->setDiscoverable($n->getBooleanValue()),\n 'default' => fn(ParseNode $n) => $o->setEscapedDefault($n->getBooleanValue()),\n 'factoryTag' => fn(ParseNode $n) => $o->setFactoryTag($n->getStringValue()),\n 'metadata' => fn(ParseNode $n) => $o->setMetadata($n->getCollectionOfObjectValues([SynchronizationMetadataEntry::class, 'createFromDiscriminatorValue'])),\n 'schema' => fn(ParseNode $n) => $o->setSchema($n->getObjectValue([SynchronizationSchema::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'check32BitOn64System' => fn(ParseNode $n) => $o->setCheck32BitOn64System($n->getBooleanValue()),\n 'detectionType' => fn(ParseNode $n) => $o->setDetectionType($n->getEnumValue(Win32LobAppFileSystemDetectionType::class)),\n 'detectionValue' => fn(ParseNode $n) => $o->setDetectionValue($n->getStringValue()),\n 'fileOrFolderName' => fn(ParseNode $n) => $o->setFileOrFolderName($n->getStringValue()),\n 'operator' => fn(ParseNode $n) => $o->setOperator($n->getEnumValue(Win32LobAppDetectionOperator::class)),\n 'path' => fn(ParseNode $n) => $o->setPath($n->getStringValue()),\n ]);\n }", "public function modelData()\n {\n return [\n 'title' => $this->title,\n 'description' => $this->description,\n 'image' => $this->image->store('images', 'public'),\n 'featured_image' => $this->featured_image->store('images', 'public'),\n ];\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeMappings' => fn(ParseNode $n) => $o->setAttributeMappings($n->getCollectionOfObjectValues([AttributeMapping::class, 'createFromDiscriminatorValue'])),\n 'enabled' => fn(ParseNode $n) => $o->setEnabled($n->getBooleanValue()),\n 'flowTypes' => fn(ParseNode $n) => $o->setFlowTypes($n->getEnumValue(ObjectFlowTypes::class)),\n 'metadata' => fn(ParseNode $n) => $o->setMetadata($n->getCollectionOfObjectValues([ObjectMappingMetadataEntry::class, 'createFromDiscriminatorValue'])),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'scope' => fn(ParseNode $n) => $o->setScope($n->getObjectValue([Filter::class, 'createFromDiscriminatorValue'])),\n 'sourceObjectName' => fn(ParseNode $n) => $o->setSourceObjectName($n->getStringValue()),\n 'targetObjectName' => fn(ParseNode $n) => $o->setTargetObjectName($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'assignmentState' => fn(ParseNode $n) => $o->setAssignmentState($n->getStringValue()),\n 'duration' => fn(ParseNode $n) => $o->setDuration($n->getStringValue()),\n 'reason' => fn(ParseNode $n) => $o->setReason($n->getStringValue()),\n 'requestedDateTime' => fn(ParseNode $n) => $o->setRequestedDateTime($n->getDateTimeValue()),\n 'roleId' => fn(ParseNode $n) => $o->setRoleId($n->getStringValue()),\n 'roleInfo' => fn(ParseNode $n) => $o->setRoleInfo($n->getObjectValue([PrivilegedRole::class, 'createFromDiscriminatorValue'])),\n 'schedule' => fn(ParseNode $n) => $o->setSchedule($n->getObjectValue([GovernanceSchedule::class, 'createFromDiscriminatorValue'])),\n 'status' => fn(ParseNode $n) => $o->setStatus($n->getStringValue()),\n 'ticketNumber' => fn(ParseNode $n) => $o->setTicketNumber($n->getStringValue()),\n 'ticketSystem' => fn(ParseNode $n) => $o->setTicketSystem($n->getStringValue()),\n 'type' => fn(ParseNode $n) => $o->setType($n->getStringValue()),\n 'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),\n ]);\n }", "public function getPreSerializerData()\n {\n $data = array(\n 'orderID' => $this->getOrderID(),\n 'paymentMethod' => $this->getPaymentMethod(),\n );\n\n if (!empty($this->paymentInstrumentID)) {\n $data['paymentInstrumentID'] = $this->getPaymentInstrumentID();\n }\n\n if (!empty($this->amount)) {\n $data['amount'] = $this->getAmount();\n }\n\n if (!empty($this->additionalInformation)) {\n $data['additionalInformation'] = $this->getAdditionalInformation();\n }\n\n if (!empty($this->cvv)) {\n $data['cvv'] = $this->getCcv();\n }\n\n return $data;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'deviceCount' => fn(ParseNode $n) => $o->setDeviceCount($n->getIntegerValue()),\n 'medianImpactInMs' => fn(ParseNode $n) => $o->setMedianImpactInMs($n->getIntegerValue()),\n 'processName' => fn(ParseNode $n) => $o->setProcessName($n->getStringValue()),\n 'productName' => fn(ParseNode $n) => $o->setProductName($n->getStringValue()),\n 'publisher' => fn(ParseNode $n) => $o->setPublisher($n->getStringValue()),\n 'totalImpactInMs' => fn(ParseNode $n) => $o->setTotalImpactInMs($n->getIntegerValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeDestination' => fn(ParseNode $n) => $o->setAttributeDestination($n->getObjectValue([AccessPackageResourceAttributeDestination::class, 'createFromDiscriminatorValue'])),\n 'attributeName' => fn(ParseNode $n) => $o->setAttributeName($n->getStringValue()),\n 'attributeSource' => fn(ParseNode $n) => $o->setAttributeSource($n->getObjectValue([AccessPackageResourceAttributeSource::class, 'createFromDiscriminatorValue'])),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'isEditable' => fn(ParseNode $n) => $o->setIsEditable($n->getBooleanValue()),\n 'isPersistedOnAssignmentRemoval' => fn(ParseNode $n) => $o->setIsPersistedOnAssignmentRemoval($n->getBooleanValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'additionalInformation' => fn(ParseNode $n) => $o->setAdditionalInformation($n->getStringValue()),\n 'creationDateTime' => fn(ParseNode $n) => $o->setCreationDateTime($n->getDateTimeValue()),\n 'expirationDateTime' => fn(ParseNode $n) => $o->setExpirationDateTime($n->getDateTimeValue()),\n 'referenceKey' => fn(ParseNode $n) => $o->setReferenceKey($n->getStringValue()),\n 'referenceSystem' => fn(ParseNode $n) => $o->setReferenceSystem($n->getStringValue()),\n 'requestorId' => fn(ParseNode $n) => $o->setRequestorId($n->getStringValue()),\n 'requestorName' => fn(ParseNode $n) => $o->setRequestorName($n->getStringValue()),\n 'requestType' => fn(ParseNode $n) => $o->setRequestType($n->getStringValue()),\n 'roleId' => fn(ParseNode $n) => $o->setRoleId($n->getStringValue()),\n 'roleName' => fn(ParseNode $n) => $o->setRoleName($n->getStringValue()),\n 'tenantId' => fn(ParseNode $n) => $o->setTenantId($n->getStringValue()),\n 'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),\n 'userMail' => fn(ParseNode $n) => $o->setUserMail($n->getStringValue()),\n 'userName' => fn(ParseNode $n) => $o->setUserName($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'clickAction' => fn(ParseNode $n) => $o->setClickAction($n->getStringValue()),\n 'clickDateTime' => fn(ParseNode $n) => $o->setClickDateTime($n->getDateTimeValue()),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'sourceId' => fn(ParseNode $n) => $o->setSourceId($n->getStringValue()),\n 'uriDomain' => fn(ParseNode $n) => $o->setUriDomain($n->getStringValue()),\n 'verdict' => fn(ParseNode $n) => $o->setVerdict($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'classification' => fn(ParseNode $n) => $o->setClassification($n->getEnumValue(PermissionClassificationType::class)),\n 'permissionId' => fn(ParseNode $n) => $o->setPermissionId($n->getStringValue()),\n 'permissionName' => fn(ParseNode $n) => $o->setPermissionName($n->getStringValue()),\n ]);\n }", "public function toArray()\n {\n return $this->info;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'activeDevices' => fn(ParseNode $n) => $o->setActiveDevices($n->getIntegerValue()),\n 'batteryCapacityFair' => fn(ParseNode $n) => $o->setBatteryCapacityFair($n->getIntegerValue()),\n 'batteryCapacityGood' => fn(ParseNode $n) => $o->setBatteryCapacityGood($n->getIntegerValue()),\n 'batteryCapacityPoor' => fn(ParseNode $n) => $o->setBatteryCapacityPoor($n->getIntegerValue()),\n 'lastRefreshedDateTime' => fn(ParseNode $n) => $o->setLastRefreshedDateTime($n->getDateTimeValue()),\n ]);\n }", "public function deserialize ($data, $metaModel) {\n\t\t$result = array();\n\t\t\t$this->systemLogger->log(\"Data: \" . print_r($data, TRUE), LOG_INFO); // TODO remove\n\n\t\tif (array_key_exists('id', $data)) {\n\t\t\t$result['__identity'] = $data['id'];\n\t\t}\n\t\t\n\t\t// Add properties\n\t\tforeach ((array) $metaModel->getProperties() as $property) {\n\t\t\t$propertyPayloadName = $this->getPayloadName($property->getName());\n\n\t\t\tif (array_key_exists($propertyPayloadName, $data)) {\n\t\t\t\t$convertTo = $property->getConverter()->getTo();\n\t\t\t\t$result[$property->getName()] = $convertTo($data[$propertyPayloadName]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add associations\n\t\tforeach ((array) $metaModel->getAssociations() as $association) {\n\t\t\t$associationPayloadName = $this->getPayloadName($association->getEmberName(), $association->getEmberType());\n\t\t\t$this->systemLogger->log(\"Association: \" . $association->getEmberName() . \"; PayloadName: \" . $associationPayloadName . \"; Type: \" . $association->getEmberType(), LOG_INFO);\n\t\t\t$this->systemLogger->log(\"Payload name: \" . $associationPayloadName, LOG_INFO); // TODO remove\n\t\t\t\n\t\t\tif(isset($data[$associationPayloadName]) && $data[$associationPayloadName] !== NULL) {\n\t\t\t\t$result[$association->getFlowName()] = $data[$associationPayloadName];\n\t\t\t}\n\t\t}\n\n\t\t// TODO remove Logging\n\t\tob_start();\n\t\tvar_dump($result);\n\t\t$x = ob_get_clean();\n\t\t$this->systemLogger->log(\"Result: \" .$x, LOG_INFO);\n\n\t\t\n\t\treturn $result;\n\t}", "public static function getSerializer();", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'platformType' => fn(ParseNode $n) => $o->setPlatformType($n->getEnumValue(PolicyPlatformType::class)),\n 'settingCount' => fn(ParseNode $n) => $o->setSettingCount($n->getIntegerValue()),\n 'settingStates' => fn(ParseNode $n) => $o->setSettingStates($n->getCollectionOfObjectValues([ManagedDeviceMobileAppConfigurationSettingState::class, 'createFromDiscriminatorValue'])),\n 'state' => fn(ParseNode $n) => $o->setState($n->getEnumValue(ComplianceStatus::class)),\n 'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),\n 'userPrincipalName' => fn(ParseNode $n) => $o->setUserPrincipalName($n->getStringValue()),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getIntegerValue()),\n ]);\n }", "protected final function parse_model_request() {\n\t \n\t /* get the model from the request */\n\t $modeldata = (is_array($this->request['model'])) ? $this->request['model'] : array();\n\t /*\n\t *\tlooks something like this now:\n\t\t *\t$modeldata = array(\n\t\t * \t'title'\t\t\t\t=> 'my title',\n\t\t * \t'content'\t\t\t=> 'some content',\n\t\t * 'any backbone key'\t=> 'any backbone value'\n\t\t * );\n\t\t */\n\t \t \n\t \t/* the formatting of the parsed output */\n \t$parsed = array();\n \t\n \t/* get all data packages, also the core packages and parse them */\n\t \t$data_packages = array_merge($this->core_data_packages, $this->properties->custom_data_packages ); \n\t \tforeach ($data_packages as $data_package) {\n\t\t \t$parsed[$data_package] = array();\n\t \t} \t\n \t/*\n\t *\tlooks something like this now:\n\t\t *\t$parsed = array(\n\t\t * \t'post'\t\t\t\t\t\t\t=> array(),\n\t\t * \t'postmeta'\t\t\t\t\t\t=> array(),\n\t\t * \t'comment'\t\t\t\t\t\t=> array(),\n\t\t *\t\t'any registered data package' \t=> array()\n\t\t * );\n\t\t */\n \n \t/* get default values if some are set in the extended handler class */\n \t$parsed = $this->filter_pre_parse_model_request($parsed, $this->request_method);\n \t\n \t/* start parsing */\n\t\tforeach ($modeldata as $id_backbone => $value) {\n\t\t\t\n\t\t\t/* check if the data package field is registered */\n\t\t\t/* only data_package_fields registered in backbone pass this gate */\n\t\t\tif ( ! array_key_exists($id_backbone, $this->properties->data_package_fields) )\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t// shorthand for data package fields\n\t\t\t$field = $this->properties->data_package_fields[$id_backbone]; // any backbone key\n\t\t\t$data_package = $field['data_package']; // the name of the package, e.g. 'post' or 'author'\n\t\t\t$wp_id = $field['id']; // the wp key name, e.g. post_title, post_parent\t\t\n\n\t\t\t/* some preprocessing */\n\t\t\tif( isset($field['options']) ) {\n\t\t\t\n\t\t\t\t/* this field is read only, so throw it away, we ignore this value */\n\t\t\t\tif( array_key_exists('readonly', $field['options']) && $field['options']['readonly'] )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t/* validate the data */\n\t\t\t\tif( array_key_exists('validate', $field['options']) ) { \t\t\t\t\t\n\t\t\t\t\t$validate_callback = $field['options']['validate'];\n\t\t\t\t\t\n\t\t\t\t\t/* execute the validation callback e.g. esc_attr(), esc_url(), .. */\n\t\t\t\t\tif(function_exists($validate_callback))\n\t\t\t\t\t\t$value = call_user_func ($validate_callback, $value);\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* sort all data in a nice way */\n\t\t\t$parsed[$data_package][$wp_id] = $value;\n\t\t\t/*\n\t\t *\tlooks something like this now:\n\t\t\t *\t$parsed = array(\n\t\t\t * \t'post'\t\t=> array( 'post_title' \t=> 'my title',\n\t\t\t * \t\t\t\t\t\t\t 'post_content'=> 'my content',\n\t\t\t *\t\t\t\t\t\t\t 'any wp key'\t=> 'value from backbone'\n\t\t\t *\t\t\t\t\t\t\t),\n\t\t\t * \t'postmeta'\t=> array(...),\n\t\t\t * \t'comment'\t=> array(...)\n\t\t\t * );\n\t\t\t */\n\t\t\t\n\t\t}\t\t\t\t\t\n\t\t\n\t\t/* override some key, values with filter in the child class */\n \t$parsed = $this->filter_post_parse_model_request($parsed, $this->request_method);\n \t\n \t/* there might be an error \t */\n \tif( ! $parsed ) {\n\t \t$this->set_error( 500, 'request could nt be parsed' );\n\t \t$parsed = array();\n \t}\n \t\n \t// successfully set our data\n \t$this->parsed_model_request = $parsed;\t \t\t\n\t}", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function jsonSerialize()\r\n {\r\n return get_object_vars($this);\r\n }", "function jsonSerialize()\n {\n return (object) get_object_vars($this);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'email' => fn(ParseNode $n) => $o->setEmail($n->getStringValue()),\n 'identity' => fn(ParseNode $n) => $o->setIdentity($n->getObjectValue([CommunicationsUserIdentity::class, 'createFromDiscriminatorValue'])),\n 'presenterDetails' => fn(ParseNode $n) => $o->setPresenterDetails($n->getObjectValue([VirtualEventPresenterDetails::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function jsonSerialize()\n {\n return (object) get_object_vars($this);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'isAnswerEditable' => fn(ParseNode $n) => $o->setIsAnswerEditable($n->getBooleanValue()),\n 'isRequired' => fn(ParseNode $n) => $o->setIsRequired($n->getBooleanValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'sequence' => fn(ParseNode $n) => $o->setSequence($n->getIntegerValue()),\n 'text' => fn(ParseNode $n) => $o->setText($n->getObjectValue([AccessPackageLocalizedContent::class, 'createFromDiscriminatorValue'])),\n ];\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function serialize () {\n return (object) array(\n 'id' => $this->getId(),\n 'data' => (object) $this->getData(),\n 'definitionId' => $this->getDefinitionId(),\n 'createdAt' => $this->getCreatedAt()\n );\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function getInfo() \n {\n return $this->requestInfo;\n }", "public function getInfo()\r\n {\r\n return $this->info;\r\n }", "public function getInfo ()\n {\n return $this->info;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'allowPrinting' => fn(ParseNode $n) => $o->setAllowPrinting($n->getBooleanValue()),\n 'allowScreenCapture' => fn(ParseNode $n) => $o->setAllowScreenCapture($n->getBooleanValue()),\n 'allowTextSuggestion' => fn(ParseNode $n) => $o->setAllowTextSuggestion($n->getBooleanValue()),\n 'assessmentAppUserModelId' => fn(ParseNode $n) => $o->setAssessmentAppUserModelId($n->getStringValue()),\n 'configurationAccount' => fn(ParseNode $n) => $o->setConfigurationAccount($n->getStringValue()),\n 'configurationAccountType' => fn(ParseNode $n) => $o->setConfigurationAccountType($n->getEnumValue(SecureAssessmentAccountType::class)),\n 'launchUri' => fn(ParseNode $n) => $o->setLaunchUri($n->getStringValue()),\n 'localGuestAccountName' => fn(ParseNode $n) => $o->setLocalGuestAccountName($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'number' => fn(ParseNode $n) => $o->setNumber($n->getStringValue()),\n 'type' => fn(ParseNode $n) => $o->setType($n->getEnumValue(PhoneType::class)),\n ]);\n }", "public function readObject();", "public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'members' => fn(ParseNode $n) => $o->setMembers($n->getCollectionOfObjectValues([Identity::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'appRoleId' => fn(ParseNode $n) => $o->setAppRoleId($n->getStringValue()),\n 'creationTimestamp' => fn(ParseNode $n) => $o->setCreationTimestamp($n->getDateTimeValue()),\n 'principalDisplayName' => fn(ParseNode $n) => $o->setPrincipalDisplayName($n->getStringValue()),\n 'principalId' => fn(ParseNode $n) => $o->setPrincipalId($n->getStringValue()),\n 'principalType' => fn(ParseNode $n) => $o->setPrincipalType($n->getStringValue()),\n 'resourceDisplayName' => fn(ParseNode $n) => $o->setResourceDisplayName($n->getStringValue()),\n 'resourceId' => fn(ParseNode $n) => $o->setResourceId($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'completionDateTime' => fn(ParseNode $n) => $o->setCompletionDateTime($n->getDateTimeValue()),\n 'creationDateTime' => fn(ParseNode $n) => $o->setCreationDateTime($n->getDateTimeValue()),\n 'error' => fn(ParseNode $n) => $o->setError($n->getObjectValue([ClassificationError::class, 'createFromDiscriminatorValue'])),\n 'lastUpdatedDateTime' => fn(ParseNode $n) => $o->setLastUpdatedDateTime($n->getDateTimeValue()),\n 'startDateTime' => fn(ParseNode $n) => $o->setStartDateTime($n->getDateTimeValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'content' => fn(ParseNode $n) => $o->setContent($n->getBinaryContent()),\n 'dateTime' => fn(ParseNode $n) => $o->setDateTime($n->getDateTimeValue()),\n 'extension' => fn(ParseNode $n) => $o->setExtension($n->getStringValue()),\n 'extractedTextContent' => fn(ParseNode $n) => $o->setExtractedTextContent($n->getBinaryContent()),\n 'mediaType' => fn(ParseNode $n) => $o->setMediaType($n->getStringValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'otherProperties' => fn(ParseNode $n) => $o->setOtherProperties($n->getObjectValue([StringValueDictionary::class, 'createFromDiscriminatorValue'])),\n 'processingStatus' => fn(ParseNode $n) => $o->setProcessingStatus($n->getEnumValue(FileProcessingStatus::class)),\n 'senderOrAuthors' => function (ParseNode $n) {\n $val = $n->getCollectionOfPrimitiveValues();\n if (is_array($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n }\n /** @var array<string>|null $val */\n $this->setSenderOrAuthors($val);\n },\n 'size' => fn(ParseNode $n) => $o->setSize($n->getIntegerValue()),\n 'sourceType' => fn(ParseNode $n) => $o->setSourceType($n->getEnumValue(SourceType::class)),\n 'subjectTitle' => fn(ParseNode $n) => $o->setSubjectTitle($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'deviceRestartBehavior' => fn(ParseNode $n) => $o->setDeviceRestartBehavior($n->getEnumValue(Win32LobAppRestartBehavior::class)),\n 'maxRunTimeInMinutes' => fn(ParseNode $n) => $o->setMaxRunTimeInMinutes($n->getIntegerValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'runAsAccount' => fn(ParseNode $n) => $o->setRunAsAccount($n->getEnumValue(RunAsAccountType::class)),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'identity' => fn(ParseNode $n) => $o->setIdentity($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'role' => fn(ParseNode $n) => $o->setRole($n->getEnumValue(OnlineMeetingRole::class)),\n 'upn' => fn(ParseNode $n) => $o->setUpn($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'appDisplayName' => fn(ParseNode $n) => $o->setAppDisplayName($n->getStringValue()),\n 'dataType' => fn(ParseNode $n) => $o->setDataType($n->getStringValue()),\n 'isMultiValued' => fn(ParseNode $n) => $o->setIsMultiValued($n->getBooleanValue()),\n 'isSyncedFromOnPremises' => fn(ParseNode $n) => $o->setIsSyncedFromOnPremises($n->getBooleanValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'targetObjects' => function (ParseNode $n) {\n $val = $n->getCollectionOfPrimitiveValues();\n if (is_array($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n }\n /** @var array<string>|null $val */\n $this->setTargetObjects($val);\n },\n ]);\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Format\",$param) and $param[\"Format\"] !== null) {\n $this->Format = $param[\"Format\"];\n }\n\n if (array_key_exists(\"Csv\",$param) and $param[\"Csv\"] !== null) {\n $this->Csv = new CsvInfo();\n $this->Csv->deserialize($param[\"Csv\"]);\n }\n\n if (array_key_exists(\"Json\",$param) and $param[\"Json\"] !== null) {\n $this->Json = new JsonInfo();\n $this->Json->deserialize($param[\"Json\"]);\n }\n\n if (array_key_exists(\"Parquet\",$param) and $param[\"Parquet\"] !== null) {\n $this->Parquet = new ParquetInfo();\n $this->Parquet->deserialize($param[\"Parquet\"]);\n }\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'distributeForStudentWork' => fn(ParseNode $n) => $o->setDistributeForStudentWork($n->getBooleanValue()),\n 'resource' => fn(ParseNode $n) => $o->setResource($n->getObjectValue([EducationResource::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'accessRecommendation' => fn(ParseNode $n) => $o->setAccessRecommendation($n->getStringValue()),\n 'accessReviewId' => fn(ParseNode $n) => $o->setAccessReviewId($n->getStringValue()),\n 'appliedBy' => fn(ParseNode $n) => $o->setAppliedBy($n->getObjectValue([UserIdentity::class, 'createFromDiscriminatorValue'])),\n 'appliedDateTime' => fn(ParseNode $n) => $o->setAppliedDateTime($n->getDateTimeValue()),\n 'applyResult' => fn(ParseNode $n) => $o->setApplyResult($n->getStringValue()),\n 'justification' => fn(ParseNode $n) => $o->setJustification($n->getStringValue()),\n 'reviewedBy' => fn(ParseNode $n) => $o->setReviewedBy($n->getObjectValue([UserIdentity::class, 'createFromDiscriminatorValue'])),\n 'reviewedDateTime' => fn(ParseNode $n) => $o->setReviewedDateTime($n->getDateTimeValue()),\n 'reviewResult' => fn(ParseNode $n) => $o->setReviewResult($n->getStringValue()),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'calculateDiscountOnCreditMemos' => fn(ParseNode $n) => $o->setCalculateDiscountOnCreditMemos($n->getBooleanValue()),\n 'code' => fn(ParseNode $n) => $o->setCode($n->getStringValue()),\n 'discountDateCalculation' => fn(ParseNode $n) => $o->setDiscountDateCalculation($n->getStringValue()),\n 'discountPercent' => fn(ParseNode $n) => $o->setDiscountPercent($n->getStringValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'dueDateCalculation' => fn(ParseNode $n) => $o->setDueDateCalculation($n->getStringValue()),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"BizType\",$param) and $param[\"BizType\"] !== null) {\n $this->BizType = $param[\"BizType\"];\n }\n\n if (array_key_exists(\"EvilFlag\",$param) and $param[\"EvilFlag\"] !== null) {\n $this->EvilFlag = $param[\"EvilFlag\"];\n }\n\n if (array_key_exists(\"Label\",$param) and $param[\"Label\"] !== null) {\n $this->Label = $param[\"Label\"];\n }\n\n if (array_key_exists(\"Suggestion\",$param) and $param[\"Suggestion\"] !== null) {\n $this->Suggestion = $param[\"Suggestion\"];\n }\n\n if (array_key_exists(\"Keywords\",$param) and $param[\"Keywords\"] !== null) {\n $this->Keywords = $param[\"Keywords\"];\n }\n\n if (array_key_exists(\"Score\",$param) and $param[\"Score\"] !== null) {\n $this->Score = $param[\"Score\"];\n }\n\n if (array_key_exists(\"DetailResults\",$param) and $param[\"DetailResults\"] !== null) {\n $this->DetailResults = [];\n foreach ($param[\"DetailResults\"] as $key => $value){\n $obj = new DetailResults();\n $obj->deserialize($value);\n array_push($this->DetailResults, $obj);\n }\n }\n\n if (array_key_exists(\"RiskDetails\",$param) and $param[\"RiskDetails\"] !== null) {\n $this->RiskDetails = [];\n foreach ($param[\"RiskDetails\"] as $key => $value){\n $obj = new RiskDetails();\n $obj->deserialize($value);\n array_push($this->RiskDetails, $obj);\n }\n }\n\n if (array_key_exists(\"Extra\",$param) and $param[\"Extra\"] !== null) {\n $this->Extra = $param[\"Extra\"];\n }\n\n if (array_key_exists(\"RequestId\",$param) and $param[\"RequestId\"] !== null) {\n $this->RequestId = $param[\"RequestId\"];\n }\n }", "protected function getObjectData() {\n return $this->data;\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'filter' => fn(ParseNode $n) => $o->setFilter($n->getObjectValue([WorkbookFilter::class, 'createFromDiscriminatorValue'])),\n 'index' => fn(ParseNode $n) => $o->setIndex($n->getIntegerValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'values' => fn(ParseNode $n) => $o->setValues($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'addedDateTime' => fn(ParseNode $n) => $o->setAddedDateTime($n->getDateTimeValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'verifiedPublisherId' => fn(ParseNode $n) => $o->setVerifiedPublisherId($n->getStringValue()),\n ];\n }", "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'deletedChats' => fn(ParseNode $n) => $o->setDeletedChats($n->getCollectionOfObjectValues([DeletedChat::class, 'createFromDiscriminatorValue'])),\n 'deletedTeams' => fn(ParseNode $n) => $o->setDeletedTeams($n->getCollectionOfObjectValues([DeletedTeam::class, 'createFromDiscriminatorValue'])),\n 'devices' => fn(ParseNode $n) => $o->setDevices($n->getCollectionOfObjectValues([TeamworkDevice::class, 'createFromDiscriminatorValue'])),\n 'teamsAppSettings' => fn(ParseNode $n) => $o->setTeamsAppSettings($n->getObjectValue([TeamsAppSettings::class, 'createFromDiscriminatorValue'])),\n 'teamTemplates' => fn(ParseNode $n) => $o->setTeamTemplates($n->getCollectionOfObjectValues([TeamTemplate::class, 'createFromDiscriminatorValue'])),\n 'workforceIntegrations' => fn(ParseNode $n) => $o->setWorkforceIntegrations($n->getCollectionOfObjectValues([WorkforceIntegration::class, 'createFromDiscriminatorValue'])),\n ]);\n }" ]
[ "0.6067922", "0.57719976", "0.57719976", "0.5759543", "0.5708227", "0.5663973", "0.5626403", "0.5607489", "0.5597127", "0.5582992", "0.55805206", "0.55749476", "0.55737877", "0.5545505", "0.5529162", "0.5523548", "0.5518858", "0.55104053", "0.5507383", "0.5482898", "0.54758966", "0.5475867", "0.54485196", "0.54406196", "0.5435983", "0.5423808", "0.54216844", "0.54160607", "0.5414494", "0.5397282", "0.5390837", "0.53901935", "0.5381852", "0.53797996", "0.53693736", "0.53686494", "0.5364876", "0.5350122", "0.5345665", "0.53442115", "0.5327602", "0.53254575", "0.5323211", "0.5316442", "0.53109545", "0.53109545", "0.53109545", "0.53109545", "0.53109545", "0.53109545", "0.53109545", "0.53086495", "0.53086495", "0.53083086", "0.53058827", "0.5300915", "0.52969193", "0.52969193", "0.52969193", "0.52966297", "0.52966297", "0.5295935", "0.5295935", "0.5295935", "0.5295935", "0.5295935", "0.5295935", "0.5294224", "0.52935994", "0.5291741", "0.5291741", "0.5291741", "0.5291741", "0.5291741", "0.5291741", "0.52906066", "0.52883685", "0.52883685", "0.52876395", "0.5280892", "0.5280467", "0.5278872", "0.52716607", "0.52693534", "0.52653086", "0.52623343", "0.5258704", "0.525561", "0.52554286", "0.52469206", "0.52458364", "0.52451915", "0.5242895", "0.5242707", "0.5237819", "0.52339834", "0.52234733", "0.52230334", "0.52096957", "0.5204796", "0.5202764" ]
0.0
-1
Serializes information the current object
public function serialize(SerializationWriter $writer): void { parent::serialize($writer); $writer->writeEnumValue('applicationIdentityType', $this->getApplicationIdentityType()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SerializeObject () {\n return serialize ($this);\n }", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function toString() : void\n {\n $out = serialize($this);\n \n }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "public function serialize()\n {\n }", "public function serialize()\n {\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString() {\n\t\tif (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n\t\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n\t\t}\n\n\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this));\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function serialize()\n {\n return serialize(array(\n \"id\"=>$this->getId()\n ));\n }", "public function serialize();", "public function serialize();", "public function serialize();", "public function serialize() {\r\n return json_encode($this);\r\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Autodesk\\Forge\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Autodesk\\Forge\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function serialize()\n {\n return json_encode($this);\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n // return json_encode(\n // ObjectSerializer::sanitizeForSerialization($this),\n // JSON_PRETTY_PRINT\n // );\n //}\n\n return json_encode(ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public abstract function serialize();", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n\t{\n\t\treturn $this->dump();\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function serialize() {\n\t\t$aInformation = array();\n\t\tforeach (self::$s_aInfoKeys as $sKey) {\n\t\t\t$aInformation[$sKey] = $this[$sKey];\n\t\t}\n\n\t\treturn serialize($aInformation);\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }" ]
[ "0.7756909", "0.7567479", "0.7460804", "0.7460804", "0.7460804", "0.74483377", "0.74483377", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.7395633", "0.739549", "0.739549", "0.7389668", "0.73007923", "0.7277297", "0.7277297", "0.7209685", "0.719259", "0.719259", "0.7190416", "0.7180332", "0.7174614", "0.71350366", "0.712846", "0.712846", "0.7124929", "0.7123445", "0.7123445", "0.7123445", "0.71196645", "0.71107656", "0.71104735", "0.71052724", "0.71001405", "0.71001405", "0.70990664", "0.70878917", "0.7085295", "0.7080219", "0.7076329", "0.7074027", "0.7074027", "0.70713055", "0.7069906", "0.7063665", "0.7063665", "0.7063383", "0.70598245", "0.7055724", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823", "0.70528823" ]
0.0
-1
Sets the applicationIdentityType property value. Type of application that is referenced. Possible values are: aadApplication, bot, tenantBot, office365Connector, and outgoingWebhook.
public function setApplicationIdentityType(?TeamworkApplicationIdentityType $value): void { $this->getBackingStore()->set('applicationIdentityType', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setApplicationType($applicationType)\n {\n $this->applicationType = $applicationType;\n return $this;\n }", "public function getApplicationType()\n {\n return $this->applicationType;\n }", "public function setAuthenticationType( $type ) {\n\t\t$this->_mAuthenticationType = $type;\n\t}", "public function setUserType($type)\n\t{\n\t\t$this->type = $type;\n\t}", "public function setInputType($value)\n {\n $this->_config->set('inputType', $value);\n }", "public function getApplicationIdentityType(): ?TeamworkApplicationIdentityType {\n $val = $this->getBackingStore()->get('applicationIdentityType');\n if (is_null($val) || $val instanceof TeamworkApplicationIdentityType) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'applicationIdentityType'\");\n }", "public function setType($associationType)\n {\n $this->type = $associationType;\n }", "public function setTypeID($value) {\n\t\t$this->_type_id = $value;\n\t}", "public function updateApplicationType (AccreditationApplication $accreditationApplication, $accreditationApplicationTypeId, Store $store)\r\n {\r\n $accreditationReference = $this->em->getReference('YilinkerCoreBundle:AccreditationLevel', $accreditationApplicationTypeId);\r\n\r\n if(!is_null($accreditationReference)){\r\n $store->setIsEditable(false);\r\n }\r\n\r\n $store->setAccreditationLevel($accreditationReference);\r\n $accreditationApplication->setAccreditationLevel($accreditationReference);\r\n\r\n $this->qrCodeGenerator->generateStoreQrCode($store, $store->getStoreSlug());\r\n\r\n if(!is_null($accreditationReference)){\r\n $this->elasticaObjectPersister->insertOne($store);\r\n }\r\n\r\n $this->em->flush();\r\n\r\n return $accreditationApplication;\r\n }", "public function setConfigurationAccountType(?SecureAssessmentAccountType $value): void {\n $this->getBackingStore()->set('configurationAccountType', $value);\n }", "public function getAppType();", "public function setType(?PhoneType $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "private function _setApplicationTypeByDevice()\n {\n $_device = $this->_getObjectMobile_detector();\n\n if($_device->isTablet()){\n $this->_deviceType = DEVICE_TYPE_TABLET;\n }elseif($_device->isMobile()){\n $this->_deviceType = DEVICE_TYPE_MOBILE;\n }else{\n $this->_deviceType = DEVICE_TYPE_DESKTOP;\n }\n }", "public function setType($type)\r\n {\r\n $this->type = $type;\r\n }", "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "public function setType($type)\n {\n $this->type = $type;\n }", "function setType($a_type)\n\t{\n\t\t$this->il_type = $a_type;\n\t}", "public function getTypeAttribute()\n {\n if($this->personal_access_client) {\n return OAuthClientType::PERSONAL();\n }\n\n if($this->password_client) {\n return OAuthClientType::PASSWORD();\n }\n\n if($this->redirect === '') {\n return OAuthClientType::CREDENTIALS();\n }\n\n return OAuthClientType::AUTH_CODE();\n }", "public function setTypeIdAttribute($input)\n {\n $this->attributes['type_id'] = $input ? $input : null;\n }", "public function setTypeAttribute($value)\n {\n $this->attributes['type'] = $value;\n }", "public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}", "public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}", "public function setType($aType) {\n $this->type = $aType;\n }", "public function setType($type)\n {\n $this['type'] = $type;\n }", "public function setPersonType($value)\n {\n $this->setProperty(\"PersonType\", $value, true);\n }", "function setAppId($value)\n {\n $this->_props['AppId'] = $value;\n }", "function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\n\t\t$this->data['type'] = $type;\n\t}", "public function setType( $type ) {\n\n\t\t$this->type = $type;\n\t}", "public function setApplicationId(?string $value): void {\n $this->getBackingStore()->set('applicationId', $value);\n }", "public function SetType($type){\r\r\n\t\t$this->type = (string) $type;\r\r\n\t}", "public function SetType($type){\r\n\t\t$this->type = (string) $type;\r\n\t}", "public function set_type($type)\n {\n $this->set_default_property(self::PROPERTY_TYPE, $type);\n }", "public function setTypeId($value)\n {\n return $this->set(self::_TYPE_ID, $value);\n }", "public function setModelType($type)\n {\n $this->modelType = $type;\n }", "public function setType($type)\n\t{\n\t\t$this->_type = $type;\n\t}", "public function setType($type)\n\t{\n\t\t$this->_type = $type;\n\t}", "function setAddressType( &$value )\n {\n if( is_numeric( $value ) )\n {\n $this->AddressTypeID = $value;\n }\n \n if( get_class( $value ) == \"ezaddresstype\" )\n {\n $this->AddressTypeID = $value->id();\n }\n }", "public function setType($type)\n {\n $type = strtolower($type);\n if (in_array($type, self::$allowed_types)) {\n $this->type= $type;\n } else {\n throw new InvalidArgumentException(\"Invalid alert type provided!\");\n }\n\n return $this;\n }", "protected function setType()\n {\n $this->client_type = $this->getType();\n }", "public function setBitmapType($type)\n\t{\n\t if (!in_array($type, array(self::BITMAP_TYPE_REGULAR, self::BITMAP_TYPE_ICON_LAUNCHER))) {\n\t throw new InvalidBitmapTypeException(\n\t 'A valid bitmap type must be defined, either '.self::BITMAP_TYPE_REGULAR.' or '.self::BITMAP_TYPE_ICON_LAUNCHER\n\t );\n\t }\n\t \n $this->bitmapType = $type;\n \n return $this;\n\t}", "public function setAppId($value);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setClaimType($claimType)\r\n {\r\n if ($claimType == \"repair-warranty\" || $claimType == \"repair-no-warranty\" ||\r\n $claimType == \"repair-no-transaction\")\r\n {\r\n $this->claimType = $claimType;\r\n }\r\n else\r\n {\r\n die(\"<h2> Error - Invaild Claim Type provided for setClaimType() method. Must be ethier repair-warranty, repair-no-warranty or repair-no-transaction.</h2>\");\r\n }\r\n }", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "public function setIdType($idType)\n {\n $this->idType = $idType;\n\n return $this;\n }", "public function setType($type) {}", "public function setTypeAttribute($value)\n {\n if(!intval($value)){\n $this->attributes['type'] = self::typeToValue($value);\n }else{\n $this->attributes['type'] = $value;\n }\n }", "final public function getType() {\n\t\treturn 'app';\n\t}", "function SetEventActivityType($activity_types)\n\t{\n\t\tif (empty($this->userid)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!is_array($activity_types)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$serialized = serialize($activity_types);\n\t\tif (!$serialized) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$serialized = $this->Db->Quote($serialized);\n\t\t$status = $this->Db->Query(\"UPDATE [|PREFIX|]users SET eventactivitytype = '{$serialized}' WHERE userid = {$this->userid}\");\n\t\tif (!$status) {\n\t\t\tlist($error, $level) = $this->Db->GetError();\n\t\t\ttrigger_error($error, $level);\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->eventactivitytype = $activity_types;\n\n\t\treturn true;\n\t}", "public function setApplicationPath($path, $type)\n {\n $this->paths[$type] = $path;\n }", "public function set_context_type($context_type)\n {\n $this->set_default_property(self::PROPERTY_CONTEXT_TYPE, $context_type);\n }", "function setType($value)\n {\n $this->setAttribute(\"type\", $value);\n return $this;\n }", "protected function setType(int $type):void {\r\n\t\t$this->type = $type;\r\n\t}", "public function setPrincipalType(?string $value): void {\n $this->getBackingStore()->set('principalType', $value);\n }", "public function setContentType($type)\n\t{\n\t\t$this->contenttype = $type;\n\t}", "public function setType($type)\n {\n parent::setAttr(\"type\", $type);\n }", "public function setDetectionType($type = null)\n\t\t{\n\t\t\tif ($type === null) {\n\t\t\t\t$type = self::DETECTION_TYPE_MOBILE;\n\t\t\t}\n\n\t\t\tif ($type != self::DETECTION_TYPE_MOBILE && $type != self::DETECTION_TYPE_EXTENDED) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->detectionType = $type;\n\t\t}", "function setType($type = \"\")\n\t\t{\n\t\t\t$this->type = $type;\n\t\t}", "public function setUserType($user_type)\n {\n $this->user_type = $user_type;\n return $this;\n }", "public function setClientAuthenticationType($val)\n {\n $this->_propDict[\"clientAuthenticationType\"] = $val;\n return $this;\n }", "public function setType(EntityType $type);", "public function setType(string $type);", "public function set_type($type) {\n $this->update([\n 'type' => $type\n ]);\n\n $this->type = $type;\n\n // finish configuring this OrderExchange\n $this->sync();\n }", "public function setType(string $type) {\n if ($type == Router::API_ROUTE || $type == Router::CLOSURE_ROUTE ||\n $type == Router::CUSTOMIZED || $type == Router::VIEW_ROUTE) {\n $this->type = $type;\n }\n }", "public function setInputType( $aInputType )\n\t{\n\t\tif (!empty($aInputType))\n\t\t\t$this->setAttr( 'type', $aInputType ) ;\n\t\treturn $this;\n\t}", "public function setAttribute($type, $value)\n {\n $this->attributes[$type] = $value;\n }", "public function setType(string $type)\n {\n $this->type = $type;\n }", "public function getClaimType()\r\n {\r\n return $this->claimType;\r\n }", "public function type($type)\n {\n $this->is_type = $type;\n return $this;\n }", "public function setRecipientType($value)\n {\n return $this->set('RecipientType', $value);\n }", "public function setRecipientType($value)\n {\n return $this->set('RecipientType', $value);\n }", "public function setApplicationID($app_id) \n\t{\n\t\t$this->application_id = $app_id;\n\t}", "public function getAccidentType()\n {\n return $this->accidentType;\n }", "public function getAccidentType()\n {\n return $this->accidentType;\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }", "public function type($value) {\n return $this->setProperty('type', $value);\n }" ]
[ "0.5839746", "0.5718836", "0.52354974", "0.5139693", "0.49972066", "0.497583", "0.4926904", "0.48223728", "0.48081604", "0.4768287", "0.4765876", "0.47505423", "0.4746091", "0.4719808", "0.47184858", "0.47184858", "0.4696542", "0.4696542", "0.4696542", "0.46875224", "0.46875224", "0.46875224", "0.46875224", "0.46875224", "0.46875224", "0.46875224", "0.46875224", "0.46875224", "0.46837732", "0.46775904", "0.465603", "0.46464294", "0.46349826", "0.46349826", "0.46291563", "0.46281052", "0.4619534", "0.4612845", "0.46049315", "0.4600949", "0.45827663", "0.45568806", "0.455228", "0.45487157", "0.4510426", "0.4484348", "0.44802836", "0.4479744", "0.4479744", "0.44730985", "0.4472314", "0.4441669", "0.4436932", "0.4428422", "0.442242", "0.442242", "0.442242", "0.442242", "0.442242", "0.442242", "0.442242", "0.442242", "0.44198295", "0.44087163", "0.44087163", "0.44084868", "0.43981713", "0.4393923", "0.43885174", "0.43876946", "0.4378678", "0.43744692", "0.43669966", "0.43653712", "0.43593663", "0.43408218", "0.43319324", "0.4327099", "0.4320154", "0.4319243", "0.43133602", "0.4308925", "0.43088156", "0.43036813", "0.43014807", "0.4299617", "0.42971867", "0.4296574", "0.42860773", "0.42832538", "0.4269038", "0.4269038", "0.42648453", "0.42630407", "0.42630407", "0.4261193", "0.4261193", "0.4261193", "0.4261193", "0.4261193" ]
0.7571305
0
Redirect the user to the facebook authentication page.
public function redirectToProvider() { return Socialite::driver('facebook')->redirect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _authRedirect() {\n $options = array('scope' => $this->settings['permissions']);\n if (!empty($this->settings['appUrl'])) {\n $options['redirect_uri'] = $this->settings['appUrl'];\n }\n $url = $this->facebook->getLoginUrl($options);\n echo \"<script type=\\\"text/javascript\\\">top.location.href = '$url';</script>\";\n exit;\n }", "public function redirectToFacebook()//redirects user to facebook authentication\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectAction()\n {\n $this->facebookOAuth->authorize();\n }", "public function redirectToFacebook()\n {\n return Socialite::driver($this->facebookProvider)->stateless()->redirect();\n }", "public function redirectToFacebook()\n {\n \treturn Socialite::driver('facebook')->redirect();\n }", "public function redirectToFacebook()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirectToFacebook()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function login()\r\n {\r\n $helper = $this->facebook->getRedirectLoginHelper();\r\n $loginUrl = $helper->getLoginUrl(app_url('/facebook/callback'));\r\n\r\n // Redirect to facebook login page.\r\n header('location: ' . $loginUrl);\r\n exit;\r\n }", "public function handleFacebookRedirect(): RedirectResponse\n {\n return Socialite::driver(static::DRIVER_TYPE)->redirect();\n }", "public function log_user_into_facebook()\n {\n // TODO: Parameterise redirect_url and scope values\n $login_config = array(\n \"redirect_uri\" => \"http://sociable.local/account/facebooklogin\",\n \"scope\" => \"user_birthday, read_stream, user_location, publish_stream, email, read_friendlists, publish_checkins, user_education_history, user_work_history\"\n );\n $login_url = self::getLoginUrl($login_config);\n header('Location: ' . $login_url, true);\n exit;\n }", "public function redirectToFacebook()\n\t{\n\t return Socialize::with('facebook')->redirect();\n\t}", "public function loginWithFacebookAction()\n {\n \t$this->view->disable();\n \t$helper = $this->fbRedirectLoginHelper;\n \t$scope = array('public_profile', 'email', 'user_friends');\n \treturn $this->response->redirect($helper->getLoginUrl(), true);\n }", "public function facebook(){\n\t\t// get redirect URL\n\t\t$requestUrl = $this->input->get(\"redirect\");\n\t\t\n\t\t// perform Facebook login\n\t\t$res = false;\n\t\ttry {\n\t\t\t$res = $this->login_util->loginFacebook($this->config->item('facebook_app_id'), $this->config->item('facebook_secret'), $requestUrl);\n\t\t} catch (Exception $e){\n\t\t\t$this->display_login($requestUrl, $e->getMessage());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ($res){\n\t\t\t// redirect to the request URL\n\t\t\tredirect($requestUrl, 'refresh');\n\t\t} else {\n\t\t\t// If we reached here, then login has failed\n\t\t\t$this->display_login($requestUrl);\n\t\t}\n\t}", "public function redirect()\n {\n return SocialLogin::driver('facebook')->redirect();\n }", "public function facebookRedirect(){\n $github_user = Socialite::driver('facebook')->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('facebook')->redirect();\n return redirect('/callback');\n }", "public function redirect()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function facebookRedirect ()\n {\n $user = Socialite::driver('facebook')->stateless()->user();\n\n $name_real = $user->name;\n $role = 0;\n\n // register if not existing in DB\n\n $user = User::firstOrCreate([\n 'email' => $user->email\n ], [\n 'name' => $name_real,\n 'password' => Hash::make(Str::random(24)),\n 'role' => 0\n ]);\n\n Auth::login($user, true);\n\n if (\\Cart::getTotal() == 0.0) {\n return redirect('/');\n }\n\n return redirect('/cart');\n }", "public function redirectToFacebookProvider()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function redirect()\n {\n return Socialite::driver('facebook')->redirect();\n }", "function redirect($facebook){\r\n\t\t$loginUrl = $facebook->getLoginUrl(array(\r\n\t\t\t\"canvas\" =>1,\r\n\t\t\t\"fbconnect\" =>0,\r\n\t\t\t'req_perms' => \"email,publish_stream,user_hometown,user_location,user_photos,friends_photos,\r\n\t\t\t\t\tuser_photo_video_tags,friends_photo_video_tags,user_videos,video_upload,friends_videos\"\r\n\t\t\t//'req_perms' => \"email,publish_stream,user_hometown,user_location\"\r\n\t\t\t//'req_perms' => \"email,publish_stream,status_update,user_hometown,\r\n\t\t\t//\t\t\t\tuser_location,user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags\"\r\n\t\t));\r\n\r\n\t\t /*echo \"<script type='text/javascript'>top.location.href = '$loginUrl';</script>\";*/\r\n\t\t echo \"loginUrl: \" . $loginUrl;\r\n\t}", "public function facebook()\n {\n return Socialite::driver('facebook')->redirect();\n }", "public function facebook ()\n {\n return Socialite::driver('facebook')->redirect();\n\n }", "public function triggerFacebookLogin() {\n return Redirect::to( Facebook::getLoginUrl() );\n }", "function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}", "public function redirectToFacebook(Request $request) {\n /* if (Auth::check()) {\n return $this->abort(\"404\", ['request' => $request, 'code' => '404']);\n } */\n return Socialite::driver('facebook')->redirect();\n }", "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('facebook')->user();\n } catch (Exception $e) {\n return redirect('auth/facebook');\n }\n $authUser = $this->findOrCreateUser($user);\n \n Auth::login($authUser, true);\n \n return redirect('/');\n }", "public function facebookCallback(){\n $facebook_user = Socialite::driver('facebook')->user();\n $user = $this->FacebookuserFindOrCreate($facebook_user);\n Auth::login($user , true);\n return redirect()->route('home')->with('user',$user);\n\n }", "public function redirectToProvider() {\n return Socialite::driver('facebook')->redirect();\n }", "public function handleProviderCallback() {\n\n try {\n $socialUser = Socialite::driver('facebook')->user();\n } catch (Exception $ex) {\n return redirect('/');\n }\n\n $user = $this->findOrCreateUser($socialUser);\n\n Auth::login($user, true);\n\n //return redirect($this->socialRedirectTo);\n return redirect($this->socialRedirectTo);\n }", "public function redirectToProvider()\n {\n \n return Socialite::driver('facebook')->redirect();\n }", "public function facebookLogin() {\n\t\t$this->autoRender = false;\n\n\t\t// config of facebook\n\t\t// app_id => app id from facebook app, app_secret => app secret from facebook app, default_graph_version\n\t\t$fb = new Facebook\\Facebook([\n\t\t\t'app_id' => '1038913562917167',\n\t\t\t'app_secret' => 'c0df3e628a09c24f972985ad47dee466',\n\t\t\t'default_graph_version' => 'v2.10',\n\t\t]);\n\n\t\t$helper = $fb->getRedirectLoginHelper();\n\n\t\t$permissions = ['email']; // Optional permissions\n\t\t$loginUrl = $helper->getLoginUrl('http://myanants.com/user/fbcallback', $permissions);\n\t\t$this->redirect($loginUrl);\n\n\t}", "public function urlSocialAuthRedirect($provider) {\n //Session::put('url.failed', URL::previous());\n return Socialite::driver($provider)->redirect();\n }", "public function handleFacebookCallback()\n {\n try {\n\n $user = Socialite::driver('facebook')->user();\n $isUser = User::where('fb_id', $user->id)->first();\n\n if($isUser){\n Auth::login($isUser);\n return redirect('/home');\n }else{\n $createUser = User::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'fb_id' => $user->id,\n 'password' => encrypt('admin@123')\n ]);\n\n Auth::login($createUser);\n return redirect('/home');\n }\n\n } catch (\\Exception $exception) {\n return redirect()\n ->route('login')\n ->with('error_string','Authentication Failed!!!');\n }\n }", "function redirectUserToLogin($facebook,$scope,$app_url){\n $loginUrl = $facebook->getLoginUrl(array(\n 'scope' => $scope,\n 'redirect_uri' => $app_url,\n ));\n\n print('<script> top.location.href=\\'' . $loginUrl . '\\'</script>');\n exit();\n}", "public function callback()\r\n {\r\n $helper = $this->facebook->getRedirectLoginHelper();\r\n\r\n try {\r\n $accessToken = $helper->getAccessToken();\r\n } catch (Exception $e){\r\n echo 'Error: ' . $e->getMessage();\r\n exit;\r\n }\r\n\r\n if (isset($accessToken)) {\r\n // Store access token in session.\r\n $_SESSION['facebook_access_token'] = (string)$accessToken;\r\n\r\n header('Location: /facebook/view');\r\n exit;\r\n } elseif($helper->getError()) {\r\n var_dump($helper->getError());\r\n var_dump($helper->getErrorCode());\r\n var_dump($helper->getErrorDescription());\r\n }\r\n\r\n\r\n }", "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('facebook')->user(); \n \n } catch (Exception $e) {\n return redirect('auth/facebook');\n }\n $authUser = $this->findOnCreated($user);\n Auth::login($authUser, true);\n \n return redirect()->route('home');\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')\n ->scopes(['user_birthday'])\n ->redirect();\n }", "function redirectLogin()\n\t{\n\t\tredirect('auth/login');\n\t}", "public function index()\n\t{\n\t\t$facebook = new Facebook(Config::get('facebook'));\n\t $params = array(\n\t 'redirect_uri' => url('/login/fb/callback'),\n\t 'scope' => 'email',\n\t );\n\t return Redirect::to($facebook->getLoginUrl($params));\n\t}", "public function loginViaFacebook()\n { \n $userFB = $this->facebook->getUserFromRedirect();\n $userDB = User::where('facebook_id', $userFB->getId())->first();\n\n if (! is_null($userDB)) {\n // User already exists, check \"first time visit\" state (old)\n if ($userDB->old == 0) {\n $userDB->update(['old' => 1]);\n $userDB->save();\n }\n //Authenticate user\n Auth::loginUsingId($userDB->id);\n return redirect('/welcome');\n }\n // User not found in database, create it\n $this->createAndLoginUser($userFB);\n return redirect('/welcome');\n }", "public function handleProviderFacebookCallback()\n {\n $user = Socialite::driver('facebook')->user(); // Fetch authenticated user\n // dd($user);\n $user = json_decode(json_encode($user), true);\n return redirect('/register')->with('user', $user)->with('fb_google', 1);\n }", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->scopes([\n 'email',\n 'public_profile',\n ])->redirect();\n }", "private function redirect()\n\t\t{\n\t\t\tif(isUserLoggedIn())\n\t\t\t{\n\t\t\t\theader(\"Location: \" . APPROOT);\n\t\t\t}\n\t\t}", "function auth_redirect()\n {\n }", "protected function facebookAuthenticate(){\n\n\t\t\n\t}", "public function redirectToProvider() {\n\n return \\Socialite::driver('facebook')->scopes(['email', 'public_profile'])->redirect();\n }", "function template_redirect() {\r\n\t\tappthemes_auth_redirect_login();\r\n\t}", "public function redirectToProvider()\n {\n return Socialite::driver('facebook')\n ->scopes(['email', 'user_birthday','user_about_me','user_education_history',\n 'user_location','user_work_history','user_hometown','user_likes'])\n ->redirect();\n }", "public function redirect($provider)\n {\n return Socialite::driver($provider)->redirect(); \n }", "public function handleFacebookCallback(LaravelFacebookSdk $fb)\n {\n try {\n $token = $fb->getAccessTokenFromRedirect();\n\n } catch (\\Facebook\\Exceptions\\FacebookSDKException $e) {\n dd($e->getMessage());\n }\n\n if (!$token) {\n // Get the redirect helper\n $helper = $fb->getRedirectLoginHelper();\n\n if (!$helper->getError()) {\n abort(403, 'Unauthorized action.');\n }\n\n // User denied the request\n dd(\n $helper->getError(),\n $helper->getErrorCode(),\n $helper->getErrorReason(),\n $helper->getErrorDescription()\n );\n }\n\n if (!$token->isLongLived()) {\n // OAuth 2.0 client handler\n $oauth_client = $fb->getOAuth2Client();\n\n // Extend the access token.\n try {\n $token = $oauth_client->getLongLivedAccessToken($token);\n } catch (\\Facebook\\Exceptions\\FacebookSDKException $e) {\n dd($e->getMessage());\n }\n }\n\n $fb->setDefaultAccessToken($token);\n\n IO::set('user_access_token', $token, false, function () use ($token) {\n Credential::set(['user_access_token' => $token]);\n\n });\n\n // Get basic info on the user from Facebook.\n try {\n $response = $fb->get('/me?fields=id,name,email');\n } catch (\\Facebook\\Exceptions\\FacebookSDKException $e) {\n dd($e->getMessage());\n }\n\n return \\redirect('/done');\n }", "protected function redirectAfterSuccessfulLogin()\n {\n $member = Security::getCurrentUser();\n\n // Absolute redirection URLs may cause spoofing\n $backURL = $this->getBackURL();\n if ($backURL) {\n return $this->redirect($backURL);\n }\n\n // If a default login dest has been set, redirect to that.\n $defaultLoginDest = Security::config()->get('default_login_dest');\n if ($defaultLoginDest) {\n return $this->redirect($defaultLoginDest);\n }\n\n // Redirect the user to the page where they came from\n if ($member) {\n // Welcome message\n $message = _t(\n 'SilverStripe\\\\Security\\\\Member.WELCOMEBACK',\n 'Welcome Back, {firstname}',\n ['firstname' => $member->FirstName]\n );\n Security::singleton()->setSessionMessage($message, ValidationResult::TYPE_GOOD);\n }\n\n // Redirect back\n return $this->redirectBack();\n }", "public function redirectToLogin() {\n\t\t//\tcreate and save the state parameter\n\t\t$openIdStateMap =& storageFindOrCreate( \"openIdStateMap\" );\n\t\t$state = generatePassword(10);\n\t\t$openIdStateMap[ $state ] = $this->code;\n\n\t\t//\tcreate the URL\n\t\t$config = $this->getConfig();\n\t\t$request = new HttpRequest( $config[\"authorization_endpoint\"], \"GET\", array( \n\t\t\t\"response_type\" => \"code\",\n\t\t\t\"scope\" => $this->scope,\n\t\t\t\"client_id\" => $this->clientId,\n\t\t\t\"state\" => $state,\n\t\t\t\"redirect_uri\" => projectURL() . GetTableLink(\"openidcallback\")\n\t\t));\n\n\t\theader( \"Location: \" . $request->getUrl() );\n\t}", "function loginWithFacebook()\n {\n /*\n // Create our Application instance (replace this with your appId and secret).\n $facebook = new Facebook(array(\n 'appId' => FACEBOOK_LOGIN_APP_ID,\n 'secret' => FACEBOOK_LOGIN_APP_SECRET,\n ));\n\n $this->view->facebook_login_url = $facebook->getLoginUrl(array(\n 'redirect_uri' => URL . 'login/loginWithFacebook'\n ));\n // TODO: this is duplicate !?!??!\n */\n\n // run the login() method in the login-model, put the result in $login_successful (true or false)\n $login_model = $this->loadModel('Login');\n // perform the login method, put result (true or false) into $login_successful\n $login_successful = $login_model->loginWithFacebook();\n\n // check login status\n if ($login_successful) {\n // if YES, then move user to dashboard/index\n // please note: this is a browser-redirection, not a rendered view\n header('location: ' . URL . 'dashboard/index');\n } else {\n // if NO, then show the login/index (login form) again\n $this->view->render('login/index');\n }\n }", "protected function Login()\n {\n $this->redirectParams[\"openid.realm\"] = $this->config[\"realm\"];\n $this->redirectParams[\"openid.return_to\"] = $this->config[\"return_to\"];\n\n $params = http_build_query($this->redirectParams);\n\n $url = $this->urlAuthorize . \"?$params\";\n\n header(\"Location: $url\");\n exit();\n }", "public function authenticateWith($provider) {\n return Socialite::driver($provider)->redirect();\n }", "public function handleFacebookCallback(Request $request)\n {\n if ($request->has('error')) {\n return redirect(config('bot.facebook.app.redirect').'?errors='. $request->input('error_description', 'FAILED LOGIN'));\n }\n\n // Validate the request.\n $validator = Validator::make($request->all(), [\n 'code' => 'required|string',\n 'state' => 'required|string',\n ]);\n if ($validator->fails()) {\n abort(404);\n }\n\n [$memberID, $accessToken, $agentID, $fbID] = $this->service->handleFacebookUser($request->all());\n\n $to = config('bot.facebook.app.redirect') .\"?agent_id=$agentID&facebook_user_id=$fbID&access_token=$accessToken&l2l_member_id=$memberID\";\n\n return redirect($to);\n }", "public function callback(SocialFacebookAccountService $service)\n {\n $user = $service->createOrGetUser(Socialite::driver('facebook')->user());\n auth()->login($user);\n return redirect()->to('/home');\n }", "public function handleProviderCallback()\n {\n try {\n $user = Socialite::driver('linkedin')->user();\n } catch (Exception $e) {\n return Redirect::to('socialite/linkedin');\n }\n\n $authUser = User::findOrCreateUser($user);\n\n Auth::login($authUser, true);\n\n return redirect('/');\n }", "function authFacebook($next='',$cancel_url='')\n {\n global $global;\n\n require_once dirname(__FILE__).'/lib/fbapi/facebook.php';\n\n //$facebook=new Facebook($api_key,$secret);\n $facebook = new Facebook(array(\n 'appId' => $global->app_id,\n 'secret' => $global->app_secret,\n 'cookie' => true));\n\n $global->facebook=$facebook;\n $session = $facebook->getSession();\n\n try\n {\n $global->fbme = $facebook->api('/me'); \n } \n catch (FacebookApiException $e) \n {\n $global->fbme = false;\n error_log($e);\n //echo $e->getMessage();\n } \n\n if ($global->fbme == false) \n {\n $params['canvas'] =1;\n $params['fbconnect'] = 0;\n $params['req_perms'] = 'publish_stream, email';\n\n //$params['next'] = $global->link->createLink('index.php',array('instid'=>$global->instid));\n //'cancel_url' => $appurl \n\n $login_url = $facebook->getLoginUrl($params);\n\n echo '<script>top.location=\"' . $login_url . '\";</script>';\n //header(\"Location:$login_url\");\n exit();\n }\n\n return true;\n }", "private function redirectToSpotifyAuthorizeUrl()\n {\n header(\"Location: {$this->session->getAuthorizeUrl($this->options)}\");\n die();\n }", "public function facebookAction() {\n //check that a logged in user can not access this action\n if (TRUE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n //go to the home page\n return $this->redirect('/');\n }\n $request = $this->getRequest();\n $session = $request->getSession();\n //get page url that the facebook button in\n $returnURL = $session->get('currentURL', FALSE);\n if (!$returnURL) {\n $returnURL = '/';\n }\n //user access Token\n $shortLive_access_token = $session->get('facebook_short_live_access_token', FALSE);\n //facebook User Object\n $faceUser = $session->get('facebook_user', FALSE);\n // something went wrong\n $facebookError = $session->get('facebook_error', FALSE);\n\n if ($facebookError || !$faceUser || !$shortLive_access_token) {\n return $this->redirect('/');\n }\n\n //generate long-live facebook access token access token and expiration date\n $longLive_accessToken = FacebookController::getLongLiveFaceboockAccessToken($this->container->getParameter('fb_app_id'), $this->container->getParameter('fb_app_secret'), $shortLive_access_token);\n\n $em = $this->getDoctrine()->getManager();\n\n //check if the user facebook id is in our database\n $socialAccounts = $em->getRepository('ObjectsUserBundle:SocialAccounts')->getUserWithRolesByFaceBookId($faceUser->id);\n\n if ($socialAccounts) {\n //update long-live facebook access token\n $socialAccounts->setAccessToken($longLive_accessToken['access_token']);\n $socialAccounts->setFbTokenExpireDate(new \\DateTime(date('Y-m-d', time() + $longLive_accessToken['expires'])));\n\n $em->flush();\n //get the user object\n $user = $socialAccounts->getUser();\n //try to login the user\n try {\n // create the authentication token\n $token = new UsernamePasswordToken($user, null, 'main', $user->getRoles());\n // give it to the security context\n $this->get('security.context')->setToken($token);\n //redirect the user\n return $this->redirectUserAction();\n } catch (\\Exception $e) {\n //can not reload the user object log out the user\n $this->get('security.context')->setToken(null);\n //invalidate the current user session\n $this->getRequest()->getSession()->invalidate();\n //redirect to the login page\n return $this->redirect($this->generateUrl('login', array(), TRUE));\n }\n } else {\n /**\n *\n * the account of the same email as facebook account maybe exist but not linked so we will link it\n * and directly logging the user\n * if the account is not active we automatically activate it\n * else will create the account ,sign up the user\n *\n * */\n $userRepository = $this->getDoctrine()->getRepository('ObjectsUserBundle:User');\n $roleRepository = $this->getDoctrine()->getRepository('ObjectsUserBundle:Role');\n $user = $userRepository->findOneByEmail($faceUser->email);\n //if user exist only add facebook account to social accounts record if user have one\n //if not create new record\n if ($user) {\n $socialAccounts = $user->getSocialAccounts();\n if (empty($socialAccounts)) {\n $socialAccounts = new SocialAccounts();\n $socialAccounts->setUser($user);\n }\n $socialAccounts->setFacebookId($faceUser->id);\n $socialAccounts->setAccessToken($longLive_accessToken['access_token']);\n $socialAccounts->setFbTokenExpireDate(new \\DateTime(date('Y-m-d', time() + $longLive_accessToken['expires'])));\n $user->setSocialAccounts($socialAccounts);\n\n //activate user if is not activated\n //get object of notactive Role\n $notActiveRole = $roleRepository->findOneByName('ROLE_NOTACTIVE');\n if ($user->getUserRoles()->contains($notActiveRole)) {\n //get a user role object\n $userRole = $roleRepository->findOneByName('ROLE_USER');\n //remove notactive Role from user in exist\n $user->getUserRoles()->removeElement($notActiveRole);\n\n $user->getUserRoles()->add($userRole);\n\n $fbLinkeDAndActivatedmessage = $this->get('translator')->trans('Your Facebook account was successfully Linked to your account') . ' ' . $this->get('translator')->trans('your account is now active');\n //set flash message to tell user that him/her account has been successfully activated\n $session->getFlashBag()->set('notice', $fbLinkeDAndActivatedmessage);\n } else {\n $fbLinkeDmessage = $this->get('translator')->trans('Your Facebook account was successfully Linked to your account');\n //set flash message to tell user that him/her account has been successfully linked\n $session->getFlashBag()->set('notice', $fbLinkeDmessage);\n }\n $em->persist($user);\n $em->flush();\n\n //try to login the user\n try {\n // create the authentication token\n $token = new UsernamePasswordToken($user, null, 'main', $user->getRoles());\n // give it to the security context\n $this->get('security.context')->setToken($token);\n //redirect the user\n return $this->redirectUserAction();\n } catch (\\Exception $e) {\n //can not reload the user object log out the user\n $this->get('security.context')->setToken(null);\n //invalidate the current user session\n $this->getRequest()->getSession()->invalidate();\n //redirect to the login page\n return $this->redirect($this->generateUrl('login', array(), TRUE));\n }\n } else {\n\n //user sign up\n $user = new User();\n $user->setEmail($faceUser->email);\n //set a valid login name\n $user->setLoginName($this->suggestLoginName($faceUser->name));\n $user->setFirstName($faceUser->first_name);\n $user->setLastName($faceUser->last_name);\n if ($faceUser->gender == 'female') {\n $user->setGender(0);\n } else {\n $user->setGender(1);\n }\n //try to download the user image from facebook\n $image = FacebookController::downloadAccountImage($faceUser->id, $user->getUploadRootDir());\n //check if we got an image\n if ($image) {\n //add the image to the user\n $user->setImage($image);\n }\n\n //create $socialAccounts object and set facebook account\n $socialAccounts = new SocialAccounts();\n $socialAccounts->setFacebookId($faceUser->id);\n $socialAccounts->setAccessToken($longLive_accessToken['access_token']);\n $socialAccounts->setFbTokenExpireDate(new \\DateTime(date('Y-m-d', time() + $longLive_accessToken['expires'])));\n $socialAccounts->setUser($user);\n $user->setSocialAccounts($socialAccounts);\n $translator = $this->get('translator');\n\n //TODO use\n //send feed to user profile with sign up\n //FacebookController::postOnUserWallAndFeedAction($faceUser->id, $longLive_accessToken['access_token'], $translator->trans('I have new account on this cool site'), $translator->trans('PROJECT_NAME'), $translator->trans('SITE_DESCRIPTION'), 'PROJECT_ORIGINAL_URL', 'SITE_PICTURE');\n //set flash message to tell user that him/her account has been successfully activated\n $session->getFlashBag()->set('notice', $translator->trans('your account is now active'));\n //user data are valid finish the signup process\n return $this->finishSignUp($user, TRUE);\n }\n }\n }", "public function redirect();", "public function redirect();", "public function redirect();", "public function redirectToLogin($url = '')\n\t{\n\t\ttry {\n\t\t\t$helper = new FacebookRedirectLoginHelper(ROOT_URL . $url);\n\t\t\t$this->redirect($helper->getLoginUrl());\n\t\t} catch (\\Exception $e) {\n\t\t\terror_log($e->getMessage());\n\t\t\t$this->redirect(ROOT_URL);\n\t\t}\n\t}", "public static function setRedirectUponAuthentication(){\n\n /**\n * Make sure we redirect to the requested page\n */\n if(isset($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]) && !empty($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY])){\n CoreHeaders::setRedirect($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]);\n unset($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]);\n }else{\n CoreHeaders::setRedirect('/');\n }\n\n }", "function loginBegin()\r\n\t{\r\n\t\t// if we have extra perm\r\n\t\tif( isset( $this->config[\"scope\"] ) && ! empty( $this->config[\"scope\"] ) )\r\n\t\t{\r\n\t\t\t$this->scope = $this->scope . \", \". $this->config[\"scope\"];\r\n\t\t}\r\n\r\n\t\t// get the login url \r\n\t\t$url = $this->api->getLoginUrl( array( 'scope' => $this->scope, 'redirect_uri' => $this->endpoint ) );\r\n\r\n\t\t// redirect to facebook\r\n\t\tHybrid_Auth::redirect( $url ); \r\n\t}", "public function actionLogin()\r\n\t{\r\n\t $this->redirect(array('//user/auth'));\r\n\t}", "public function doRedirectLogin() {\n\t\t\theader(\"Location: ../../login.php?\".http_build_query($_REQUEST));\n\t\t\texit;\n\t\t}", "function _loginRedirect(){\r\n \t// send user to the login page\r\n \theader(\"Location:/index.php\");\r\n }", "public function facebookLogin(Request $request)\n {\n $appId = env('FACEBOOK_APP_ID');\n $redirectUri = url('/login/facebook/callback');\n $scope = 'public_profile,email';\n\n $url = 'https://www.facebook.com/v2.8/dialog/oauth?client_id=' . $appId . '&redirect_uri=' . $redirectUri . '&scope=' . $scope;\n return redirect($url);\n }", "public function facebookAction(Celsus_Data_Object $parameters, Celsus_Response_Model $responseModel) {\n\n\t\t$adapter = Celsus_Auth::getAuthAdapter();\n\t\tif (!$adapter->canAuthenticate($parameters)) {\n\t\t\tif ($adapter->accessDenied($parameters)) {\n\t\t\t\t$responseModel->setResponseType($responseModel::RESPONSE_TYPE_USER_DECLINED);\r\n\t\t\t} else {\n\t\t\t\t$responseModel->setResponseType($responseModel::RESPONSE_TYPE_MISSING_AUTHENTICATION);\n\t\t\t}\n\n\t\t\t// The request did not supply enough information to authenticate, so we bail.\n\t\t\treturn;\n\t\t}\n\n\t\t$context = $parameters->context;\n\n\t\t$callbackUrl = Celsus_Routing::absoluteLinkTo('auth_facebook_callback', array('context' => $context));\n\t\t$adapter->setCallbackUrl($callbackUrl);\n\t\t$adapter->populateAuthorisationPayload($parameters);\n\t\t$result = $adapter->authenticate();\n\n\t\tif (!$result->isValid()) {\n\t\t\t// Error authenticating to Facebook.\n\t\t\t$responseModel->setResponseType($responseModel::RESPONSE_TYPE_ERROR);\n\t\t\treturn;\n\t\t} else {\n\t\t\t$facebookData = $adapter->getResult();\n\t\t}\n\n\t\t$auth = Celsus_Auth::getInstance();\n\n\t\tif ($auth->hasIdentity()) {\n\t\t\t// Already has a session, so we really shouldn't have authenticated, but now that we have, just go to the home.\n\t\t\t// @todo Log this, because if it ever happens, it means the identity checking plugin isn't working.\n\t\t\t$this->getResponseModel()->setResponseType($responseModel::RESPONSE_TYPE_LOGGED_IN);\n\t\t\treturn;\r\n\t\t} else {\n\t\t\t// Check the Facebook data received against the local adapter.\n\t\t\t$facebookId = $result->getIdentity();\n\t\t\t$localAdapter = $adapter->getLocalAuthAdapter();\n\t\t\t$localAdapter->setCredential($facebookId)->setIdentity($facebookId);\n\t\t\t$result = $localAdapter->authenticate();\n\n\t\t\tif ($result->isValid()) {\n\t\t\t\t// The user is successfully authenticated, so allow the application the opportunity to merge fresh data from\n\t\t\t\t// Facebook and then redirect them back to from whence they came.\n\n\t\t\t\t$identity = $this->_merge($localAdapter->getResult(), $facebookData);\n\t\t\t\t$auth->getStorage()->write($identity);\n\t\t\t\t$this->getResponseModel()->setResponseType($responseModel::RESPONSE_TYPE_SUCCESS);\n\t\t\t} else {\n\t\t\t\t$code = $result->getCode();\n\t\t\t\tif (Zend_Auth_Result::FAILURE_IDENTITY_AMBIGUOUS == $code) {\n\t\t\t\t\t// More than one result matched that provider, which is weird.\n\t\t\t\t\t// @todo Log this, duplicate users are a no-no.\n\t\t\t\t\t$this->_handleDuplicate();\n\n\t\t\t\t} elseif (Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND == $code) {\n\t\t\t\t\t// User not found, so register them locally.\n\t\t\t\t\t$this->_register($facebookData);\n\t\t\t\t} else {\n\t\t\t\t\t// Another unspecified error.\n\t\t\t\t\t$responseModel->setResponseType($responseModel::RESPONSE_TYPE_ERROR);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function login(): RedirectResponse\n {\n return redirect($this->auth->getLoginUrl());\n }", "public function callback(SocialFacebookAccountService $service, Request $request)\n {\n try {\n if (!$request->has('code') || $request->has('denied')) {\n return redirect('/');\n }\n $user = $service->createOrGetUser(Socialite::driver('facebook')->stateless()->user());\n \n auth()->login($user);\n if ($user->is_admin) {\n return redirect()->route('admin');\n } else {\n return redirect()->route('user.dashboard');\n }\n } catch (\\Exception $e) {\n \\Log::info('Error while login ' . $e->getMessage());\n return redirect('/');\n }\n }", "protected function redirectTo()\n {\n \\Auth::logout();\n Session::flash('alert-danger', 'Please Verify Your Email to Login.');\n return '/login'; \n }", "public function facebookLogin() {\n\n// get token from redirected url\n try {\n $token = Facebook::getTokenFromRedirect();\n\n if ( !$token ) {\n return Redirect::to( '/' )->withError( 'Unable to obtain access token!' );\n }\n } catch ( FacebookQueryBuilderException $e ) {\n return Redirect::to( '/' )->with( 'error', $e->getPrevious()->getMessage() );\n }\n\n if ( !$token->isLongLived() ) {\n try {\n $token = $token->extend();\n } catch ( FacebookQueryBuilderException $e ) {\n return Redirect::to( '/' )->withError( $e->getPrevious()->getMessage() );\n }\n }//if ( !$token->isLongLived() )\n// set Access Token in Session as Session::put('facebook_access_token', (string)$token)\n Facebook::setAccessToken( $token );\n\n// get profile information from facebook account through object and store it in a session\n try {\n $facebook_user = Facebook::object( 'me' )->fields( 'id', 'name' )->get();\n $user = new stdClass;\n $user->facebook_username = $facebook_user->get( 'name' );\n $user->facebook_userid = $facebook_user->get( 'id' );\n\n Session::put( 'facebook_user', $user );\n if ( Auth::user() ) {\n return Redirect::route( 'customer.edit', Auth::user()->customer->id )->withMessage( 'Welcome, You have logged in with Facebook account.' );\n }//if ( Auth::user() )\n\n $customer_account = Customer::where( 'facebook_user_id', $user->facebook_userid )->first();\n if ( !is_null( $customer_account ) ) {\n Auth::login( $customer_account->user );\n return Redirect::intended( '/' )->withMessage( 'Welcome, You have logged in through Facebook account' );\n }//if ( !is_null( $customer_account ) )\n\n return Redirect::to( '/' )->withMessage( 'Welcome, You have logged in with Facebook account without Customer account.' );\n } catch ( SammyK\\FacebookQueryBuilder\\FacebookQueryBuilderException $e ) {\n return Redirect::to( '/' )->withError( $e->getPrevious()->getMessage() );\n }\n }", "public function redirectToProvider($provider)\n { \n return Socialite::driver($provider)->redirect();\n }", "public function pcr_auth_redirect($redirect_to, $request, $user) {\r\n if(isset($_SESSION['request_uri'])) {\r\n \r\n $redirect_to = $_SESSION['request_uri'];\r\n return $redirect_to;\r\n\r\n } else {\r\n\r\n // # request_uri is not set, return the home_url\r\n return home_url();\r\n }\r\n }", "public function redirectToProviderInstagram()\n {\n \\Session::flash('type', 'register');\n return Socialite::driver('instagram')->redirect();\n }", "public function handleProviderCallback(): RedirectResponse\n {\n session()->reflash();\n\n if (str_contains($_SERVER['REQUEST_URI'], 'facebook')) {\n\n $fbResponse = Socialite::driver('facebook');\n $user = $fbResponse->user();\n\n $fbAdAccounts = json_decode(Http::retry(3, 1000)\n ->get('https://graph.facebook.com/v10.0/me?fields=adaccounts.limit(1000){name,currency,timezone_name}&access_token=' . $user->token . '&limit=1000')\n ->body())->adaccounts->data;\n\n session()->flash('modal', 'Facebook Modal');\n session()->flash('fbToken', $user->token);\n session()->flash('fbAdAccounts', $fbAdAccounts);\n session()->flash('expiresIn', $user->expiresIn);\n\n return redirect()->route('integrations');\n }\n\n if (str_contains($_SERVER['REQUEST_URI'], 'google')) {\n\n $googleResponse = Socialite::driver('google');\n $user = $googleResponse->user();\n\n if (!isset($user->refreshToken)) {\n $endpoint = 'https://oauth2.googleapis.com/revoke?token='.$user->token;\n $response = Http::retry(3, 2000)->asForm()->post($endpoint);\n session()->forget('modal');\n\n return redirect()->route('google.start', ['scope' => session()->get('scope')]);\n }\n\n if (session()->get('scope') === 'drive') {\n\n session()->flash('googleRefreshToken', $user->refreshToken);\n return redirect()->route('integrations.google');\n }\n }\n }", "public function loginWithFacebook() {\n\t $code = Input::get( 'code' );\n\n\t // get fb service\n\t $fb = OAuth::consumer( 'Facebook' );\n\t //$fb = OAuth::consumer('Facebook','http://url.to.redirect.to');\n\t // check if code is valid\n\t \n\t // if code is provided get user data and sign in\n\t if ( !empty( $code ) ) {\n\n\t // This was a callback request from google, get the token\n\t $token = $fb->requestAccessToken( $code );\n\n\t // Send a request with it\n\t $result = json_decode( $fb->request( '/me' ), true );\n\n\t // $message = 'Your unique facebook user id is: ' . $result['id'] . ' and your name is ' . $result['name'];\n\t // echo $message. \"<br/>\";\n\t $id = $result['id'];\n\t $first_name = isset($result['first_name'])?$result['first_name']:'';\n\t $last_name = isset($result['last_name']) ? $result['last_name'] : '';\n\t $site = 'fb'; \n\t $email = isset($result['email']) ? $result['email'] : '';\n \n $data = $result;\n\t\t return self::socialMediaLogin($email, $first_name, $last_name, $id, $site, $data);\n\t\t //Var_dump\n\t //display whole array().\n\t // dd($result);\n\n\t }\n\t // if not ask for permission first\n\t else { \n\t // get fb authorization\n\t $url = $fb->getAuthorizationUri(); \n\t // return to facebook login url\n\t //return Response::make()->header( 'Location', (string)$url);\n\n\t return Redirect::to(htmlspecialchars_decode($url));\n\t }\n\n\t}", "public function redirect (Request $request) {\n\n $provider = $request->provider;\n\n // On vérifie si le provider est autorisé\n if (in_array($provider, $this->providers)) {\n return Socialite::driver($provider)->redirect(); // On redirige vers le provider\n }\n abort(404); // Si le provider n'est pas autorisé\n }", "public function redirect(Request $request, $provider)\n {\n // Redirect if social provider is not supported\n if (! in_array($provider, $this->providersList)) {\n abort('404');\n }\n\n // Hold the previous url to redirect back after auth\n $request->session()->flash('afterAuthUrl', url()->previous());\n\n return Socialite::driver($provider)->redirect();\n }", "public function logged_in_redirect(){\n\n\t\tif (isset($_SESSION['user_id'])) {\n\t\t \t# code...\n\t\t \theader('Location: index.php');\n\t\t } \n\t}", "public function loginWithFacebook() {\n\t $code = Input::get( 'code' );\n\n\t // get fb service\n\t $fb = OAuth::consumer( 'Facebook' );\n\n\t // check if code is valid\n\n\t // if code is provided get user data and sign in\n\t if ( !empty( $code ) ) {\n\n\n\t // This was a callback request from facebook, get the token\n\t $token = $fb->requestAccessToken( $code );\n\n\t // Send a request with it\n\t $result = json_decode( $fb->request( '/me' ), true );\n\n\t if(!empty($token)){\n \n try{\n // Find the user using the user id\n $user = Sentry::findUserByLogin($result['email']);\n \n // Log the user in\n Sentry::login($user, false);\n \n return Redirect::to('http://127.0.0.1/lipzo/thong-tin-ca-nhan');\n }\n catch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n {\n // Register the user\n $user = Sentry::register(array(\n 'activated' => 1,\n 'email' => $result['email'],\n 'password' => Hash::make(uniqid(time())),\n 'first_name' => $result['name'],\n 'permissions'=>array(\n\t\t\t\t\t\t\t'user'=>1\n\t\t\t\t\t\t)\n //'avatar' => $result['picture'],\n //'country' => (!empty($result['location'])) ? $result['location'] : false\n ));\n \n \n Sentry::login($user, false);\n \n return Redirect::to('http://127.0.0.1/lipzo/thong-tin-ca-nhan');\n }\n \n }\n\t \n\t //Var_dump\n\t //display whole array().\n\t //dd($result);\n\n\t }\n\t // if not ask for permission first\n\t else {\n\t // get fb authorization\n\t $url = $fb->getAuthorizationUri();\n\n\t // return to facebook login url\n\t return Redirect::to( (string)$url );\n\t }\n\n\t}", "public function redirectToProvider()\n {\n return Socialite::driver('keycloak')->redirect();\n }", "public function callback()\n {\n if (!$this->request->getQuery('code')) {\n $authUrl = $this->GoogleApi->createAuthUrl();\n return $this->redirect(filter_var($authUrl, FILTER_SANITIZE_URL));\n } else {\n $this->GoogleApi->authenticate($this->request->getQuery('code'));\n $this->redirect(\n [\n 'controller' => 'GoogleApis',\n 'action' => 'index'\n ]\n );\n }\n }", "public function linkedinRedirect()\n {\n $user = Socialite::driver('linkedin')->user();\n $user = User::firstOrCreate([\n 'email'=> $user->email,\n ],\n [\n 'name' => $user->nickname,\n 'email'=> $user->email,\n 'password' => Hash::make(Str::random(24))\n ]\n );\n Auth::login($user,true);\n return redirect(route('shop'));\n }", "public function redirectTo()\n {\n //跳转到登录前页面\n return $this->getReferrer($this->redirectTo);\n }", "public function callback(FacebookUserService $service)\n {\n $user = $service->createOrGetUser(SocialLogin::driver('facebook')->user());\n auth()->login($user);\n return redirect()->to('/');\n }", "public function handleProviderCallback($provider)\n {\n $user = Socialite::driver($provider)->user();\n $accessTokenResponseBody = $user->accessTokenResponseBody;\n $authUser = $this->findOrCreateUser($user, $provider);\n Auth::login($authUser, true);\n return redirect($this->redirectTo);\n }", "public function redirectToProvider($provider)\n {\n \treturn Socialite::driver($provider)->redirect();\n }", "public function redirectToAuth()\n {\n return Socialite::with('reddit')->scopes(['identity'])->redirect();\n }" ]
[ "0.8156292", "0.80448556", "0.7983353", "0.778894", "0.7660387", "0.7636338", "0.7636338", "0.7626947", "0.762218", "0.7575977", "0.75447035", "0.7496613", "0.7458429", "0.74462175", "0.7437252", "0.73672086", "0.73191965", "0.73191965", "0.73003143", "0.7299339", "0.7285703", "0.7271941", "0.72572905", "0.72147226", "0.7197288", "0.71157044", "0.7034708", "0.6933038", "0.69311833", "0.6882152", "0.6869405", "0.68618995", "0.6861165", "0.67941105", "0.67765886", "0.6775426", "0.6761337", "0.6737633", "0.6736826", "0.67310035", "0.6726552", "0.6701705", "0.6672436", "0.663951", "0.659968", "0.65690506", "0.6549885", "0.6482087", "0.6445954", "0.64448917", "0.6432246", "0.63606477", "0.62990594", "0.6292056", "0.62578857", "0.62515384", "0.62495387", "0.6248374", "0.6248039", "0.6238748", "0.620684", "0.6189479", "0.61792153", "0.6174513", "0.6174513", "0.6174513", "0.61740494", "0.6159928", "0.61563367", "0.6150869", "0.6142553", "0.61422867", "0.61300826", "0.61164594", "0.6114664", "0.6109059", "0.6106528", "0.6103994", "0.6077385", "0.6076226", "0.60722005", "0.6068496", "0.6067096", "0.60629004", "0.60558844", "0.6052699", "0.60525024", "0.6051995", "0.6032283", "0.6028545", "0.6024521", "0.6020305", "0.600697", "0.6006516", "0.60046333" ]
0.69072104
32
Obtain the user information from facebook.
public function handleProviderCallback() { $error = \Request::input('error'); if($error != "access_denied"){ $user = Socialite::driver('facebook')->user(); $us = User::find( \Auth::user()->id ); $us->avatar = $user->getAvatar(); $us->idSocial = $user->getId(); $us->save(); return redirect('/'); } else return redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUser(){\r\n\t\treturn $this->facebook_obj->getUser();\r\n\t}", "public function getUserData()\n {\n return self::$facebook->api('/me');\n }", "public static function GetUserInfo()\n\t{\n\t\t$userID = self::GetUserID();\n\t\t// TODO: Use cURL for this, requires server config\n\t\treturn json_decode(file_get_contents(\"http://graph.facebook.com/${userID}\"));\n\t}", "public function handleFacebookCallback()\n {\n \n $user = Socialite::driver('facebook')->user();\n\n \n }", "private function facebookGetUser($accessToken)\n {\n $client = new Client();\n $url = 'https://graph.facebook.com/v2.8/me?fields=name,email&access_token=' . $accessToken;\n $res = $client->request('GET', $url);\n $userData = json_decode($res->getBody());\n\n return $userData;\n }", "private function getSocialUserInfo($access_token, $social_app)\n {\n $user = NULL;\n $user_exist = NULL;\n $reference_where = [];\n $email_where = [];\n $user_data_array = [];\n if ($social_app === 'facebook') {\n $client = new HTTPClient('https://graph.facebook.com/me?fields=id,name,email,gender,age_range,picture&access_token=' . $access_token);\n $response = $client->setOptions(['ssl-verify-peer' => null])->send();\n $response = $response->getBody();\n $response = json_decode($response, true);\n if (!empty($response) and is_array($response) and empty($response['error'])) {\n if (!empty($response['id'])) {\n $reference_where['facebook_reference'] = Str::substr($response['id'], 0, 50);\n $user_data_array['facebook_reference'] = Str::substr($response['id'], 0, 50);\n $user = User::where('facebook_reference', '=', $reference_where['facebook_reference'])\n ->first();\n }\n if (!empty($response['email'])) {\n $email_where['email'] = Str::substr($response['email'], 0, 254);\n $user_data_array['email'] = Str::substr($response['email'], 0, 254);\n $user_exist = User::where('email', '=', $user_data_array['email'])\n ->first();\n }\n if (!empty($response['name']))\n $user_data_array['full_name'] = Str::substr($response['name'], 0, 254);\n if (!empty($response['gender']))\n $user_data_array['gender'] = Str::substr($response['gender'], 0, 6);\n if (!empty($response['age_range'])) {\n $age = null;\n if (!empty($response['age_range']['min']) and !empty($response['age_range']['max'])) {\n $age = ceil(((int)$response['age_range']['min'] + (int)$response['age_range']['max']) / 2);\n } else if (!empty($response['age_range']['min'])) {\n $age = (int)$response['age_range']['min'];\n } else if (!empty($response['age_range']['max'])) {\n $age = (int)$response['age_range']['max'];\n }\n $user_data_array['age'] = $age;\n unset($age);\n }\n }\n } else {\n $client = new HTTPClient('https://www.googleapis.com/oauth2/v3/tokeninfo?fields=sub,gender,ageRange,email,name,picture,given_name,family_name,locale&id_token=' . $access_token);\n $response = $client->setOptions(['ssl-verify-peer' => null])->send();\n $response = $response->getBody();\n $response = json_decode($response, true);\n\n if (!empty($response) and is_array($response) and empty($response['error_description'])) {\n if (!empty($response['sub'])) {\n $reference_where['gplus_reference'] = Str::substr($response['sub'], 0, 50);\n $user_data_array['gplus_reference'] = Str::substr($response['sub'], 0, 50);\n $user = User::where('gplus_reference', '=', $reference_where['gplus_reference'])\n ->first();\n }\n if (!empty($response['email'])) {\n $email_where['email'] = Str::substr($response['email'], 0, 254);\n $user_data_array['email'] = Str::substr($response['email'], 0, 254);\n $user_exist = User::where('email', '=', $user_data_array['email'])\n ->first();\n }\n if (!empty($response['name']))\n $user_data_array['full_name'] = Str::substr($response['name'], 0, 254);\n if (!empty($response['gender']))\n $user_data_array['gender'] = Str::substr($response['gender'], 0, 6);\n if (!empty($response['picture']))\n $user_data_array['picture_path'] = Str::substr($response['picture'], 0, 254);\n if (!empty($response['ageRange'])) {\n $age = null;\n if (!empty($response['ageRange']['min']) and !empty($response['ageRange']['max'])) {\n $age = ceil(((int)$response['ageRange']['min'] + (int)$response['ageRange']['max']) / 2);\n } else if (!empty($response['ageRange']['min'])) {\n $age = (int)$response['ageRange']['min'];\n } else if (!empty($response['ageRange']['max'])) {\n $age = (int)$response['ageRange']['max'];\n }\n $user_data_array['age'] = $age;\n unset($age);\n }\n }\n }\n\n if(!empty($user))\n return [\n 'user' => $user,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => false\n ];\n\n if(!empty($user_exist))\n return [\n 'user' => $user_exist,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => true\n ];\n\n return [\n 'user' => NULL,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => false\n ];\n }", "function getUserFbInfo($token){\n\n\n\t\trequire(realpath(dirname(__FILE__) . \"/../config.php\"));\t\t\n\t\t\t$servername = $config[\"db\"][\"fanbot\"][\"host\"];\n\t\t\t$username = $config[\"db\"][\"fanbot\"][\"username\"];\n\t\t\t$password = $config[\"db\"][\"fanbot\"][\"password\"];\n\t\t\t$dbname = $config[\"db\"][\"fanbot\"][\"dbname\"];\n\n\n\t\t$fb = new Facebook\\Facebook([\n\t\t 'app_id' => $config[\"fbApp\"][\"appId\"],\n\t\t 'app_secret' => $config[\"fbApp\"][\"appSecret\"],\n\t\t 'default_graph_version' => 'v2.6',\n\t\t //'default_access_token' => '{access-token}', // optional\n\t\t]);\n\t\t\n\t\t$fb->setDefaultAccessToken( $token );\n\t\t// Use one of the helper classes to get a Facebook\\Authentication\\AccessToken entity.\n\t\t// $helper = $fb->getRedirectLoginHelper();\n\t\t// $helper = $fb->getJavaScriptHelper();\n\t\t// $helper = $fb->getCanvasHelper();\n\t\t// $helper = $fb->getPageTabHelper();\n\t\t\n\t\ttry {\n\t\t // Get the Facebook\\GraphNodes\\GraphUser object for the current user.\n\t\t // If you provided a 'default_access_token', the '{access-token}' is optional.\n\t\t $response = $fb->get('/me?fields=id,name,last_name,first_name,friends,email,gender,birthday');\n\t\t} catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n\t\t // When Graph returns an error\n\t\t echo 'Graph returned an error: ' . $e->getMessage();\n\t\t exit;\n\t\t} catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n\t\t // When validation fails or other local issues\n\t\t echo 'Facebook SDK returned an error: ' . $e->getMessage();\n\t\t exit;\n\t\t}\n\t\t\n\t\t$me = $response->getGraphUser();\n\n\t\t$_SESSION['fbUser']['id'] = $me->getId();\n\t\t$_SESSION['fbUser']['link'] = $me->getLink();\n\t\t$_SESSION['fbUser']['name'] = $me->getName();\n\t\t$_SESSION['fbUser']['email'] = $me->getEmail();\n\t\t$_SESSION['fbUser']['firstName'] = $me->getFirstName();\n\t\t$_SESSION['fbUser']['lastName'] = $me->getLastName();\n\t\t$_SESSION['fbUser']['gender'] = $me->getGender();\n\t\t$_SESSION['fbUser']['friends'] = $me->getField('friends');\n\n\t}", "function getUserInformation(){\n\t\tinclude ($_SERVER['DOCUMENT_ROOT'] . '_inc/controller/fb/getUserInformation.fb.inc.php');\n return $this->resObject;\n\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 get_user_info()\n {\n try {\n $user_info = self::api(\"me\");\n } catch (Exception $e) {\n // TODO: Handle the error\n // Set the return value to be an empty array\n $user_info = array();\n }\n\n return $this->convert_array_to_object($user_info);\n }", "private function userinfo($access_token){\n //CakeLog::write(LOG_DEBUG, __CLASS__ . '.' . __FUNCTION__ . '(), just entered');\n $userinfo = $this->serverGet($this->strategy['base_url'] . 'me', array('access_token' => $access_token), null, $headers); // 'me' from flask; google uses this naming convention, as do others.\n if (!empty($userinfo)){\n return $this->recursiveGetObjectVars(json_decode($userinfo));\n }\n else{\n $error = array(\n 'code' => 'userinfo_error',\n 'message' => 'Failed when attempting to query for user information',\n 'raw' => array(\n 'response' => $userinfo,\n 'headers' => $headers\n )\n );\n\n $this->errorCallback($error);\n }\n //CakeLog::write(LOG_DEBUG, __CLASS__ . '.' . __FUNCTION__ . '(), done');\n }", "public function handleFacebookCallback()\n {\n $user = Socialite::driver('facebook')->user();\n\n // $user->token;\n }", "function getUser($redirectURL,$fbPermissions = array()){\n\t// echo \"<pre>\";\n\t// print_r($redirectURL);die;\n\t\t$helper = parent::getRedirectLoginHelper();\n\n\t\t\t\n\t\t// Try to get access token\n\t\ttry {\n\t\t if(isset($_SESSION['facebook_access_token'])){\n\t\t $accessToken = $_SESSION['facebook_access_token'];\n\t\t }else{\n\t\t $accessToken = $helper->getAccessToken($redirectURL);\n\n\t\t }\n\t\t} catch(FacebookResponseException $e) {\n\t\t echo 'Graph returned an error: ' . $e->getMessage();\n\t\t exit;\n\t\t} catch(FacebookSDKException $e) {\n\t\t\t\n\t\t echo 'Facebook SDK returned an error: ' . $e->getMessage();\n\t\t exit;\n\t\t}\n\t\tif(!empty($accessToken)){\n\t\t try {\n\t\t $profileRequest = parent::get('/me?fields=name,first_name,last_name,email,link,gender,locale,picture,friends',$accessToken);\n\t\t $fbUserProfile = $profileRequest->getGraphNode()->asArray();\n\t\t } catch(FacebookResponseException $e) {\n\t\t echo 'Graph returned an error: ' . $e->getMessage();\n\t\t session_destroy();\n\n\t\t header(\"Location: ./\");\n\t\t exit;\n\t\t } catch(FacebookSDKException $e) {\n\t\t \n\t\t echo 'Facebook SDK returned an error: ' . $e->getMessage();\n\t\t exit;\n\t\t }\n\t\t \treturn $fbUserProfile;\n\t\t }else{\n\t\t $loginURL = $helper->getLoginUrl($redirectURL, $fbPermissions);\n\t\t \t\treturn $loginURL;\n\t\t }\n\t}", "public function __loadUser()\n {\n\t$facebook = $this->fb;\n\t$this->user = $facebook->api(\"/me\", \"GET\");\n\t$this->userid = $facebook->getUser();\n\treturn;\n }", "public function getUserFromAPI() {\n $facebook = $this->facebookService->getFacebook();\n $userId = $facebook->getUser();\n $user_profile = null;\n\n if ($userId) {\n try {\n // Proceed knowing you have a logged in user who's authenticated.\n $user_profile = $facebook->api('/me');\n } catch (FacebookApiException $e) {\n error_log($e);\n $userId = null;\n }\n }\n if (!$userId && !$user_profile) {\n return null;\n }\n\n /* @var $user Tx_WsLogin_Domain_Model_FacebookUser */\n $user = t3lib_div::makeInstance('Tx_WsLogin_Domain_Model_FacebookUser');\n $user->setWsFacebookId($userId);\n $user->setUsername($user_profile['username']);\n $user->setFirstName($user_profile['first_name']);\n $user->setLastName($user_profile['last_name']);\n $user->setName($user_profile['first_name'] . ' ' . $user_profile['last_name']);\n\n return $user;\n }", "public function getUserProfile();", "public function getUserFacebook($facebookId)\n {\n $stmt = $this->con->prepare(\"SELECT id_usuario,nome,userlogin,email,instituicao,api_key FROM tbl_usuario WHERE facebookId=?\");\n $stmt->bind_param(\"s\", $facebookId);\n $stmt->execute();\n\n $stmt->bind_result($id, $name, $username, $email, $school, $apikey);\n $stmt->fetch();\n $user = array();\n $user['id'] = $id;\n $user['username'] = $username;\n $user['name'] = $name;\n $user['email'] = $email;\n $user['school'] = $school;\n $user['apikey'] = $apikey;\n\n //returning the user\n return $user;\n }", "function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}", "protected function getUserProfile() {\n $profile = (new FacebookRequest(\n $this->fbSession, 'GET', '/me'\n ))->execute()->getGraphObject(GraphUser::className());\n //return\n return $profile;\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}", "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 userProfile() {\n\t\t\t$request = $this->api(\"GET\", \"/me\");\n\t\t\t\n\t\t\t$request->execute();\n\t\t\t$response = $request->responseObject();\n\t\t\t$response->id = $response->ID;\n\t\t\treturn $response;\n\t\t}", "function login_with_fb($accessToken, $user_id, $profile_name, $user_email, $user_name){\n\t$fbData['user_profile']['accessToken'] = (string) $accessToken;\n\t$fbData['user_profile']['id'] = $user_id;\n\t$fbData['user_profile']['name'] = $profile_name;\n\t$fbData['user_profile']['email'] = $user_email;\n\t$fbData['user_profile']['username'] = $user_name;\n\t$fbData['user_profile']['education'] = file_get_contents(\"https://graph.facebook.com/$user_id?fields=education&access_token=$accessToken\");\n\t\n\t\t$options = array(\n\t\t\t'type' => 'user',\n\t\t\t'plugin_user_setting_name_value_pairs' => array(\n\t\t\t\t'uid' => $fbData['user_profile']['id'],\n\t\t\t\t'access_token' => $fbData['user_profile']['accessToken'],\n\t\t\t),\n\t\t\t'plugin_user_setting_name_value_pairs_operator' => 'OR',\n\t\t\t'limit' => 0\n\t\t);\n\t\t$users = elgg_get_entities_from_plugin_user_settings($options);\n\t\t\n\tif ($users) {\n\t\t// 1 User Found and it will return a successful return status\n\t\t\tif (count($users) == 1) {\n\t\t\t\t\t$return['success'] = true;\n\t\t\t\t\t$return['message'] = elgg_echo(\"Welcome! Facebook user logged in successfully\");\n\t\t\t\t\t$return['user_guid'] = $users[0]->guid;\n\t\t\t\t\t$return['user_name'] = $users[0]->name;\n\t\t\t\t\t$return['user_username'] = $users[0]->username;\n\t\t\t\t\t$return['user_email'] = $users[0]->email;\n\t\t\t\t\t$return['auth_token'] = create_user_token($users[0]->username);\n\t\t\t\t\t$return['api_key'] = get_api_key();\n\t\t\t\t\telgg_set_plugin_user_setting('uid', $fbData['user_profile']['id'], $users[0]->guid);\n\t\t\t\t\telgg_set_plugin_user_setting('access_token', $fbData['user_profile']['accessToken'], $users[0]->guid);\n\t\t\t\t\telgg_set_plugin_user_setting('education', $fbData['user_profile']['education'], $users[0]->guid);\n\t\t\t\t\tif(empty($users[0]->email)) {\n\t\t\t\t\t\t$user = get_entity($users[0]->guid);\n\t\t\t\t\t\t$user->email = $fbData['user_profile']['email'];\n\t\t\t\t\t\t$user->save();\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t// More than 1 User Found and it will return an unsuccessful return status\n\t\t\t\t$return['success'] = false;\n\t\t\t\t$return['message'] = elgg_echo(\"Oops! Facebook user not logged in successfully\");\n\t\t\t}\n\t\t} else {\n\t\t// No user was found and it will create a new user based in fbData\n\t\t$user = facebook_connect_create_update_user($fbData);\n\t\t\t\n\t\tif($user){\n\t\t\t// If the registration was successfully\n\t\t\t$return['success'] = true;\n\t\t\t$return['message'] = elgg_echo(\"Welcome! Facebook user registered successfully!\");\n\t\t\t$return['user_guid'] = $user->guid;\n\t\t\t$return['user_name'] = $user->name;\n\t\t\t$return['user_username'] = $user->username;\n\t\t\t$return['user_email'] = $user->email;\n\t\t\t$return['auth_token'] = create_user_token($user->username);\n\t\t\t$return['api_key'] = get_api_key();\n\t\t\telgg_set_plugin_user_setting('uid', $fbData['user_profile']['id'], $user->guid);\n\t\t\telgg_set_plugin_user_setting('access_token', $fbData['user_profile']['accessToken'], $user->guid);\n\t\t\telgg_set_plugin_user_setting('education', $fbData['user_profile']['education'],$user->guid);\n\t\t} else {\n\t\t\t// If the registration was not successful\n\t\t\t$return['success'] = false;\n\t\t\t$return['message'] = elgg_echo(\"Oops! Facebook user not registered successfully\");\n\t\t}\n\t}\n\treturn $return;\n}", "public function facebook() {\n\n\t \n\t\t$fb = new Facebook\\Facebook([\n\t\t 'app_id' => '144053429274589',\n\t\t 'app_secret' => '4ef6916e238aff3b6726dac08b853135',\n\t\t 'default_graph_version' => 'v2.4',\n\t\t 'default_access_token' => 'CAACDBA17B90BAKI0aOXR1vF5zDtZCOKPbWSXopnvvNpBTHZARXVhUVrZBAXn4CB1ZBgsyk13ZA38uZAWoffwchukfajiIOG7cYrNEEAm0CdlHgwDRWeBuD0OZCfT6PB6U2vsE3O45jTgx0YTc24TXEqyZC1ZBIjc9GxD3aSv6WAyIWsZCpAcbnxYPNCdL389FxaRsZD', // optional\n\t\t]);\t \n\t\t\t \n\ttry {\n\t $response = $fb->get('/me?fields=id,name,email');\n\t} catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n\t echo 'Graph returned an error: ' . $e->getMessage();\n\t exit;\n\t} catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n\t echo 'Facebook SDK returned an error: ' . $e->getMessage();\n\t exit;\n\t}\n\n\t\n\t$me = $response->getGraphUser();\n\t$name = $me['name'];\n\t$email = $me['email'];\n\t$u_name = preg_replace('/@.*$/', '', $me['email']);\n\t$user = new User();\n\t$user->name \t\t\t\t= $name ;\n\t$user->type \t\t\t\t= 'general';\n\t$user->register_type \t\t= 'facebook';\n\t$user->username \t\t\t= $u_name;\t\t\t\n\t$user->email \t\t\t\t= $email;\n\t$user->password \t\t\t= bcrypt($u_name);\n\t$user->save();\n\t\n\t$lastInsertedId= $user->id; \n\t\n\t$profile = new Profile();\n\t$profile = $user->profile()->save($profile);\t\t\t\n\t$credentials = array(\n\t\t'email' => $email,\n\t\t'password' => $u_name\n\t);\n\n\tif (Auth::attempt($credentials)) {\n\t\t\t//return Redirect::to('home');\n\t\t\treturn redirect()->intended('home');\n\t}\n\n\t\n\n\t//echo '<pre>'; print_r($new_name);\n\t//echo 'Logged in as ' . $me['email'];\t \n\t \n\t \n\t }", "public function fb_signin()\r\n\t{\r\n\t\t// get the facebook user id and then get the user data via curl\r\n\t\t$fb_user_id = $this->input->post('user_id');\r\n\t\t$this->curl->ssl(false);\r\n\t\t$fb_user = json_decode($this->curl->simple_get('https://graph.facebook.com/' . $fb_user_id));\r\n\t\t\r\n\t\t// check if the user is in the DB already\r\n\t\tif( !($user = $this->member_model->get_user_by_sm(array('facebook_id' => $fb_user->id), 'facebook_id'))) \r\n\t\t{\r\n\t\t\t// create the user\r\n\t\t\t$password = generate_password(9, 8);\r\n\t\t\t$this->tank_auth->create_user($fb_user->username . $fb_user->id, $fb_user->username . $fb_user->id, $password, false);\r\n\t\t\t$user = $this->generic_model->get_where_single_row('users', array('username' => $fb_user->username . $fb_user->id));\r\n\t\t\t$this->generic_model->update('user_profiles', \r\n\t\t\t\t\t\t\t\t\t \t array('facebook_id' => $fb_user->id, \r\n\t\t\t\t\t\t\t\t\t \t \t 'display_name' => $fb_user->username,\r\n\t\t\t\t\t\t\t\t\t \t 'profile_image' => 'http://graph.facebook.com/' . $fb_user->id . '/picture'), \r\n\t\t\t\t\t\t\t\t\t \t array('user_id' => $user->id));\r\n\t\t\t// let's also configure a newsletter profile for this user\r\n\t\t\t$this->generic_model->insert('newsletter', array('user_id' => $user->id, 'frequency' => 'never'));\t\t\t\t\t\t\t\t\t \t \r\n\t\t}\r\n\t\t$user = $this->member_model->get_user_by_sm(array('facebook_id' => $fb_user->id), 'facebook_id');\r\n\t\techo $user->id;\r\n\t}", "public function handleProviderCallback()\n{\n $user = Socialite::driver('facebook')->user();\n\n dd( $user);\n\n // $user->token;\n // code for facebook sign up and login\n}", "function GetUserProfileInfo($access_token) {\t\n\t\t$url = 'https://www.googleapis.com/plus/v1/people/me';\t\t\t\n\t\t\n\t\t$ch = curl_init();\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\t\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '. $access_token));\n\t\t$data = json_decode(curl_exec($ch), true);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\t\t\n\t\tif($http_code != 200) \n\t\t\tthrow new Exception('Error : Failed to get user information');\n\t\t\t\n\t\treturn $data;\n\t}", "public function getUserInfo(\\Core\\Auth\\OAuth2\\Token\\Access $token)\n\t{\n\t\t// define the get user information token\n\t\t$url = 'https://apis.live.net/v5.0/me?' . http_build_query(array(\n\t\t\t'access_token' => $token->accessToken,\n\t\t), null, '&');\n\n\t\t// perform network request\n\t\t$user = json_decode(file_get_contents($url));\n\n\t\t// create a response from the request and return it\n\t\treturn array(\n\t\t\t'uid' \t\t\t=> $user->id,\n\t\t\t'name' \t\t\t=> $user->name,\n\t\t\t'emial'\t\t\t=> isset($user->emails->preferred) ? $user->emails->preferred : null,\n\t\t\t'nickname' \t\t=> \\Core\\Inflector::friendlyTitle($user->name, '-', true),\n\t\t\t// 'location' \t=> $user->location,\n\t\t\t// \trequires scope wl.postal_addresses and docs here: http://msdn.microsoft.com/en-us/library/hh243648.aspx#user\n\t\t\t'locale' \t\t=> $user->locale,\n\t\t\t'urls' \t\t\t=> array(\n\t\t\t\t'Windows Live' => $user->link\n\t\t\t),\n\t\t);\n\t}", "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 getUser() {\n\t\t$urlUser = \"{$this->apiHost}/me.json\";\n\t\treturn $this->runCurl ( $urlUser );\n\t}", "public function getUserData()\r\n \t{\r\n \t\tif ($this->_client->getUser())\r\n \t\t{\r\n \t\t\treturn $this->_client->api('/me');\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public function get_user_info($access_token, $access_token_secret = '')\n {\n global $config;\n\n $url = $config['oauth'][static::NETWORK]['verify_url'] . $access_token;\n\n $curl = new Curl();\n $result = $curl->get_request($url);\n $response = $result->get_result();\n\n if($response === FALSE)\n {\n return FALSE;\n }\n else\n {\n ///TODO: find a better way to do that\n $user_info = json_decode($response, TRUE);\n if(!$user_info)\n {\n return FALSE;\n }\n }\n\n return $this->parse_facebook_profile($user_info);\n }", "public function getUserInfo() {\n\t\t$userInfo = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => USERINFO,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'user_id' => $this->photo['owner'],\n\t\t\t));\n\t\treturn unserialize($userInfo->body);\n\t}", "abstract function retrieveSfGuardUserByFacebookUid($facebook_uid);", "public function get_user_info($access_token, $access_token_secret = '');", "public static function user() {\n // $userInfo = $oauth2->userinfo->get();\n $userInfo = json_decode(json_encode(['email' => '@', 'gender' => null, 'name' => 'test', 'picture' => 'f']));\n return User::fromGoogleUser($userInfo);\n \n }", "private function parse_facebook_profile($user_info)\n {\n $user_profile = new SocialProfile();\n\n foreach($user_info as $key => $field)\n {\n switch ($key)\n {\n case 'id':\n $user_profile->id = $field;\n break;\n case 'first_name':\n $user_profile->given_name = $field;\n break;\n case 'last_name':\n $user_profile->last_name = $field;\n break;\n case 'gender':\n $user_profile->gender = $field;\n break;\n case 'email':\n $user_profile->email = $field;\n break;\n default:\n break;\n }\n }\n\n return $user_profile;\n }", "public function authenticate($access_token_val='')\r\n { \r\n /**********make the access token Extended by extend_access_token() and get extended token********/\r\n $extended_access_token_val = $this->extend_access_token($access_token_val);\r\n if($extended_access_token_val==''){\r\n $access_token_val = $extended_access_token_val;\r\n } \r\n\r\n \r\n /***running FQL to fetch data from facebook ****/\r\n // $fql = urlencode(\"SELECT post_id,viewer_id,source_id,updated_time,created_time,actor_id,message,attachment,permalink ,type FROM stream WHERE source_id = me() AND actor_id = me() order by created_time desc LIMIT 5\");\r\n $fql = urlencode(\"SELECT uid,about_me, birthday, current_location, first_name, has_added_app, hometown_location, last_name, locale, birthday_date, pic, pic_with_logo, pic_big, pic_big_with_logo, pic_small, pic_small_with_logo, pic_square, pic_square_with_logo, profile_url, proxied_email, email, contact_email, sex, meeting_sex, status, timezone, website, education_history, work_history, work, education, hs_info, religion, relationship_status, political, activities, interests, family, music, tv, movies, books, username, quotes, sports, favorite_teams, favorite_athletes, inspirational_people, languages FROM user WHERE uid = me()\");\r\n $content = $this->process_fql($fql,$access_token_val);\r\n \r\n //pr($content['data'][0],1);\r\n \r\n $user_meta = $this->session->userdata('current_user_session'); // get current user data loggedin\r\n\t\t\r\n\t\t/*pr($content['data'][0]);\r\n\t\tpr($content,1);\r\n\t\texit;*/\r\n \r\n if(isset($content->error))\r\n echo 'A user of access token '.$access_token_val. ' got following error while fetching user details'.$temp_ret_graph;\r\n else\r\n { \r\n\t\t\t\tif(empty($user_meta)) { \r\n\t\t\t\t\t\r\n\t\t\t\t if($this->login_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\tredirect(base_url().'user/profile'); \r\n\t\t\t\t\t\t\r\n\t\t\t\t } else {\r\n\t\t\t\t\t\tif($this->register_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\t\tif($this->login_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\t\t\t\tredirect(base_url().'user/profile');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\techo 'login failed!';\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//echo 'registration failed!';\r\n\t\t\t\t\t set_error_msg(message_line('fb_reg_fail')); // either user email is not verified in fb \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// or kept private, so goto signup page\r\n\t\t\t\t\t redirect(base_url('user/signup'));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} \r\n\t\t\t\telse {\r\n\t\t\t\t\tif($user_meta[0]['s_email'] == $content['data'][0]['email'] ){\r\n\t\t\t\t\t\t$content['data'][0]['access_token'] = $access_token_val;\r\n\t\t\t\t\t\t$this->user_model->update_data(array(\"s_facebook_credential\"=>serialize($content['data'][0])),\r\n\t\t\t\t\t\t\t\tarray(\"i_id\"=> $user_meta[0]['i_id'])\r\n\t\t\t\t\t ); \r\n\t\t\t\t\t\tset_success_msg('facebook account add success');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tset_error_msg('facebook account email not match');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tredirect(base_url().\"user/profile\");\r\n\t\t\t\t}\r\n } \r\n\r\n\t\t}", "public function getUserGraph($graph_type) \n\t{\t\n\t\t$result = $this->_facebook->api('/me/'.$graph_type);\n\t\tvar_dump($result);\n\n\t}", "protected function getUserFromAccessToken()\n {\n try {\n return $this->api('GET', '/v1/people/~:(id,firstName,lastName,headline)');\n } catch (LinkedInApiException $e) {\n return;\n }\n }", "private function weibo_get_user( $access_token, $social_id ) {\n\t\t$url = 'https://api.weibo.com/2/users/show.json?access_token=' . $access_token . '&uid=' . $social_id;\n\n\t\t// Initiate curl\n\t\t$ch = curl_init();\n\t\t// Will return the response, if false it print the response\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t// Set the url\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t// Execute\n\t\t$result=curl_exec($ch);\n\t\t// Closing\n\t\tcurl_close($ch);\n\n\t\treturn json_decode($result, true);\n\t}", "public function getUser(){\r\n $urlUser = \"{$this->apiHost}/api/v1/me\";\r\n // return $urlUser;\r\n return self::runCurl($urlUser);\r\n }", "public function action_fb() {\n\t\n\t$fb = Facebook::instance();\n\n\n\tif ($fb->check_login() == false) {\n\t //user has not yet authenticated via facebook\n\t $fbl_params = array(\"scope\" => \"email\");\n\t $loginurl = $fb->getLoginUrl($fbl_params);\n\t Response::redirect($loginurl) and die();\n\t} else {\n\t //facebook authentication successful.\n\t $user_profile = $fb->api('/me');\n\t //and we know the user's email\n\t $fb_mail = $user_profile[\"email\"];\n\n\t //and the user's facebook ID\n\t $fb_id = $user_profile[\"id\"];\n\n\t $auth = Auth::instance();\n\n\t //simpleauth does not have a method for \n\t //checking if username is taken\n\t //hence we do a direct DB select.\n\t $fb_sql_user = DB::select(\"id\")\n\t\t ->from(\"users\")\n\t\t ->where(\"username\", \"=\", \"FB@\" . $fb_mail)\n\t\t ->execute()\n\t\t ->as_array();\n\n\t if (count($fb_sql_user) == 0) {\n\t\t//we don't have the user in the local DB yet\n\t\t//let us create a local user\n\t\t//coining a specific username,\n\t\t//assigning a random password\t\t\n\t\t$user_id = $auth->create_user(\"FB@\" . $fb_mail, hash(\"sha256\", mt_rand(0, mt_getrandmax())), $fb_mail, 1, array(\n\t\t \"facebook_id\" => $fb_id,\n\t\t \"verified\" => true)\n\t\t);\n\t } else {\n\t\t//we have the user. Let's log the user in\n\t\t$user_id = $fb_sql_user[0][\"id\"];\n\t }\n\n\t $auth->force_login($user_id);\n\t Response::redirect(\"/\");\n\t}\n }", "public function userInfo()\n {\n $this->startBrokerSession();\n $user = null;\n\n $userId = $this->getSessionData('sso_user');\n\n if ($userId) {\n $user = $this->getUserInfo($userId);\n if (!$user) return $this->fail(\"User not found\", 500); // Shouldn't happen\n }\n\n header('Content-type: application/json; charset=UTF-8');\n echo json_encode($user);\n }", "function handle_fb_login() {\n\t\t$this->load->library('facebook');\n\n\t\tif(!$this->facebook->is_authenticated()){\n\t\t\tredirect('user/login');\n\t\t}\n\n\t\t$oFbUserData = (object) $this->facebook->request('get', '/me?fields=id,email,first_name,middle_name,last_name,gender,birthday,age_range');\n\n\t\tif(!isset($oFbUserData->email) || (isset($oFbUserData->email) && '' != $oFbUserData->email)){\n\t\t\tsf('error_message', \"You hav'nt allowed email permission on facebook.\");\n\t\t}\n\n\n//\t\t$user_profile = $this->facebook->api('/me');\n\n\t\t//p('AFTER');\n\n\t\t//$oFbUserData = (object)$user_profile;\n\n\t\tif($oSystemUserData = $this->user_model->getUserBy('facebook_id', $oFbUserData->id)){\n\n\t\t\tif($oSystemUserData->status == $this->aUserStatus['closed']){\n\n\t\t\t\t//reactivate the account\n\t\t\t\t$this->account_model->activateAccount($oSystemUserData->id);\n\t\t\t\tsf('success_message', 'Good To have you back!!');\n\n\t\t\t} elseif($oSystemUserData->status == $this->aUserStatus['blocked']){\n\n\t\t\t\t\tsf('error_message', \"Your account is blocked. \\nPlease use the Contact Us page to contact the Administrator\");\n\t\t\t\t\tredirect('home');\n\n\t\t\t}\n\n\t\t\t//proceed with login\n\t\t\tif($this->authentication->makeLogin($oSystemUserData->facebook_id, 'facebook_id')){\n\t\t\t\tredirect('home');\n\t\t\t} else {\n\t\t\t\tsf('error_message', 'There was some problem. Could not log you in.');\n\t\t\t\tredirect('home');\n\t\t\t}\n\n\t\t} else {\n\t\t\t\t//consider this as a first time login\n\t\t\t\t//proceed with registration, mail sending, and login\n\t\t\t\tif(!$oSystemUserData = $this->user_model->getUserBy('email_id', $oFbUserData->email)) {\n\n\t\t\t\t\t$this->load->helper('custom_upload');\n\t\t\t \t$sUrl = getFbImage((object)array('facebook_id' => $oFbUserData->id), array('type'=>'large'), false);\n\t\t\t \t$aImageData = urlUpload('image', 'profile_pic', $sUrl);\n\n\t\t\t\t\t//registration\n\t\t\t\t\t$aUserData['facebook_id'] \t= $oFbUserData->id;\n\t\t\t\t\t$aUserData['email_id'] \t\t= $oFbUserData->email;\n\t\t\t\t\t$aUserData['account_no'] \t= $this->authentication->generateAccountNumber();\n\t\t\t\t\t$aUserData['type'] \t\t\t= $this->aUserTypes['user'];\n\t\t\t\t\t$aUserData['status'] \t\t= $this->aUserStatus['active'];\n\t\t\t\t\t$aUserData['joined_on'] \t= date('Y-m-d');\n\t\t\t\t\t$aUserData['first_name'] \t= isset($oFbUserData->first_name) ? $oFbUserData->first_name : '';\n\t\t\t\t\t$aUserData['middle_name'] \t= isset($oFbUserData->middle_name) ? $oFbUserData->middle_name : '';\n\t\t\t\t\t$aUserData['last_name'] \t= isset($oFbUserData->last_name) ? $oFbUserData->last_name : '';\n\t\t\t\t\t$aUserData['gender'] \t\t= $this->aGenders[$oFbUserData->gender];\n\t\t\t\t\t$aUserData['profile_image'] = $aImageData['file_name'];\n\n\t\t\t\t\tif(isset($oFbUserData->birthday) && '' != $oFbUserData->birthday){\n\t\t\t\t\t\t$aBirthday \t= explode('/', $oFbUserData->birthday); // mm/dd/yyyy\n\t\t\t\t\t\t$aUserData['birthday'] \t\t= $aBirthday[2].'-'.$aBirthday[0].'-'.$aBirthday[1];\n\t\t\t\t\t}\n\t\t\t\t\t$this->db->set ($aUserData);\n\t\t\t \t$this->db->insert ('users');\n\n\t\t\t \t$iUserId = $this->db->insert_id();\n\n\n\t\t\t \t//Login\n\t\t\t \t$this->authentication->makeLogin($oFbUserData->id, 'facebook_id');\n\n\t\t\t \t$this->account_model->activateAccount($iUserId);\n\n//\t\t\t \tupdate the profile pictures page\n//\t\t\t \t$aUploadType = c('profile_pic_upload_type');\n//\t\t\t \t$aProfilePicData = array(\n//\t\t\t \t\t'user_id' => $iUserId,\n//\t\t\t \t\t'current_pic' => $aUploadType['facebook'],\n//\t\t\t \t\t'facebook' => $aImageData['file_name'],\n//\t\t\t \t);\n\n\n\t\t\t\t\t/*$this->load->model('maintenance_model');\n\t\t\t\t\t$this->maintenance_model->getSingleSetting('db_welcome_msg');\n\t\t\t \t$aWelcomeEmail['receiver_name'] = $aUserData['first_name'];\n\t\t\t \t$aWelcomeEmail['welcome_text'] \t= $this->maintenance_model->getSingleSetting('db_signup_welcome_msg');\n\t\t\t\t\t*/\n\t\t\t\t\t$aSettings = array(\n\t\t\t\t\t\t'to' \t\t\t\t=> array($oFbUserData->email=>$aUserData['first_name']), // email_id => name pairs\n\t\t\t\t\t\t'from_email' \t\t=> c('accounts_email_id'),\n\t\t\t\t\t\t'from_name'\t\t\t=> c('accounts_email_from'),\n\t\t\t\t\t\t'reply_to' \t\t\t=> array(c('accounts_email_id') => c('accounts_email_from')), // email_id => name pairs\n\t\t\t\t\t\t'email_contents' \t=> $aWelcomeEmail, // placeholder keywords to be replaced with this data\n\t\t\t\t\t\t'template_name' \t=> 'welcome', //name of template to be used\n\t\t\t\t\t\t//'preview'\t\t\t=> true\n\t\t\t\t\t);\n\n\t\t\t\t\t//p(sendMail_PHPMailer($aSettings));exit;\n\t\t\t\t\t$this->load->helper('custom_mail');\n\t\t\t\t\tsendMail_PHPMailer($aSettings);\n\n\t\t\t\t\t$this->session->set_flashdata ('success_message', 'Welcome to '.$this->mcontents['c_website_title']);\n\n\t\t\t \tredirect('home');\n\n\t\t\t\t} else {\n\t\t\t\t\techo '3';exit;\n\t\t\t\t\tsf('error_message', 'We already have an account associated with the email id '.$oFbUserData->email);\n\t\t\t\t\tredirect('home');\n\t\t\t\t}\n\t\t\t\t//$aFBUserData['facebook_id'] =\n\t\t}\n\n\t}", "public function handleProviderCallback()\n {\n $user = Socialite::driver('facebook')->user();\n dd($user);\n\n // $user->token;\n }", "protected function readUserProfile()\n {\n if (isset($_GET['code'])) {\n $params = array(\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'redirect_uri' => $this->redirectUri,\n 'grant_type' => 'authorization_code',\n 'code' => $_GET['code']\n );\n\n $tokenInfo = $this->post('https://accounts.google.com/o/oauth2/token', $params);\n\n if (isset($tokenInfo['access_token']) && isset($tokenInfo['id_token']))\n {\n $params = array('id_token' => $tokenInfo['id_token']);\n $validateToken = $this->get('https://www.googleapis.com/oauth2/v1/tokeninfo', $params);\n\n if (!isset($validateToken['email'])) {\n return false;\n }\n\n $params = array('access_token' => $tokenInfo['access_token']);\n $userInfo = $this->get('https://www.googleapis.com/plus/v1/people/me', $params);\n\n if (isset($userInfo['kind']) && $userInfo['kind'] == 'plus#person')\n {\n $this->parseUserData($userInfo);\n\n $this->userInfo['email'] = $validateToken['email'];\n\n if (isset($this->response['birthday']))\n {\n $birthDate = explode('-', $this->response['birthday']);\n $this->userInfo['birthDay'] = isset($birthDate[2]) ? $birthDate[2] : null;\n $this->userInfo['birthMonth'] = isset($birthDate[1]) ? $birthDate[1] : null;\n $this->userInfo['birthYear'] = isset($birthDate[0]) ? $birthDate[0] : null;\n }\n\n return true;\n }\n }\n }\n\n return false;\n }", "public function getInfo()\n {\n return self::_mapFacebookInfo($this->getInfo_Raw());\n }", "public function getUserProfile()\n {\n $this->sandbox = ($this->config[\"paypal_sandbox\"] == 'Y');\n\n // refresh tokens if needed\n $this->refreshToken();\n\n // store for seamless checkout\n Tygh::$app['session']['paypal_token'] = $this->token( \"access_token\" );\n\n // ask google api for user infos\n $response = $this->api->api( \"https://api\".($this->sandbox?'.sandbox' : '').\".paypal.com/v1/identity/openidconnect/userinfo/?schema=openid\" );\n\n if ( ! isset( $response->user_id ) || isset( $response->message ) ) {\n throw new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n }\n\n $this->user->profile->identifier = (property_exists($response,'user_id'))? md5($response->user_id):\"\";\n $this->user->profile->firstName = (property_exists($response,'given_name'))?$response->given_name:\"\";\n $this->user->profile->lastName = (property_exists($response,'family_name'))?$response->family_name:\"\";\n $this->user->profile->displayName = (property_exists($response,'name'))?$response->name:\"\";\n $this->user->profile->photoURL = (property_exists($response,'picture'))?$response->picture:\"\";\n $this->user->profile->gender = (property_exists($response,'gender'))?$response->gender:\"\";\n $this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n $this->user->profile->emailVerified = (property_exists($response,'email_verified'))?$response->email_verified:\"\";\n $this->user->profile->language = (property_exists($response,'locale'))?$response->locale:\"\";\n $this->user->profile->phone = (property_exists($response,'phone_number'))?$response->phone_number:\"\";\n if (property_exists($response,'address')) {\n $address = $response->address;\n $this->user->profile->address = (property_exists($address,'street_address'))?$address->street_address:\"\";\n $this->user->profile->city = (property_exists($address,'locality'))?$address->locality:\"\";\n $this->user->profile->zip = (property_exists($address,'postal_code'))?$address->postal_code:\"\";\n $this->user->profile->country = (property_exists($address,'country'))?$address->country:\"\";\n $this->user->profile->region = (property_exists($address,'region'))?$address->region:\"\";\n }\n\n if ( property_exists($response,'birthdate') ) {\n if (strpos($response->birthdate, '-') === false) {\n if ($response->birthdate !== '0000') {\n $this->user->profile->birthYear = (int) $response->birthdate;\n }\n } else {\n list($birthday_year, $birthday_month, $birthday_day) = explode( '-', $response->birthdate );\n\n $this->user->profile->birthDay = (int) $birthday_day;\n $this->user->profile->birthMonth = (int) $birthday_month;\n if ($birthday_year !== '0000') {\n $this->user->profile->birthYear = (int) $birthday_year;\n }\n }\n }\n\n return $this->user->profile;\n }", "abstract public function getUserInfo();", "public function getUserInfo($access_token);", "public function getProfile()\n {\n return $this->request('me');\n }", "public function getUserInfo() {}", "function getuser($aa_inst_id)\n {\n $session_key=generateSessionKey($aa_inst_id);\n $session=new Zend_Session_Namespace($session_key);\n\n if(!isset($session->facebook) || !isset($session->facebook['user']) )\n $user=false;\n else\n $user=$session->facebook['user'];\n\n return $user;\n }", "public function user_info() {\n if ($this->rails_cookie_value() == NULL) {\n return null;\n }\n if (!self::$user_info && !self::$user_info_called) {\n $json_data = $this->api_request(\"user/\" . $this->rails_cookie_value());\n self::$user_info = $json_data->{'user'};\n self::$user_info_called = true;\n }\n return self::$user_info;\n }", "public function createUserFromFacebook($fbUserInfo = array())\n\t{\n\t\tYii::import('greennet.helpers.Sluggable');\n\n\t\t$password = uniqid();\n\t\tif(!isset($fbUserInfo['birthday'])){\n\t\t\t$bithday = time();\n\t\t} elseif (preg_match('/\\/\\d{4}$/', $fbUserInfo['birthday'])) {\n\t\t\t$pieces = array_reverse(explode('/', $fbUserInfo['birthday']));\n\t\t\t$bithday = strtotime(implode('-', $pieces));\n\t\t} else {\n\t\t\t$bithday = strtotime(str_replace('/', '-', $fbUserInfo['birthday']));\n\t\t}\n\t\t$gender = null;\n\t\tswitch (@$fbUserInfo['gender']) {\n\t\t\tcase 'male':\n\t\t\t\t$gender = 0;\n\t\t\t\tbreak;\n\t\t\tcase 'female':\n\t\t\t\t$gender = 1;\n\t\t\t\tbreak;\n\t\t}\n\t\t$attributes = array(\n\t\t\t'firstname' => Sluggable::convertToLatin($fbUserInfo['first_name']),\n\t\t\t'lastname' => Sluggable::convertToLatin($fbUserInfo['last_name']),\n\t\t\t'email' => $fbUserInfo['email'],\n\t\t\t'password' => $password,\n\t\t\t'confirmPassword' => $password,\n\t\t\t'daybirth' => date('d', $bithday),\n\t\t\t'monthbirth' => date('m', $bithday),\n\t\t\t'yearbirth' => date('Y', $bithday),\n\t\t);\n\t\t$user = $this->createUser($attributes);\n\t\t$profile = array(\n\t\t\t'gender' => $gender,\n\t\t\t'birth' => date('d-m-Y', $bithday),\n\t\t\t'location' => @$result['location']['name']\n\t\t);\n\t\t$image = $this->_migrateFacebookAvatar($user->hexID, $fbUserInfo['id']);\n\t\tif (!empty($image)) {\n\t\t\t$profile['image'] = $image;\n\t\t}\n\n\t\t// Create user profile\n\t\t$modelProfile = new GNUserProfile;\n\t\t$modelProfile->createProfile($user->id, $profile);\n\n\t\t// Assign Permissions\n\t\tRights::assign(Yii::app()->params['roles']['MEMBER'], $user->id);\n\n\t\t// Saved network linked\n\t\t$network = GNNetwork::model()->find('alias=:alias', array(\n\t\t\t':alias' => 'facebook'\n\t\t));\n\t\t$linkedAccount = GNLinkedAccount::model()->find('user_id=:user_id and network_id=:network_id', array(\n\t\t\t':user_id' => $user->id,\n\t\t\t':network_id' => $network->id\n\t\t));\n\t\tif (empty($linkedAccount)) {\n\t\t\t$linkedAccount = new GNLinkedAccount();\n\t\t\t$linkedAccount->user_id = $user->id;\n\t\t\t$linkedAccount->network_id = $network->id;\n\t\t}\n\t\t$linkedAccount->network_account_id = $fbUserInfo['id'];\n\t\t$linkedAccount->network_account_data = serialize($fbUserInfo);\n\t\t$linkedAccount->save();\n\n\t\treturn $user;\n\t}", "private function usersGetInfo($facebook_uid, $fields) {\r\n\t\treturn $this->callGraph(array(\r\n\t\t\t'method' => 'users.getInfo',\r\n\t\t\t'uids' => $facebook_uid,\r\n\t\t\t'fields' => $fields\r\n\t\t), 'users_get_info');\r\n\t}", "public static function get_user_info( $always_make_remote_call = false )\n {\n $facebook = self::get_instance();\n \n self::$user_info = $facebook->getSession( true );\n \n // Return data in the $user_info property if remote call isn't required\n if( self::$user_info && !$always_make_remote_call )\n {\n return self::$user_info;\n }\n \n self::$usr_session = $facebook->getSession( false );\n\n // Session based API call\n if( self::$usr_session )\n {\n // Try making remote call for user info\n try \n {\n self::$user_info = $facebook->api('/me');\n } catch (FacebookApiException $e) { /* Do something here if you like */ }\n }\n \n if( !self::$user_info || !self::$usr_session )\n {\n return false;\n }\n else\n {\n return self::$user_info;\n }\n }", "public function getUserInfo() {\n $endpoint = '/users';\n $client = $this->_constructClient($endpoint . '/self');\n try {\n $response = $client->request();\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n return;\n }\n\n // error in response\n if ($response->isError()) return;\n\n $result = Zend_Json::decode($response->getBody());\n\n // foursquare returned an error\n if ($result['meta']['code'] != 200) return;\n\n $entry = $result['response']['user'];\n $user = array(\n 'name' => $entry['firstName'] . ' ' . $entry['lastName'],\n 'id' => $entry['id'],\n 'avatar' => $entry['photo']\n );\n return $user;\n }", "private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\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 getUserInfo ()\n\t{\n\t\t$info[\"id\"]\t\t\t\t\t\t= $this->id;\t\t\t\t\t//The unique id of the user in the database\n\t\t$info[\"user_id\"] \t\t\t\t= $this->userId;\t\t\t\t//The id of the user includes API id's\n\t\t$info[\"email\"]\t\t\t\t\t= $this->email;\t\t\t\t\t//The email of the user\n\t\t$info[\"description\"]\t\t\t= $this->description;\t\t\t//The description of the user\n\t\t$info[\"location\"]\t\t\t\t= $this->location;\t\t\t\t//The location of the user\n\t\t$info[\"first_name\"]\t\t\t\t= $this->firstName;\t\t\t\t//The first name of the user\n\t\t$info[\"last_name\"]\t\t\t\t= $this->lastName;\t\t\t\t//The last name of the user\n\t\t$info[\"name\"]\t\t\t\t\t= $this->fullName;\t\t\t\t//The full name of the user\n\t\t$info[\"username\"]\t\t\t\t= $this->username;\t\t\t\t//The username of the user\n\t\t$info[\"type\"]\t\t\t\t\t= $this->type;\t\t\t\t\t//The type of user registration\n\t\t$info[\"thumbnail\"]\t\t\t\t= $this->thumbnail;\t\t\t\t//The user's image thumbnail\n\t\t$info[\"gender\"]\t\t\t\t\t= $this->gender;\t\t\t\t//The gender of the user\n\t\t$info[\"num_calendars\"]\t\t\t= $this->numCalendarsCreated;\t//The number of calendars the user has created\n\t\t$info[\"num_followed_calendars\"]\t= $this->numCalendarsFollowed;\t//The number of calendars the user is following\n\t\t$info[\"primary_calendar\"]\t\t= $this->primaryCalendar;\t\t//The primary calendar that a user is using\n\t\t\n\t\treturn $info;\n\t}", "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}", "function get_user()\n{\n$response = $GLOBALS['http']->request('GET', '/api/users/@me', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $_SESSION['auth_token']\n ]\n]);\n\n$responseBody = $response->getBody(true); \n$response = json_decode($responseBody, true);\n$_SESSION['username'] = $response['username'];\n$_SESSION['discrim'] = $response['discriminator'];\n$_SESSION['user_id'] = $response['id'];\n$_SESSION['user_avatar'] = $response['avatar'];\n}", "public function facebook()\n {\n return $this->auth('Facebook');\n }", "public function login()\n {\n self::$facebook = new \\Facebook(array(\n 'appId' => $this->applicationData[0],\n 'secret' => $this->applicationData[1],\n ));\n\n $user = self::$facebook->getUser();\n if (empty($user) && empty($_GET[\"state\"])) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser($user);\n }", "protected function objectUserEnCours(){\n $fbUid = $this->getRequest()->getSession()->get('_fos_facebook_fb_482361481839052_user_id');\n $user = $this->getDoctrine()->getManager()->getRepository('MetinetFacebookBundle:User')->findOneByfbUid($fbUid);\n return $user ;\n }", "public function getUserInfo($token)\n\t{\n\t\t#Build profile url\n\t\t$graph_url = \"$this->profileUrl?access_token=$token\";\n\n\t\t#Connect to facebook\n\t\t$response = $error = null;\n\t\t$this->curl($graph_url, $response, $error);\n\n\t\t#If no response\n\t\tif ($error) {\n\t\t\t$error_message = curl_strerror($error);\n\t\t\tthrow new Exception($error_message, $error);\n\t\t}\n\n\t\t#Decode response\n\t\t$decoded = json_decode($response, true);\n\n\t\t#If invalid response\n\t\tif (json_last_error() !== JSON_ERROR_NONE) {\n\t\t\tthrow new Exception('Bad formatted response', 415);\n\t\t}\n\n\t\treturn $decoded;\n\t}", "private function get_user_info() {\n $user_info = $this->_api_call('https://api.twitter.com/1.1/account/settings.json');\n return $user_info;\n }", "abstract protected function getUserProfile();", "public function getInfos($fields)\n {\n $users_infos = sfFacebook::getFacebookApi()->users_getInfo(array($this->getCurrentFacebookUid()),$fields);\n\n return reset($users_infos);\n }", "public function fbCallback()\n\t{\n try {\n // $code = Input::get('code');\n // if (strlen($code) == 0) return Redirect::to('/noauth')->with('message', 'Se ha producido un error al comunicarse con Facebook.');\n\n FacebookSession::setDefaultApplication(Config::get('facebook')['appId'],Config::get('facebook')['secret']);\n //$pageHelper = new FacebookPageTabHelper(Config::get('facebook')['appId'],Config::get('facebook')['secret']);\n //$helper = new FacebookRedirectLoginHelper( Config::get('app')['url'] . '/login/fb/callback' );\n\n $pageHelper = new FacebookJavaScriptLoginHelper(Config::get('facebook')['appId'],Config::get('facebook')['secret']);\n $session = $pageHelper->getSession();\n // $session = $helper->getSessionFromRedirect();\n //\t $uid = $session->getSignedRequestProperty('user_id'); \n $uid = $pageHelper->getUserId();\n //$facebook = new Facebook(Config::get('facebook'));\n //$uid = $facebook->getUser();\n\n if ($uid == 0) return Redirect::to('/noauth')->with('message', 'Hubo un error');\n\n $request = new FacebookRequest( $session, 'GET', '/me' , null, 'v1.0');\n $response = $request->execute();\n // Responce\n $me = $response->getGraphObject()->asArray();//GraphUser::className()\n //getBirthday;\n //$me = $facebook->api('/me');\n\n $profile = Profile::whereUid($uid)->first();\n if (empty($profile)) {\n $user = new User;\n $user->name = $me['first_name'] . ' '. $me['last_name'];\n $user->email = $me['email'];\n $user->photo = '';\n $user->gender = $me['gender'];\n $user->inscrito = false;\n $user->save();\n\n $profile = new Profile();\n $profile->uid = $uid;\n $profile->username = $me['email'];\n $profile = $user->profiles()->save($profile);\n }\n\n $profile->access_token = $session->getAccessToken();\n $profile->autorizado = true;\n $profile->save();\n $user = $profile->user;\n\n if ($user->inscrito) {\n return Redirect::to('/categorias')->with('message', 'Logged in with Facebook');\n } else {\n // return View::make('inscripcion');\n return Redirect::route('inscripcion', array('id' => $user->id));\n }\n\n // Auth::login($user);\n\n //return Redirect::to('/')->with('message', 'Logged in with Facebook');\n } catch (FacebookAuthorizationException $e) {\n return Redirect::to('/sesionexpirada')->with('message', 'Su sesión ha expirado. Por favor haga click en reiniciar.');\n } catch (\\Exception $e) {\n return Redirect::to('/error')->with('message', 'Ha ocurrido un error.');\n }\n\t}", "public function getUser(CakeRequest $request) {\n\t\t$user = $this->Facebook->getUser();\n\t\tif(!empty($user)){\n\t\t\ttry{\n\t\t\t\t$user = $this->Facebook->api('/me');\n\t\t\t\t$user['access_token'] = $this->Facebook->getAccessToken();\n\t\t\t\treturn $user;\n\t\t\t}catch(FacebookApiException $e){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function fb_udane_pobierz($token)\n{\n\n\t$GLOBALS['o_fb']->setDefaultAccessToken($token);\n $fb_api_wynik=$GLOBALS['o_fb']->get('/me?fields=id,first_name,name,email');\n\n\treturn $fb_api_wynik->getGraphUser();\n}", "public function getUserInfo()\r\n {\r\n return self::makeCall('getUserInfo', array(), null, false, $this->sessionID);\r\n }", "public function FacebookLogin($helper,$FB)\n {\n $db = new DB();\n $accessToken = $helper->getAccessToken();\n $oAuth2Client = $FB->getOAuth2Client();\n if(!$accessToken->isLongLived())\n {\n $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);\n }\n $response = $FB->get(\"/me?fields=id,first_name,last_name,gender,email,link,picture.type(large)\",$accessToken);\n $userData=$response->getGraphNode()->asArray();\n $gpUserData = array(\n 'oauth_provider'=> 'facebook',\n 'oauth_uid' => $userData['id'],\n 'first_name' => $userData['first_name'],\n 'last_name' => $userData['last_name'],\n 'email' => $userData['email'],\n 'gender' => $userData['gender'],\n 'picture' => $userData['picture']['url'],\n 'link' => $userData['link']\n );\n if(!empty($gpUserData)){\n //Check whether user data already exists in database\n $querySelect = \"SELECT \n * \n FROM \n \".$this->userTbl.\" \n WHERE \n oauth_provider = '\".$gpUserData['oauth_provider'].\"'\n AND \n oauth_uid = '\".$gpUserData['oauth_uid'].\"'\";\n $result = $db->prepare($querySelect);\n $result->execute();\n if($result->rowCount() > 0){\n //Update user data if already exists\n $queryUpdate = \"UPDATE \n \".$this->userTbl.\" \n SET \n first_name = '\".$gpUserData['first_name'].\"',\n last_name = '\".$gpUserData['last_name'].\"',\n email = '\".$gpUserData['email'].\"',\n gender = '\".$gpUserData['gender'].\"',\n picture = '\".$gpUserData['picture'].\"', \n link = '\".$gpUserData['link'].\"' \n WHERE\n oauth_provider = '\".$gpUserData['oauth_provider'].\"' \n AND \n oauth_uid = '\".$gpUserData['oauth_uid'].\"'\";\n $update = $db->prepare($queryUpdate);\n $update->execute();\n }else{\n //Insert user data\n $queryInsert = \"INSERT INTO \n \".$this->userTbl.\"\n SET \n oauth_provider = '\".$gpUserData['oauth_provider'].\"',\n oauth_uid = '\".$gpUserData['oauth_uid'].\"',\n first_name = '\".$gpUserData['first_name'].\"',\n last_name = '\".$gpUserData['last_name'].\"',\n email = '\".$gpUserData['email'].\"',\n gender = '\".$gpUserData['gender'].\"', \n picture = '\".$gpUserData['picture'].\"', \n link = '\".$gpUserData['link'].\"'\";\n $insert = $db->prepare($queryInsert);\n $insert->execute();\n }\n \n //Get user data from the database\n $result = $db->prepare($querySelect);\n $result->execute();\n $gpUserData = $result->fetchAll();\n }\n //close db connection\n $db = NULL;\n //Return user data\n return $gpUserData;\n }", "private function me($access_token){\n\t\t$curl = curl_init('https://api.amazon.com/user/profile');\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: bearer ' . $access_token));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HEADER, true);\n \n $response = curl_exec($curl);\n \n $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n $response_header = substr($response, 0, $header_size);\n $response_body = substr($response, $header_size);\n \n if (!empty($response_body)){\n\t\t\treturn json_decode($response_body);\n\t\t}\n\t\telse{\n\t\t\t$error = array(\n\t\t\t\t'provider' => 'Amazon',\n\t\t\t\t'code' => 'me_error',\n\t\t\t\t'message' => 'Failed when attempting to query for user information',\n\t\t\t\t'raw' => array(\n\t\t\t\t\t'response' => $response_body,\n\t\t\t\t\t'headers' => $response_headers\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->errorCallback($error);\n\t\t}\n\t}", "public function handleProviderCallback()\n {\n $user = Socialite::driver('facebook')->user();\n\n // $user->token;\n }", "public function getUserInfo()\n {\n }", "public function GetFbUserFromCookie()\n {\n $res = array();\n if ($this->mSession->GetCookie( 'fbsr_' . FACEBOOK_API_ID ))\n {\n //validate facebook cookie\n $signed_request = $this->mSession->GetCookie( 'fbsr_' . FACEBOOK_API_ID );\n list($encoded_sig, $payload) = explode('.', $signed_request, 2);\n $sig = base64_decode(strtr($encoded_sig, '-_', '+/'));\n $expected_sig = hash_hmac('sha256', $payload, FACEBOOK_API_SECRET, $raw = true);\n\n if ($sig == $expected_sig)\n {\n $data = json_decode(base64_decode($payload), true);\n if (array_key_exists('user_id', $data)) \n {\n $res['user_id'] = $data['user_id'];\n }\n if (array_key_exists('oauth_token', $data))\n {\n $res['access_token'] = $data['oauth_token'];\n }\n if (array_key_exists('code', $data))\n {\n $res['code'] = $data['code'];\n }\n if (array_key_exists('state', $data))\n {\n $res['state'] = $data['state'];\n }\n }\n }\n return $res;\n }", "public function get_facebook() {\r\n return $this->facebook;\r\n }", "function retrieveUserByAccessToken($accessToken);", "public static function getUser();", "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}", "public function facebookAccountCallback()\n {\n try {\n $social_user = Socialite::driver($this->facebookProvider)->fields(['name', 'first_name', 'last_name', 'email'])->stateless()->user();\n if (!$social_user) {\n return redirect('/login')->with('error', trans('messages.something_wrong'));\n }\n\n $email = $social_user->email;\n if ($email == null) {\n $email = $social_user->id . '@facebook.com';\n }\n $name = $social_user->name;\n\n $user = User::where('facebook_id', $social_user->id)->orWhere('email', $email)->first();\n if ($user) {\n if ($user->facebook_id == null) {\n $user->facebook_id = $social_user->id;\n $user->save();\n }\n } else {\n $first_name = $name;\n if (isset($social_user->user['first_name']) && $social_user->user['first_name']) {\n $first_name = $social_user->user['first_name'];\n }\n $last_name = null;\n if (isset($social_user->user['last_name']) && $social_user->user['last_name']) {\n $last_name = $social_user->user['last_name'];\n }\n\n $request = [\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'facebook_id' => $social_user->id,\n ];\n $user = $this->create($request);\n }\n Auth::login($user);\n return redirect()->route($this->redirectTo);\n\n } catch (Exception $e) {\n return redirect('/login')->with('error', trans('messages.something_wrong'));\n }\n }", "public function index() {\n if ($this->user) {\n $data['user_profile'] = $this->facebook->api('/me?fields=id,name,gender,first_name,last_name,picture,email,location,birthday');\n\n// Get logout url of facebook\n $data['logout_url'] = $this->facebook->getLogoutUrl(array('next' => base_url() . 'index.php/oauth_login/logout'));\n $this->load->model('lawyer_model');\n $lawyer = array();\n\n $lawyer['firstname'] = $data['user_profile']['first_name'];\n $lawyer['lastname'] = $data['user_profile']['last_name'];\n if (!empty($data['user_profile']['middle_name'])) {\n $lawyer['middlename'] = $data['user_profile']['middle_name'];\n }\n if (!empty($data['user_profile']['birthday'])) {\n $lawyer['dob'] = $data['user_profile']['birthday'];\n }\n if (!empty($data['user_profile']['gender'])) {\n $lawyer['gender'] = $data['user_profile']['gender'];\n }\n if (!empty($data['user_profile']['email'])) {\n $lawyer['email'] = $data['user_profile']['email'];\n }\n if (!empty($data['user_profile']['location'])) {\n $lawyer['address'] = $data['user_profile']['location'];\n }\n\n// $lawyer['image'] = $data['user_profile']['picture'];\n// $lawyer['address'] = $data['user_profile']['location'];\n// $lawyer['password'] = $data['user_profile']['password'];\n// $this->lawyer_model->insert($lawyer);\n// Send data to profile page\n $this->load->view('register_lawyer', $lawyer);\n } else {\n\n// Store users facebook login url\n $data['login_url'] = $this->facebook->getLoginUrl(array(\"scope\" => array(\"email\", \"user_location,user_birthday\")));\n $this->load->view('login', $data);\n }\n }", "public function getFacebookLogin($auth = NULL)\n {\n if ($auth == 'auth') {\n try {\n Hybrid_Endpoint::process();\n } catch (Exception $e) {\n return Redirect::to('fbauth');\n }\n return;\n }\n try {\n // create a HybridAuth object\n $socialAuth = new Hybrid_Auth(app_path() . '/config/packages/hybridauth/fbauth.php');\n // authenticate with Google\n $provider = $socialAuth->authenticate(\"Facebook\");\n // fetch user profile\n $userProfile = $provider->getUserProfile();\n } catch (Exception $e) {\n // exception codes can be found on HybBridAuth's web site\n return $e->getMessage();\n }\n // access user profile data\n echo \"Connected with: <b>{$provider->id}</b><br />\";\n echo \"As: <b>{$userProfile->displayName}</b><br />\";\n echo \"<pre>\" . print_r($userProfile, true) . \"</pre><br />\";\n\n // logout\n //$provider->logout();\n }", "public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function getUserData($get_extra_info = false, $facebook_uid = null){\r\n\t\t$facebook_uid = $this->getFacebookUid($facebook_uid);\r\n\t\tif(!$get_extra_info && array_key_exists($facebook_uid,$this->cached_user_data)){\r\n\t\t\treturn $this->cached_user_data[$facebook_uid];\r\n\t\t}\r\n\t\t\r\n\t\t$fields = $get_extra_info ? array_merge(self::$data_fields, self::$data_fields_extra) : self::$data_fields;\r\n\t\t$user_info_res = $this->usersGetInfo($facebook_uid, $fields);\r\n\r\n\t\t$user_data = isset($user_info_res[0]) ? $user_info_res[0] : array();\r\n\r\n\t\tif(!$get_extra_info){\r\n\t\t\t$this->cached_user_data[$facebook_uid] = $user_data;\r\n\t\t}\r\n\t\treturn $user_data;\r\n\t}", "public function getUserInfo()\n {\n $request = new Resource('GET', 'https://api.dropbox.com/1/account/info', array(\n 'oauth_consumer_key' => $this->consumer->client_id,\n 'oauth_token' => $this->token->access_token,\n ));\n\n // Sign the request using the consumer and token\n $request->sign($this->signature, $this->consumer, $this->token);\n\n $user = json_decode($request->execute());\n\n // Create a response from the request\n return array(\n 'uid' => $this->token->uid,\n 'name' => $user->display_name,\n 'email' => $user->email,\n 'location' => $user->country,\n );\n }", "public function getMe()\n {\n return $this->_execute('/user/', self::METHOD_GET);\n }", "public function get_login_info() {\r\n\t\t// Get user from cached data or from access token\r\n\t\t$user = $this->getUser ();\r\n\t\t\r\n\t\t// If there's bd_sig & bd_user parameter in query parameters,\r\n\t\t// it must be an inside web app(app on baidu) loading request,\r\n\t\t// then we must check whether the uid passed from baidu is the\r\n\t\t// same as we get from persistent data or from access token, \r\n\t\t// if it's not, we should clear all the persistent data and to \r\n\t\t// get an access token again.\r\n\t\tif (isset ( $_REQUEST ['bd_sig'] ) && isset ( $_REQUEST ['bd_user'] )) {\r\n\t\t\t$sig = self::generateSign ( array ('bd_user' => $_REQUEST ['bd_user'] ), $this->apiSecret, 'bd_sig' );\r\n\t\t\tif ($sig != $_REQUEST ['bd_sig'] || $user ['uid'] != $_REQUEST ['bd_user']) {\r\n\t\t\t\t$this->store->remove ( 'session' );\r\n\t\t\t}\r\n\t\t}\r\n\t\t$user = $this->user_data_format($user);\r\n\t\treturn $user;\r\n\t}", "function getUserData() { \n // \"functions.php\";\n\n $response = $this->getRequest(\"me\");\n\n // Return an object of the JSON response\n return json_decode($response->getBody()->getContents());\n }", "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "public function user() {\n $connection = new HTTPConnector($this);\n $url = $this->credential->getRequestUrl(BitcasaConstants::METHOD_USER . BitcasaConstants::METHOD_PROFILE);\n if (!BitcasaUtils::isSuccess($connection->get($url))) {\n return null;\n }\n\n $response = $connection->getResponse(true);\n\n $user = User::getInstance($response);\n return $user;\n }", "public function getFacebook()\n {\n return $this->facebook;\n }", "public function facebook()\n {\n return facebook()->login();\n }", "public function getUser();", "public function getUser();" ]
[ "0.7505481", "0.7408971", "0.7356264", "0.7327535", "0.713596", "0.71202654", "0.7103626", "0.69768095", "0.6958048", "0.6907841", "0.6893627", "0.6882403", "0.68787634", "0.68728215", "0.68310845", "0.680176", "0.67867666", "0.67707264", "0.6762518", "0.6754113", "0.67351156", "0.67261964", "0.6706867", "0.66865325", "0.6660458", "0.66379505", "0.66272724", "0.6592185", "0.6574366", "0.6562649", "0.6560862", "0.65523994", "0.65368456", "0.6523425", "0.65073085", "0.6500187", "0.6489462", "0.6487606", "0.6467391", "0.64564645", "0.6454803", "0.6439929", "0.6437218", "0.6433124", "0.64321333", "0.6427885", "0.6426106", "0.6420927", "0.6417195", "0.63981426", "0.6381538", "0.6377051", "0.63762355", "0.63740236", "0.63681334", "0.636498", "0.6364892", "0.63587034", "0.6352225", "0.63286567", "0.6323949", "0.6311576", "0.63079184", "0.6306799", "0.62992585", "0.62965095", "0.6290379", "0.62892944", "0.62847465", "0.6273823", "0.62714356", "0.62651354", "0.6257988", "0.62529176", "0.6244442", "0.6236241", "0.6210635", "0.61992097", "0.61816204", "0.6176562", "0.61678314", "0.61640334", "0.6162126", "0.6157327", "0.61566895", "0.61566156", "0.61485267", "0.614388", "0.6142293", "0.61412144", "0.61407924", "0.6119395", "0.61191547", "0.6114215", "0.6110536", "0.61094207", "0.6109232", "0.6100855", "0.6096141", "0.6091359", "0.6091359" ]
0.0
-1
Page Edit Meta Boxes Show or Hide Sidebar Meta Box
function add_page_show_sidebar_metaboxes() { add_meta_box('page_show_sidebar_meta_values', 'Page Sidebar', 'page_show_sidebar_meta_values', 'page', 'side', 'default'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GTPress_hide_pagemeta() {\r\n\tif ($options['hide_pagemeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' ); // allow comments for pages\r\n\t\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages\r\n\t\tremove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages\r\n\t\tremove_meta_box( 'trackbacksdiv' , 'page' , 'normal' ); // page trackbacks\r\n\t\tremove_meta_box( 'postexcerpt' , 'page' , 'normal' ); // page excerpts\r\n\t\tremove_meta_box( 'tagsdiv-post_tag' , 'page' , 'side' ); // page tags\r\n\t\tremove_meta_box( 'pageparentdiv','page','side'); // Page Parent\r\n\t\tremove_meta_box( 'slugdiv','page','normal'); // page slug\r\n\t}\r\n}", "public function hideMetaBoxes()\n {\n remove_meta_box( 'pageparentdiv', 'playscripts', 'side' );\n // for some odd reason this doesn't always work. Very annoying.\n remove_meta_box( 'postimagediv', 'playscripts', 'side' );\n }", "public function add_admin_meta_boxes() {\n\n\t\t$id = 'hide_backend_options';\n\t\t$title = __( 'Hide Login Area', 'it-l10n-ithemes-security-pro' );\n\n\t\tadd_meta_box(\n\t\t\t$id,\n\t\t\t$title,\n\t\t\tarray( $this, 'metabox_hide_backend_settings' ),\n\t\t\t'security_page_toplevel_page_itsec_settings',\n\t\t\t'advanced',\n\t\t\t'core'\n\t\t);\n\n\t\t$this->core->add_toc_item(\n\t\t\tarray(\n\t\t\t\t'id' => $id,\n\t\t\t\t'title' => $title,\n\t\t\t)\n\t\t);\n\t}", "function GTPress_hide_postmeta() {\r\n\tif ($options['hide_postmeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'post' , 'normal' ); // allow comments for posts\r\n\t\tremove_meta_box( 'commentsdiv' , 'post' , 'normal' ); // recent comments for posts\r\n\t\tremove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts\r\n\t\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' ); // post trackbacks\r\n\t\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' ); // post excerpts\r\n\t\tremove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); // post tags\r\n\t\tremove_meta_box( 'slugdiv','post','normal'); // post slug\r\n\t}\r\n}", "function axiom_init_pagebuilder_meta_box(){\n // add custom sidebar metabox to following types\n $types = array('page', 'axi_product', 'portfolio', 'service', 'staff');\n \n foreach ($types as $key => $value) {\n add_meta_box(\"axiom_pagebuilder_metabox\", \n __(\"Smart Page Builder\", 'default'), \n \"axiom_display_pagebuilder_meta\", \n $value, \n \"normal\", \n \"high\");\n }\n \n // Save custom sidebar meta\n add_action('save_post', 'axiom_save_pagebuilder_data');\n \n}", "public function render_metabox_hide_fields_for_page($post){\n\n\t\twp_nonce_field('post_metabox_hide_fields_for_page', 'post_metabox_hide_fields_for_page_nonce');\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_box_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_box_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_box_author.'\">'.__('Hide about author', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_date , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_date.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_date.'\">'.__('Hide published date', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_author.'\">'.__('Hide meta author', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_comments , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_comments.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for=\"'.self::$checkbox_post_comments.'\">'.__('Hide comments', THEME_NAME).'</label></div>';\n\t}", "function rs_meta_box()\n{\n add_meta_box('rs_focus', 'Destaque na home', 'rs_focus', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post_region', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'event', 'side');\n}", "function create_sitewide_metabox() {\n\t\t$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );\n\t\tforeach ( $post_types as $post_type )\n\t\t\techo '<p><input type=\"checkbox\" name=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\" id=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\" value=\"1\" ' . checked( genesis_get_option( 'be_title_toggle_' . $post_type ), false ) .' /> <label for=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\"> ' . sprintf( __( 'By default, remove titles in the <strong>%s</strong> post type.', 'genesis-title-toggle' ), $post_type ) .'</label></p>';\n\n\t\n\t}", "function page_setup_metabox_content( $post ){\n\twp_nonce_field( 'mptheme_layout_save_meta_box', 'mptheme_page_setup_meta_box_nonce' );\n\n\t/*\n\t * Use get_post_meta() to retrieve an existing value\n\t * from the database and use the value for the form.\n\t */\n\t$mptheme_page_setup_show_heading = get_post_meta( $post->ID, 'mptheme_page_setup_show_heading', true );\n\n\tif(!$mptheme_page_setup_show_heading){\n\t\t$mptheme_page_setup_show_heading = 'true';\n\t}\n\t?>\n\t\t<p class=\"post-attributes-label-wrapper\">\n\t\t\t<label class=\"post-attributes-label\"> <?php _e( 'Show page heading', 'mptheme' ); ?> </label>\n\t\t</p>\n\t\t<select name=\"mptheme_page_setup_show_heading\">\n\t\t\t<option value=\"true\" <?php echo selected( $mptheme_page_setup_show_heading, 'true', false); ?>> <?php _e( 'Enable', 'mptheme' ); ?></option>\n\t\t\t<option value=\"false\" <?php echo selected( $mptheme_page_setup_show_heading, 'false', false); ?>> <?php _e( 'Disable', 'mptheme' ); ?></option>;\n\t\t</select>\n\n\t<?php\n\t// if Revolution Slider is available uset can select an slider for the page\n\tif(class_exists('RevSliderAdmin')) {\n\t\tglobal $wpdb;\n\n\t\t$rs = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT id, title, alias\n\t\t\tFROM \".$wpdb->prefix.\"revslider_sliders\n\t\t\tORDER BY id ASC LIMIT 100\n\t\t\t\"\n\t\t);\n\t\t$revsliders = array(array(\n\t\t\t'value' => 'no_slider',\n\t\t\t'label' => 'No Slider'\n\t\t));\n\t\tif ($rs) {\n\t\t\t$_ri = 1;\n\t\t\tforeach ( $rs as $slider ) {\n\t\t\t\t$revsliders[$_ri]['value'] = $slider->alias;\n\t\t\t\t$revsliders[$_ri]['label'] = $slider->title;\n\t\t\t\t$_ri++;\n\t\t\t}\n\t\t} else {\n\t\t\t$revsliders[\"No sliders found\"] = 0;\n\t\t}\n\n\t\tif(count($revsliders)>0 ){\n\t\t\t// Get the saved slider\n\t\t\t$mptheme_page_setup_revslider = get_post_meta( $post->ID, 'mptheme_page_setup_revslider', true );\n\n\t\t\tif(!$mptheme_page_setup_revslider){\n\t\t\t\t$mptheme_page_setup_revslider = 'no_slider';\n\t\t\t}\n\n\t\t?>\n\n\t\t\t<p class=\"post-attributes-label-wrapper\">\n\t\t\t\t<label class=\"post-attributes-label\"> <?php _e( 'Show hero Revolution Slider insted of heading?', 'mptheme' ); ?> </label>\n\t\t\t</p>\n\t\t\t<select name=\"mptheme_page_setup_revslider\">\n\t\t\t\t<?php for ($i=0; $i < count($revsliders); $i++) { ?>\n\t\t\t\t\t<option value=\"<?php echo $revsliders[$i][\"value\"] ?>\" <?php echo selected( $mptheme_page_setup_revslider, $revsliders[$i][\"value\"], false); ?>><?php echo $revsliders[$i][\"label\"] ?></option>\n\t\t\t\t<?php } ?>\n\t\t\t</select>\n\n\t\t<?php }\n\t}\n\t?>\n\n\t<?php\n}", "function ssep_hide_meta_field( $fields ) {\n\n\t$fields[] = array(\n\t\t'id' => '_ss_hide_meta',\n\t\t'name' => __( 'Hide Meta' ),\n\t\t'type' => 'checkbox',\n\t\t'desc' => __( 'Hide meta info for this post.', 'shoestrap' )\n\t);\n\n\treturn $fields;\n}", "public function display_meta_box() {\n\t\t\n\t\tinclude_once( 'views/q-and-a-admin.php' );\n }", "function flowthemes_seo_meta_boxes(){\n\t\twp_nonce_field(basename(__FILE__), 'flow_seo_noncename');\n\t\t\n\t\t$opt_name = 'flow_seo_title';\n\t\t$opt_name2 = 'flow_seo_description';\n\t\t$opt_name3 = 'flow_post_header_code';\t\n\t\t\n\t\t$post_ID = get_the_ID();\n\t\t$opt_val = get_post_meta($post_ID, $opt_name, true);\n\t\t$opt_val2 = get_post_meta($post_ID, $opt_name2, true);\n\t\t$opt_val3 = get_post_meta($post_ID, $opt_name3, true);\n\n\t?>\n\t\t<table class=\"form-table flow_seo_meta_box\">\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"\"><?php _e('Snippet Preview', 'flowthemes'); ?></label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<div id=\"flow_seo_snippet\">\n\t\t\t\t\t\t<a class=\"default_title\" href=\"javascript:void(null);\"><?php the_title(); ?> - <?php bloginfo('name'); ?></a>\n\t\t\t\t\t\t<a class=\"title\" href=\"javascript:void(null);\"><?php the_title(); ?></a>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<cite href=\"javascript:void(null);\" class=\"url\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$domain = parse_url(get_permalink());\n\t\t\t\t\t\t\t\tif(!empty($domain[\"host\"])){ echo $domain[\"host\"]; }\n\t\t\t\t\t\t\t\tif(!empty($domain[\"path\"])){ echo $domain[\"path\"]; }\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</cite>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p class=\"desc\">\n\t\t\t\t\t\t\t<span class=\"content\"><?php echo get_the_excerpt(); ?></span>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"<?php echo $opt_name; ?>\">SEO Title</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"text\" name=\"<?php echo $opt_name; ?>\" id=\"<?php echo $opt_name; ?>\" value=\"<?php echo $opt_val; ?>\" size=\"30\" tabindex=\"30\" style=\"width: 97%;\" />\n\t\t\t\t\t<p>\n\t\t\t\t\t\tIf you leave this empty it's going to display standard title. Limited to max. 70 characters in most of the search engines. Number of characters: <span id=\"flow_seo_title-count\"></span>\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"<?php echo $opt_name2; ?>\">SEO Description</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"<?php echo $opt_name2; ?>\" id=\"<?php echo $opt_name2; ?>\" cols=\"60\" rows=\"4\" tabindex=\"30\" style=\"width: 97%;\"><?php echo $opt_val2; ?></textarea>\n\t\t\t\t\t<p>Limited to 156 characters in most of the search engines. Number of characters: <span id=\"flow_seo_description-count\"></span></p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"flow_seo_focuskw\">Test Keyword(s)</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"text\" name=\"flow_seo_focuskw\" id=\"flow_seo_focuskw\" value=\"\" size=\"30\" tabindex=\"30\" style=\"width: 97%;\" />\n\t\t\t\t\t<p>\n\t\t\t\t\t\tThis field is used only as testing tool. Put here keywords that you expect that user will look for to check how well this post is using them. Please test one keyword at a time. Phrases should be tested as separate keywords (because that's the way search engine works).\n\t\t\t\t\t\t<span id=\"focuskwresults\"></span>\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"<?php echo $opt_name3; ?>\">Custom Code</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"<?php echo $opt_name3; ?>\" id=\"<?php echo $opt_name3; ?>\" cols=\"60\" rows=\"4\" tabindex=\"30\" style=\"width: 97%;\"><?php echo $opt_val3; ?></textarea>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tA code that will be placed in <code>&lt;head&gt;</code> section of your website in place of <code>wp_head();</code> function (located in header.php). What you may want to put here is probably Facebook title, description and image that it should use:\n<pre><code>&lt;meta property=\"og:title\" content=\"The Daisho Project\" /&gt;\n&lt;meta property=\"og:type\" content=\"video.movie\" /&gt;\n&lt;meta property=\"og:url\" content=\"http://example.com/link-to-portfolio-project-with-movie/\" /&gt;\n&lt;meta property=\"og:image\" content=\"http://example.com/images/facebook-should-grab-this-image-as-thumbnail.jpg\" /&gt;</code></pre>\n\t\t\t\t\t\tMore: <a href=\"http://ogp.me/\" target=\"_blank\">The Open Graph protocol</a>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t...or you can put here completely different code including <code>&lt;style&gt;</code> and <code>&lt;script&gt;</code> tags! There are lots of possibilities: <a href=\"http://en.wikipedia.org/wiki/Meta_element\" target=\"_blank\">Meta Element</a>.\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t<?php }", "function wpdocs_register_meta_boxes() {\r\n\r\n\tif ( isset($_GET['action']) && $_GET['action'] === 'edit' )\r\n\t{\r\n\t\tadd_meta_box( 'acoes-acesso', __( 'Ações', 'textdomain' ), 'petty_render_box_acao_metabox', 'acesso_camera','side','high' );\r\n\t}\r\n \r\n}", "function thmplt_carousel_slide_meta(){\r\n\tadd_meta_box(\"thmplt_carousel_meta_box1\", \"Slide Settings\", \"thmplt_carousel_slide_settings_html\", \"thmplt_carousel\", \"normal\", \"high\");\r\n\tadd_meta_box(\"thmplt_carousel_meta_box2\", \"Slide Images\", \"thmplt_carousel_slide_settings_html2\", \"thmplt_carousel\", \"normal\", \"high\");\r\n}", "function master_setup_sidebar_metaboxes() {\t\n\tglobal $wp_meta_boxes;\n\t\n\tmaster_sidebar_post_type_meta_boxes(); \t\t\t// Output Posttype Metaboxes\n\tmaster_sidebar_category_posts_metabox(); \t\t// Output Category Posts Metabox\n\tmaster_sidebar_taxonomy_meta_boxes(); \t\t\t// Output Taxonomy Metaboxes\n\tmaster_sidebar_author_meta_box(); \t\t\t// Output Author Archive Metabox\n\tmaster_sidebar_template_hierarchy_meta_box();\t// Output Custom Template Hierarchy Metabox \n}", "function thd_re_info_show_box() {\n\tthd_meta_box_callback(thd_re_meta_box_fields(), 'page');\n}", "public static function display_meta_box($post) {\r\n\t\t\t$force_hide = get_post_meta($post->ID, self::FORCE_HIDE_KEY, true);\r\n\t\t\t$moderation_url = self::_get_moderation_url($post->ID);\r\n\t\t\t$results_url = self::_get_results_url($post->ID);\r\n\r\n\t\t\tinclude('views/backend/meta-boxes/meta-box.php');\r\n\t\t}", "function block_editor_meta_box_hidden_fields()\n {\n }", "function blokco_register_meta_box() {\n if (!class_exists('RW_Meta_Box'))\n return;\n $prefix = 'blokco_';\n $meta_box = array(\n 'id' => 'template-sidebar1',\n 'title' => esc_html__(\"Select Sidebar\", 'blokco'),\n 'pages' => array('post', 'page', 'imi_projects', 'imi_team', 'imi_services','eventer'),\n 'context' => 'normal',\n 'fields' => array(\n array(\n 'name' => esc_html__('Select Sidebar from list','blokco'),\n 'id' => $prefix . 'select_sidebar_from_list',\n 'desc' => esc_html__(\"Select Sidebar from list, if using page builder then please add sidebar from element only.\", 'blokco'),\n 'type' => 'select',\n 'options' => blokco_get_all_sidebars(),\n ),\n array(\n 'name' => esc_html__('Show no sidebar','blokco'),\n 'id' => $prefix . 'strict_no_sidebar',\n 'desc' => esc_html__(\"This will dishonour page sidebar chosen at Theme Options as well.\", 'blokco'),\n 'type' => 'checkbox',\n\t\t\t\t\t'default' => 0\n ),\n array(\n 'name' => esc_html__('Select Sidebar Position','blokco'),\n 'id' => $prefix . 'select_sidebar_position',\n 'desc' => esc_html__(\"Select Sidebar Postion\", 'blokco'),\n 'type' => 'radio',\n 'options' => array(\n\t\t\t\t\t\t'2' => esc_html__('Left','blokco'),\n\t\t\t\t\t\t'1' => esc_html__('Right','blokco')\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '1'\n ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__('Sidebar Width', 'blokco'),\n\t\t\t\t\t'id' => $prefix . 'sidebar_columns_layout',\n\t\t\t\t\t'desc' => esc_html__(\"Select width of the page sidebar\", 'blokco'),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'4' => esc_html__('One Third','blokco'),\n\t\t\t\t\t\t'3' => esc_html__('One Fourth', 'blokco'),\n\t\t\t\t\t\t'6' => esc_html__('Half','blokco'),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t'default' => '4',\n\t\t\t),\n )\n );\n new RW_Meta_Box($meta_box);\n }", "function c_content_admin() {\n $form = array();\n\n $form['c_content_metatags'] = array(\n '#type' => 'fieldset',\n '#title' => t('Meta tags'),\n '#tree' => TRUE,\n );\n\n // Get fields available for meta tags embedding.\n $fields = array();\n foreach (field_info_field_map() as $key => $field) {\n // Only allow text and taxonomy_term_reference fields for now that are available on nodes.\n if (isset($field['bundles']['node']) && ($field['type'] === 'text' || $field['type'] === 'taxonomy_term_reference')) {\n $fields[$key] = $key . ' <em>(' . t('Used in types: @bundles', array('@bundles' => implode(', ', $field['bundles']['node']))) . ')</em>';\n }\n }\n\n $default_value = variable_get('c_content_metatags');\n $form['c_content_metatags']['fields'] = array(\n '#type' => 'checkboxes',\n '#options' => $fields,\n '#title' => t('Which node fields should be added as meta tag to the HTML?'),\n '#default_value' => $default_value['fields'],\n );\n\n return system_settings_form($form);\n}", "function vw_hospital_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'vw_hospital_cs_meta_callback' , 'doctors','normal', 'high' ); \n\n}", "function swank_home_genesis_meta() {\r\n\r\n\tif ( is_active_sidebar( 'home-slider' ) || is_active_sidebar ( 'under-home-slider' ) || is_active_sidebar( 'featured-circles' ) || is_active_sidebar( 'home-featured-area' )) \r\n\r\n\t\t//* Force full width content layout\r\n\t\tadd_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\r\n\r\n\t\t//* Remove breadcrumbs\r\n\t\tremove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs');\r\n\r\n\t\t//* Remove the default Genesis loop\r\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\r\n\r\n\t\t//* Add homepage widgets\r\n\t\tadd_action( 'genesis_loop', 'swank_homepage_widgets' );\r\n\r\n\t}", "function on_show_page() { \n global $screen_layout_columns;\n $data = array();\n ?>\n <div id=\"slideshow-settings-metaboxes\" class=\"wrap\">\n <?php screen_icon('options-general'); ?>\n <form action=\"admin-post.php\" method=\"post\">\n <?php wp_nonce_field('slideshow-settings-metaboxes'); ?>\n <?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>\n <?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>\n <input type=\"hidden\" name=\"action\" value=\"save_slideshow_settings\" />\n <div id=\"poststuff\" class=\"metabox-holder has-right-sidebar\">\n <div id=\"side-info-column\" class=\"inner-sidebar\">\n <!-- Update -->\n <div class=\"postbox\">\n <div class=\"inside\">\n <input type=\"hidden\" name=\"HTTP_REFERER\" value=\"<?php echo $_SERVER['HTTP_REFERER'] ?>\" />\n <input type=\"hidden\" name=\"theme_options_nonce\" value=\"<?php echo wp_create_nonce( 'input' ); ?>\" />\n <input type=\"submit\" class=\"button button-primary button-large\" value=\"Save Slider\" />\n </div>\n </div>\n <?php do_meta_boxes($this->pagehook, 'side', $data); ?>\n </div>\n <div id=\"post-body\" class=\"has-sidebar\">\n <div id=\"post-body-content\" class=\"has-sidebar-content\">\n <?php do_meta_boxes($this->pagehook, 'normal', $data); ?>\n <?php do_meta_boxes($this->pagehook, 'additional', $data); ?>\n </div>\n </div>\n <br class=\"clear\"/>\n </div>\n </form>\n </div>\n <script type=\"text/javascript\">\n //<![CDATA[\n jQuery(document).ready(function($) {\n // close postboxes that should be closed\n jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');\n postboxes.add_postbox_toggles('<?php echo $this->pagehook; ?>');\n });\n //]]>\n </script>\n <?php\n }", "function ssep_force_hide_meta() {\n\tglobal $post, $ss_blog;\n\n\t$hide_meta = ssep_hide_meta( $post->ID );\n\n\tif ( $hide_meta ) {\n\t\tremove_action( 'shoestrap_entry_meta', array( $ss_blog, 'meta_custom_render' ) );\n\t\tadd_filter( 'shoestrap_the_tags', '__return_null' );\n\t\tadd_filter( 'shoestrap_the_cats', '__return_null' );\n\t}\n}", "public static function security_meta_box($post = FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;\n\t\t\t\t\t\tdo_action(\"ws_plugin__s2member_before_security_meta_box\", get_defined_vars());\n\t\t\t\t\t\tunset($__refs, $__v);\n\n\t\t\t\t\t\tif(is_object($post) && ($post_id = $post->ID) && (($post->post_type === \"page\" && current_user_can(\"edit_page\", $post_id)) || current_user_can(\"edit_post\", $post_id)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif /* OK. So we're dealing with a Page classification. */($post->post_type === \"page\" && ($page_id = $post_id))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(!in_array($page_id, array_merge(array($GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"membership_options_page\"], $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"login_welcome_page\"], $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"file_download_limit_exceeded_page\"]), preg_split(\"/[\\r\\n\\t\\s;,]+/\", $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"specific_ids\"]))))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"ws_plugin__s2member_security_meta_box_save\" id=\"ws-plugin--s2member-security-meta-box-save\" value=\"'.esc_attr(wp_create_nonce(\"ws-plugin--s2member-security-meta-box-save\")).'\" />'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"ws_plugin__s2member_security_meta_box_save_id\" id=\"ws-plugin--s2member-security-meta-box-save-id\" value=\"'.esc_attr($page_id).'\" />'.\"\\n\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor($n = 0; $n <= $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"]; $n++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$pages[$n] = array_unique(preg_split(\"/[\\r\\n\\t\\s;,]+/\", $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"level\".$n.\"_pages\"]));\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor($n = 0; $n <= $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"]; $n++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$posts[$n] = array_unique(preg_split(\"/[\\r\\n\\t\\s;,]+/\", $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"level\".$n.\"_posts\"]));\n\n\t\t\t\t\t\t\t\t\t\t\t\techo '<p style=\"margin-left:2px;\"><strong>Page Level Restriction?</strong></p>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\techo '<label class=\"screen-reader-text\" for=\"ws-plugin--s2member-security-meta-box-level\">Add Level Restriction?</label>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\techo '<select name=\"ws_plugin__s2member_security_meta_box_level\" id=\"ws-plugin--s2member-security-meta-box-level\" style=\"width:99%;\">'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\techo /* By default, we allow public access to any Post/Page. */'<option value=\"\"></option>'.\"\\n\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor($n = 0; $n <= $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"]; $n++)\n\t\t\t\t\t\t\t\t\t\t\t\t\techo ($pages[$n] !== array(\"all\")) ? // Protecting `all` Pages, of any kind?\n\t\t\t\t\t\t\t\t\t\t\t\t\t((!in_array(\"all-page\", $posts[$n]) && !in_array(\"all-pages\", $posts[$n])) // Protecting Posts of type: `page`?\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '<option value=\"'.$n.'\"'.((in_array($page_id, $pages[$n])) ? ' selected=\"selected\"' : '').'>'.(($n === $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"]) ? 'Require Highest Level #'.$n : 'Require Level #'.$n.' (or higher)').'</option>'.\"\\n\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '<option value=\"\" disabled=\"disabled\">Level #'.$n.' (already protects \"all\" Posts of this type)</option>'.\"\\n\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '<option value=\"\" disabled=\"disabled\">Level #'.$n.' (already protects \"all\" Pages)</option>'.\"\\n\";\n\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select><br /><small>* see: <strong>Restriction Options → Pages</strong></small>'.\"\\n\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site())\n\t\t\t\t\t\t\t\t\t\t\t\t\t// ^ Will change once Custom Capabilities are compatible with a Blog Farm.\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<p style=\"margin-top:15px; margin-left:2px;\"><strong>Require Custom Capabilities?</strong></p>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<label class=\"screen-reader-text\" for=\"ws-plugin--s2member-security-meta-box-ccaps\">Custom Capabilities?</label>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"text\" autocomplete=\"off\" name=\"ws_plugin__s2member_security_meta_box_ccaps\" id=\"ws-plugin--s2member-security-meta-box-ccaps\" value=\"'.format_to_edit(trim(implode(\",\", (array)get_post_meta($page_id, \"s2member_ccaps_req\", true)))).'\" onkeyup=\"if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \\'_\\').replace (/[^a-z_0-9,]/gi, \\'\\').toLowerCase ());\" style=\"width:99%;\" />'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<br /><small>* see: <strong>API Scripting → Custom Capabilities</strong></small>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\telse if($page_id == $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"membership_options_page\"])\n\t\t\t\t\t\t\t\t\t\t\techo 'This Page is your:<br /><strong>Membership Options Page</strong><br />(always publicly available)';\n\n\t\t\t\t\t\t\t\t\t\telse if($page_id == $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"login_welcome_page\"])\n\t\t\t\t\t\t\t\t\t\t\techo 'This Page is your:<br /><strong>Login Welcome Page</strong><br />(automatically guarded by s2Member)';\n\n\t\t\t\t\t\t\t\t\t\telse if($page_id == $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"file_download_limit_exceeded_page\"])\n\t\t\t\t\t\t\t\t\t\t\techo 'This Page is your:<br /><strong>Download Limit Exceeded Page</strong><br />(automatically guarded by s2Member)';\n\n\t\t\t\t\t\t\t\t\t\telse if(in_array($page_id, preg_split(\"/[\\r\\n\\t\\s;,]+/\", $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"specific_ids\"])))\n\t\t\t\t\t\t\t\t\t\t\techo 'This Page is a:<br /><strong>Specific Post/Page for sale</strong><br />(already guarded by s2Member)';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse // Otherwise, we assume this is a Post, or possibly a Custom Post Type. It's NOT a Page.\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(!in_array($post_id, preg_split(\"/[\\r\\n\\t\\s;,]+/\", $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"specific_ids\"])))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"ws_plugin__s2member_security_meta_box_save\" id=\"ws-plugin--s2member-security-meta-box-save\" value=\"'.esc_attr(wp_create_nonce(\"ws-plugin--s2member-security-meta-box-save\")).'\" />'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"ws_plugin__s2member_security_meta_box_save_id\" id=\"ws-plugin--s2member-security-meta-box-save-id\" value=\"'.esc_attr($post_id).'\" />'.\"\\n\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor($n = 0; $n <= $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"]; $n++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$posts[$n] = array_unique(preg_split(\"/[\\r\\n\\t\\s;,]+/\", $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"level\".$n.\"_posts\"]));\n\n\t\t\t\t\t\t\t\t\t\t\t\techo '<p style=\"margin-left:2px;\"><strong>Post Level Restriction?</strong></p>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\techo '<label class=\"screen-reader-text\" for=\"ws-plugin--s2member-security-meta-box-level\">Add Level Restriction?</label>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\techo '<select name=\"ws_plugin__s2member_security_meta_box_level\" id=\"ws-plugin--s2member-security-meta-box-level\" style=\"width:99%;\">'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"\"></option>'.\"\\n\"; // By default, we allow public access to any Post/Page.\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor($n = 0; $n <= $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"]; $n++)\n\t\t\t\t\t\t\t\t\t\t\t\t\techo ($posts[$n] !== array(\"all\")) ? // Protecting `all` Posts, of any kind?\n\t\t\t\t\t\t\t\t\t\t\t\t\t((!in_array(\"all-\".$post->post_type, $posts[$n]) && !in_array(\"all-\".$post->post_type.\"s\", $posts[$n])) // Protecting Posts `all-[of-this-type]`?\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '<option value=\"'.$n.'\"'.((in_array($post_id, $posts[$n])) ? ' selected=\"selected\"' : '').'>'.(($n === $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"]) ? 'Require Highest Level #'.$n : 'Require Level #'.$n.' (or higher)').'</option>'.\"\\n\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '<option value=\"\" disabled=\"disabled\">Level #'.$n.' (already protects \"all\" Posts of this type)</option>'.\"\\n\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '<option value=\"\" disabled=\"disabled\">Level #'.$n.' (already protects \"all\" Posts)</option>'.\"\\n\";\n\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select><br /><small>* see: <strong>Restriction Options → Posts</strong></small>'.\"\\n\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site())\n\t\t\t\t\t\t\t\t\t\t\t\t\t// ^ Will change once Custom Capabilities are compatible with a Blog Farm.\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<p style=\"margin-top:15px; margin-left:2px;\"><strong>Require Custom Capabilities?</strong></p>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<label class=\"screen-reader-text\" for=\"ws-plugin--s2member-security-meta-box-ccaps\">Custom Capabilities?</label>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"text\" autocomplete=\"off\" name=\"ws_plugin__s2member_security_meta_box_ccaps\" id=\"ws-plugin--s2member-security-meta-box-ccaps\" value=\"'.format_to_edit(trim(implode(\",\", (array)get_post_meta($post_id, \"s2member_ccaps_req\", true)))).'\" onkeyup=\"if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \\'_\\').replace (/[^a-z_0-9,]/gi, \\'\\').toLowerCase ());\" style=\"width:99%;\" />'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<br /><small>* see: <strong>API Scripting → Custom Capabilities</strong></small>'.\"\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\telse if(in_array($post_id, preg_split(\"/[\\r\\n\\t\\s;,]+/\", $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"o\"][\"specific_ids\"])))\n\t\t\t\t\t\t\t\t\t\t\techo 'This Post is a:<br /><strong>Specific Post/Page for sale</strong><br />(already guarded by s2Member)';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdo_action(\"ws_plugin__s2member_after_security_meta_box\", get_defined_vars());\n\n\t\t\t\t\t\treturn /* Return for uniformity. */;\n\t\t\t\t\t}", "function _sp_custom_box_advanced_page_options( $post ) {\n\twp_nonce_field( '_sp_process_meta_advanced_page_options', '_sp_meta_advanced_page_options_nonce' );\t\n\n\tif ( $post->ID ) {\n\t\t$show_title = get_post_meta( $post->ID, '_sp_page_show_title', true );\n\t\t$show_tagline = get_post_meta( $post->ID, '_sp_page_show_tagline', true );\n\t\t$tagline = get_post_meta( $post->ID, '_sp_page_tagline_text', true );\n\t\t$show_share = get_post_meta( $post->ID, '_sp_page_show_share', true );\n\t\t$show_wishlist = get_post_meta( $post->ID, '_sp_page_show_wishlist', true );\n\t\t$show_compare = get_post_meta( $post->ID, '_sp_page_show_compare', true );\n\t}\n\n\t// set default\n\tif ( ! isset( $show_header_section ) || empty( $show_header_section ) )\n\t\t$show_header_section = 'on';\n\n\tif ( ! isset( $show_title ) || empty( $show_title ) )\n\t\t$show_title = 'on';\n\n\t// set default\n\tif ( ! isset( $show_tagline ) || empty( $show_tagline ) )\n\t\t$show_tagline = 'off';\n\n\t// set default\n\tif ( ! isset( $show_share ) || empty( $show_share ) )\n\t\t$show_share = 'on';\n\n\t// show by default if post type is a blog post else off for all others\n\tif ( get_post_type() === 'post' ) {\n\t\tif ( ! isset( $show_social_buttons ) || empty( $show_social_buttons ) )\n\t\t\t$show_social_buttons = 'on';\n\t} else {\n\t\tif ( ! isset( $show_social_buttons ) || empty( $show_social_buttons ) )\n\t\t\t$show_social_buttons = 'off';\n\t}\n\n\t// set default\n\tif ( ! isset( $show_breadcrumbs ) || empty( $show_breadcrumbs ) )\n\t\t$show_breadcrumbs = 'on';\n\n\t// set default\n\tif ( ! isset( $show_wishlist ) || empty( $show_wishlist ) )\n\t\t$show_wishlist = 'on';\n\n\t// set default\n\tif ( ! isset( $show_compare ) || empty( $show_compare ) )\n\t\t$show_compare = 'on';\n\n\t$output = '';\n\n\t$output .= '<p><strong>' . __( 'Show Page Title:', 'sp-theme' ) . '</strong></p>' . PHP_EOL;\t\n\t$output .= '<p><label>' . __( 'Show', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_title\" value=\"on\" ' . checked( $show_title, 'on', false ) . ' /></label>&nbsp;&nbsp;<label>' . __( 'Hide', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_title\" value=\"off\" ' . checked( $show_title, 'off', false ) . '/></label></p>' . PHP_EOL;\n\n\t$output .= '<p><strong>' . __( 'Show Page Tagline:', 'sp-theme' ) . '</strong></p>' . PHP_EOL;\t\n\t$output .= '<p><label>' . __( 'Show', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_tagline\" value=\"on\" ' . checked( $show_tagline, 'on', false ) . ' /></label>&nbsp;&nbsp;<label>' . __( 'Hide', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_tagline\" value=\"off\" ' . checked( $show_tagline, 'off', false ) . '/></label></p>' . PHP_EOL;\n\n\t$output .= '<p><strong>' . __( 'Page Tagline Text:', 'sp-theme' ) . '</strong></p>' . PHP_EOL;\t\n\t$output .= '<p><input type=\"text\" name=\"page_tagline_text\" class=\"widefat\" value=\"' . esc_attr( $tagline ) . '\" /></p>' . PHP_EOL;\n\n\t$output .= '<p><strong>' . __( 'Show Social Share', 'sp-theme' ) . '</strong></p>' . PHP_EOL;\t\n\t$output .= '<p><label>' . __( 'Show', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_share\" value=\"on\" ' . checked( $show_share, 'on', false ) . ' /></label>&nbsp;&nbsp;<label>' . __( 'Hide', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_share\" value=\"off\" ' . checked( $show_share, 'off', false ) . '/></label></p>' . PHP_EOL;\n\n\t// check if post type is products\n\tif ( get_post_type() === 'product' ) {\n\t\t$output .= '<p><strong>' . __( 'Show Product Wishlist', 'sp-theme' ) . '</strong></p>' . PHP_EOL;\t\n\t\t$output .= '<p><label>' . __( 'Show', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_wishlist\" value=\"on\" ' . checked( $show_wishlist, 'on', false ) . ' /></label>&nbsp;&nbsp;<label>' . __( 'Hide', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_wishlist\" value=\"off\" ' . checked( $show_wishlist, 'off', false ) . '/></label></p>' . PHP_EOL;\n\n\t\t$output .= '<p><strong>' . __( 'Show Product Compare', 'sp-theme' ) . '</strong></p>' . PHP_EOL;\t\n\t\t$output .= '<p><label>' . __( 'Show', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_compare\" value=\"on\" ' . checked( $show_compare, 'on', false ) . ' /></label>&nbsp;&nbsp;<label>' . __( 'Hide', 'sp-theme' ) . ' <input type=\"radio\" name=\"page_show_compare\" value=\"off\" ' . checked( $show_compare, 'off', false ) . '/></label></p>' . PHP_EOL;\t\t\n\t}\n\n\techo $output;\n}", "private function initMetaBox(){\n\t\t$path = get_template_directory() . '/sub/customfield/';\n\t\tif(function_exists('of_get_option')){\n\t\t\tif(of_get_option('is-seo',true)){\n\t\t\t\tnew WPO_MetaBox(array(\n\t\t\t\t 'id' => 'wpo_seo',\n\t\t\t\t 'title' => $this->l('SEO Fields'),\n\t\t\t\t 'types' => array('page','portfolio','post','video'),\n\t\t\t\t 'priority' => 'high',\n\t\t\t\t 'template' => $path . 'seo.php',\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_template',\n\t\t 'title' => $this->l('Advanced Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page-advanced.php'\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_pageconfig',\n\t\t 'title' => $this->l('Page Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page.php',\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_post',\n\t\t 'title' => $this->l('Embed Options'),\n\t\t 'types' => array('post','video'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'post.php',\n\t\t));\n\t}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "function _custom_meta_boxes() {\n\n $saved_settings = get_option( 'option_tree_settings', array() );\n\n $current_sliders = get_option( 'cp_sliders');\n\n// Iterate over the sliders\n if($current_sliders) {\n foreach($current_sliders as $key => $item) {\n $cpsliders[] = array(\n 'label' => $item->name,\n 'value' => $item->slug\n );\n }\n} else {\n $cpsliders[] = array(\n 'label' => 'No Sliders Found',\n 'value' => ''\n );\n}\n /**\n * Create a custom meta boxes array that we pass to\n * the OptionTree Meta Box API Class.\n */\n $meta_box_layout = array(\n 'id' => 'pp_metabox_sidebar',\n 'title' => 'Layout',\n 'desc' => 'If you choose the sidebar layout, please choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Theme Widgets.',\n 'pages' => array( 'post' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'id' => 'pp_sidebar_layout',\n 'label' => 'Layout',\n 'desc' => '',\n 'std' => ot_get_option('pp_blog_layout','left-sidebar'),\n 'type' => 'radio_image',\n 'class' => '',\n 'choices' => array(\n array(\n 'value' => 'left-sidebar',\n 'label' => 'Left Sidebar',\n 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'\n ),\n array(\n 'value' => 'right-sidebar',\n 'label' => 'Right Sidebar',\n 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'\n )\n ),\n ),\n array(\n 'id' => 'pp_sidebar_set',\n 'label' => 'Sidebar',\n 'desc' => '',\n 'std' => '',\n 'type' => 'sidebar-select',\n 'class' => '',\n\n )\n )\n );\n\n$meta_box_layout_page = array(\n 'id' => 'pp_metabox_sidebar',\n 'title' => 'Layout',\n 'desc' => 'If you choose the sidebar layout, please choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Theme Widgets.',\n 'pages' => array( 'page' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'id' => 'pp_sidebar_layout',\n 'label' => 'Layout',\n 'desc' => '',\n 'std' => ot_get_option('pp_blog_layout','left-sidebar'),\n 'type' => 'radio_image',\n 'class' => '',\n 'choices' => array(\n array(\n 'value' => 'left-sidebar',\n 'label' => 'Left Sidebar',\n 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'\n ),\n array(\n 'value' => 'right-sidebar',\n 'label' => 'Right Sidebar',\n 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'\n ),\n array(\n 'value' => 'full-width',\n 'label' => 'Full Width (no sidebar)',\n 'src' => OT_URL . '/assets/images/layout/full-width.png'\n )\n ),\n ),\n array(\n 'id' => 'pp_sidebar_set',\n 'label' => 'Sidebar',\n 'desc' => '',\n 'std' => '',\n 'type' => 'sidebar-select',\n 'class' => '',\n ),\n array(\n 'label' => 'Select slider',\n 'id' => 'pp_slider_select',\n 'type' => 'select',\n 'desc' => 'Don\\'t forget to choose Page Template: Page with Slider',\n 'choices' => $cpsliders,\n 'std' => 'true',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'class' => '',\n 'section' => 'slider'\n ),\n )\n);\n\n$post_options = array(\n 'id' => 'pp_metabox_featue',\n 'title' => 'Post options',\n 'desc' => 'Select post display options (Option depends on Post\\'s Format, so be sure to select one.',\n 'pages' => array( 'post' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'label' => 'Gallery slider (use when Post Type is set to Gallery)',\n 'id' => 'pp_gallery_slider',\n 'type' => 'gallery',\n 'desc' => 'Click Create Slider to create your gallery for slider.',\n 'post_type' => 'post',\n ),\n array(\n 'id' => 'pp_video_link',\n 'label' => 'Link to Video',\n 'desc' => 'Just link, not embed code, this field uses oEmbed.',\n 'std' => '',\n 'type' => 'text',\n 'class' => '',\n ),\n array(\n 'id' => 'pp_video_embed',\n 'label' => 'Embed code for Video',\n 'desc' => 'Place here embed code for videos services that do not support oEmbed',\n 'std' => '',\n 'type' => 'textarea',\n 'class' => '',\n ),\n )\n );\n\n\n\n$gallerypage = array(\n 'id' => 'pp_metabox_gallerypage',\n 'title' => 'Gallery slider',\n 'desc' => 'If you want to use flexslider gallery like on Portfolio item, just create gallery using button below',\n 'pages' => array( 'page' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'label' => 'Gallery slider (use when Post Type is set to Gallery)',\n 'id' => 'pp_gallery_slider',\n 'type' => 'gallery',\n 'desc' => 'Click Create Slider to create your gallery for slider.',\n 'post_type' => 'post',\n ),\n )\n );\n\n\n /**\n * Register our meta boxes using the\n * ot_register_meta_box() function.\n */\n ot_register_meta_box( $meta_box_layout );\n ot_register_meta_box( $meta_box_layout_page );\n ot_register_meta_box( $post_options );\n ot_register_meta_box( $gallerypage );\n\n\n}", "function remove_meta_boxes()\n {\n\n \tif( UserRoleController::isStudent() || ! current_user_can( 'publish_posts' ) )\n \t{\n \t\t//remove_meta_box( 'wpseo-dashboard-overview','project','normal' );\n \t\tremove_meta_box( 'commentstatusdiv','project', 'normal' );\n \t\tremove_meta_box( 'commentsdiv','project','normal' );\n \t\tremove_meta_box( 'statusdiv','project','normal' );\n \t\t\n \t\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n \t\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n \t\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n \t\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\n\n \t\tremove_meta_box( 'themeisle', 'dashboard', 'normal');//since 3.8 \t\t\n \t\tremove_meta_box( 'logincust_subscribe_widget', 'dashboard', 'normal');//since 3.8\n\n \t}\n }", "public function admin_page() {\n\t\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t\t$_REQUEST['settings-updated'] = false;\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e('Manage Sidebars', self::TEXT_DOMAIN) ?></h2>\n\t\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t\t<div class=\"updated fade\"><p><strong><?php _e('Sidebar settings saved.', self::TEXT_DOMAIN) ?></strong> <?php printf( __('You can now go manage the <a href=\"%swidgets.php\">widgets</a> for your sidebars.', self::TEXT_DOMAIN), get_admin_url()) ?></p></div>\n\t\t\t<?php endif; ?>\n\t\t\t<div id=\"poststuff\" class=\"metabox-holder has-right-sidebar\">\n\t\t\t\t<div id=\"post-body\" class=\"has-sidebar\">\n\t\t\t\t\t<div id=\"post-body-content\" class=\"has-sidebar-content\">\n\t\t\t\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\t\t\t<?php settings_fields( 'ups_sidebars_options' ); ?>\n\t\t\t\t\t\t\t<?php do_meta_boxes( 'ups_sidebars', 'normal', null ); ?>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"side-info-column\" class=\"inner-sidebar\">\n\t\t\t\t\t<?php do_meta_boxes( 'ups_sidebars', 'side', null ); ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function show_sidebar_meta() {\n\n\t\tif ( $this->post_id === null ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $this->is_restricted_woocommerce_page() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $this->is_sections_front_page() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function add_meta_boxes() {\r\n\t\tadd_meta_box( 'zakra-page-setting', esc_html__( 'Page Settings', 'zakra' ), 'Zakra_Meta_Box_Page_Settings::render', array(\r\n\t\t\t'post',\r\n\t\t\t'page',\r\n\t\t) );\r\n\t}", "function th_hide_meta_box($hidden, $screen)\n {\n if ('themo_room' == $screen->post_type) {\n\n //lets hide everything\n $hidden = array('postexcerpt', 'slugdiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');\n //$hidden[] = 'my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.\n }\n return $hidden;\n }", "function th_hide_meta_box($hidden, $screen)\n {\n if ('themo_tour' == $screen->post_type) {\n\n //lets hide everything\n $hidden = array('postexcerpt', 'slugdiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');\n //$hidden[] = 'my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.\n }\n return $hidden;\n }", "function kurama_custom_meta() {\n add_meta_box( 'kurama_meta', __( 'Display Options', 'kurama' ), 'kurama_meta_callback', 'page','side','high' );\n}", "function dashscroll_get_meta_box( $meta_boxes ) {\n\t$prefix = '_';\n\t\n\t/* get sidebars */\n\t$sidebars = array(); \n \tif ( isset( $GLOBALS['wp_registered_sidebars'] ) ) { \n \t\t$sidebars = $GLOBALS['wp_registered_sidebars']; \n \t} \n \t$sidebars_choices = array(); \n \tforeach ( $sidebars as $sidebar ) { \n \t\t$sidebars_choices[ $sidebar['id'] ] = $sidebar['name']; \n \t} \n\n/* Page options\n/* ------------------------------------ */\t\n\t$meta_boxes[] = array(\n\t\t'id' => 'page-options',\n\t\t'title' => esc_html__( 'Page Options', 'dashscroll' ),\n\t\t'post_types' => array( 'page' ),\n\t\t'context' => 'advanced',\n\t\t'priority' => 'high',\n\t\t'autosave' => false,\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'sidebar_primary',\n\t\t\t\t'name' => esc_html__( 'Primary Sidebar', 'dashscroll' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'placeholder' => esc_html__( 'Select a sidebar', 'dashscroll' ),\n\t\t\t\t'options' => $sidebars_choices,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'layout',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'name' => esc_html__( 'Layout', 'dashscroll' ),\n\t\t\t\t'std' => 'inherit',\n\t\t\t\t'force_delete' => false,\n\t\t\t\t'max_file_uploads' => '4',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'inherit' => get_template_directory_uri() . '/functions/images/layout-off.png',\n\t\t\t\t\t'col-2cl' => get_template_directory_uri() . '/functions/images/col-2cl.png',\n\t\t\t\t\t'col-2cr' => get_template_directory_uri() . '/functions/images/col-2cr.png',\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t);\n\n/* Post options\n/* ------------------------------------ */\t\n\t$meta_boxes[] = array(\n\t\t'id' => 'post-options',\n\t\t'title' => esc_html__( 'Post Options', 'dashscroll' ),\n\t\t'post_types' => array( 'post' ),\n\t\t'context' => 'advanced',\n\t\t'priority' => 'high',\n\t\t'autosave' => false,\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'sidebar_primary',\n\t\t\t\t'name' => esc_html__( 'Primary Sidebar', 'dashscroll' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'placeholder' => esc_html__( 'Select a sidebar', 'dashscroll' ),\n\t\t\t\t'options' => $sidebars_choices,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'layout',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'name' => esc_html__( 'Layout', 'dashscroll' ),\n\t\t\t\t'std' => 'inherit',\n\t\t\t\t'force_delete' => false,\n\t\t\t\t'max_file_uploads' => '4',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'inherit' => get_template_directory_uri() . '/functions/images/layout-off.png',\n\t\t\t\t\t'col-2cl' => get_template_directory_uri() . '/functions/images/col-2cl.png',\n\t\t\t\t\t'col-2cr' => get_template_directory_uri() . '/functions/images/col-2cr.png',\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t);\n\t\n\treturn $meta_boxes;\n}", "function meta_box($post) {\r\n\t\t$map = get_post_meta($post->ID, '_mapp_map', true);\r\n\t\t$pois = get_post_meta($post->ID, '_mapp_pois', true);\r\n\r\n\t\t// Load the edit map\r\n\t\t// Note that mapTypes is hardcoded = TRUE (so user can change type, even if not displayed in blog)\r\n\t\t$map['maptypes'] = 1;\r\n\t\t$this->map($map, $pois, true);\r\n\r\n\t\t// The <div> will be filled in with the list of POIs\r\n\t\t//echo \"<div id='admin_poi_div'></div>\";\r\n\t}", "function pexeto_load_meta_boxes(){\n\t$portf_taxonomies=get_terms('portfolio_category', array('hierarchical'=>true, 'hide_empty'=>0));\n\t$portf_categories=array(array('id'=>'-1', 'name'=>'All Portfolio Categories'));\n\n\tforeach($portf_taxonomies as $taxonomy){\n\t\t$portf_categories[]=array(\"name\"=>$taxonomy->name, \"id\"=>$taxonomy->term_id);\n\t}\n\t$loader_portf_categories=array_merge(array(array('id'=>'hide','name'=>'Hide'), (array('id'=>'disabled','name'=>'Show:'))), $portf_categories);\n\n\t//load the post categeories\n\t$categories=get_categories('hide_empty=0');\n\t$pexeto_categories=array(array('id'=>'-1', 'name'=>'All Categories'));\n\tfor($i=0; $i<sizeof($categories); $i++){\n\t\t$pexeto_categories[]=array('id'=>$categories[$i]->cat_ID, 'name'=>$categories[$i]->cat_name);\n\t}\n\t\n\tglobal $pexeto_data, $new_meta_boxes, $new_meta_portfolio_boxes, $new_meta_post_boxes;\n\t\n\t$sliders=pexeto_get_created_sliders();\n\n\t/* ------------------------------------------------------------------------*\n\t * META BOXES FOR THE PAGES\n\t * ------------------------------------------------------------------------*/\n\n\t//the meta data for pages\n\t$new_meta_boxes =\n\tarray(\n\n\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-wrench\"></div>General Page Settings',\n\t\t\"type\" => \"heading\"),\n\n\tarray(\n\t\t\"title\" => \"Header\",\n\t\t\"name\" => \"slider\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => $sliders,\n\t\t\"std\" => 'none'\n\t\t),\n\n\t\tarray(\n\t\t\"title\" => \"Page Layout\",\n\t\t\"name\" => \"layout\",\n\t\t\"type\" => \"imageradio\",\n\t\t\"options\" => array(array(\"img\"=>PEXETO_IMAGES_URL.'layout-right-sidebar.png', \"id\"=>\"right\", \"title\"=>\"Right Sidebar Layout\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'layout-left-sidebar.png', \"id\"=>\"left\", \"title\"=>\"Left Sidebar Layout\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'layout-full-width.png', \"id\"=>\"full\", \"title\"=>\"Full Width Layout\")),\n\t\t\"std\" => 'right',\n\t\t\"description\" => 'Available for Default, Featured Posts and Contact page templates'\n\t\t),\n\n\t\tarray(\n\t\t\"name\" => \"sidebar\",\n\t\t\"title\" => \"Sidebar\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => $pexeto_data->pexeto_sidebars,\n\t\t\"description\" => 'You can select a sidebar for this page between the default one and another one that\n\t\tyou have created. If you would like to use another sidebar, rather than the default one, you can\n\t\tcreate a new sidebar in \"'.PEXETO_THEMENAME.' Options->Sidebars\" section and after that you will be able to select the\n\t\tsidebar here.'),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"show_title\",\n\t\t\"title\" => \"Display Page Title\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Use Global Settings\", \"id\"=>\"global\"),\n\t\tarray(\"name\"=>\"Display\", \"id\"=>\"on\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"off\")),\n\t\t\"std\" => 'global',\n\t\t\"description\" => 'Whether to display the page title or not - if \"Use Global Settings\" selected, the global setting selected in the\n\t\t'.PEXETO_THEMENAME.' Options &raquo; General &raquo; \"Display page title on pages\" field will be used.'),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"Custom full width background image\",\n\t\t\"name\" => \"full_bg\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"upload\",\n\t\t\"description\" => 'You can globally set a full width background image in the '.PEXETO_THEMENAME.' Options &raquo; Style Settings &raquo; \n\t\tGeneral section. In this field you can set a custom background image that will be displayed for this page only.'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-wrench\"></div>Featured Page Template Settings',\n\t\t\"type\" => \"heading\"),\n\t\t\n\t\t\tarray(\n\t\t\"name\" => \"featured_category\",\n\t\t\"title\" => \"Display blog posts from category\",\n\t\t\"type\" => \"select\",\n\t\t\"none\" => true,\n\t\t\"options\" => $pexeto_categories,\n\t\t\"std\" => '-1'\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\"title\" => \"Number of posts to display\",\n\t\t\"name\" => \"featured_post_number\",\n\t\t\"std\" => \"5\",\n\t\t\"type\" => \"text\"\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-image\"></div>Portfolio Settings - available only for Portfolio/Gallery page templates',\n\t\t\"type\" => \"heading\"),\n\n\t\tarray(\n\t\t\"name\" => \"post_category\",\n\t\t\"title\" => \"Display portfolio items from categories\",\n\t\t\"type\" => \"select\",\n\t\t\"none\" => true,\n\t\t\"options\" => $portf_categories,\n\t\t\"std\" => '-1',\n\t\t\"description\" => 'If \"All Categories\" selected, all the Portfolio items will be displayed. If another category is selected, only the Portfolio items that belong\n\t\tto this category or this category\\'s subcategories will be displayed. By selecting different categories, you can create multiple portfolio/gallery\n\t\tpages with different items displayed.'),\n\n\t\tarray(\n\t\t\"name\" => \"order\",\n\t\t\"title\" => \"Portfolio item order\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"By Date\", \"id\"=>\"date\"),\n\t\tarray(\"name\"=>\"By Custom Order\", \"id\"=>\"custom\")),\n\t\t\"std\" => 'date',\n\t\t\"description\" => 'If you select \"By Date\" the last created item will be displayed first. If you select by \"By Custom Order\"\n\t\tyou will have to set the order field of each of the items - the items with the smaller order number will be displayed first.'),\n\n\n\t\tarray(\n\t\t\"name\" => \"show_filter\",\n\t\t\"title\" => \"Show portfolio category filter\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Show\", \"id\"=>\"true\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"false\")),\n\t\t\"std\" => 'true',\n\t\t\"description\" => 'If \"Show\" selected, a category filter will be displayed above the portfolio items'),\n\n\t\tarray(\n\t\t\"name\" => \"show_info\",\n\t\t\"title\" => \"Show item info\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array( array(\"name\"=>\"Hide\", \"id\"=>\"false\"),\n\t\tarray(\"name\"=>\"Show\", \"id\"=>\"true\")),\n\t\t\"std\" => 'true',\n\t\t\"description\" => 'If \"Show\" selected, the portfolio item title and category will be displayed below the image (only for the Grid Gallery template)'\n\t\t),\n\n\n\t\tarray(\n\t\t\"title\" => \"Number of portfolio items to show per load/page\",\n\t\t\"name\" => \"post_number\",\n\t\t\"std\" => \"10\",\n\t\t\"type\" => \"text\"\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"image_width\",\n\t\t\"title\" => \"Image width\",\n\t\t\"type\" => \"text\",\n\t\t\"std\" => '290',\n\t\t\"description\" => 'The image width in the grid gallery. The image width is always static and the height is determined by the image ratio (only for the Grid Gallery template)'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"desaturate\",\n\t\t\"title\" => \"Black/white image effect\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array( array(\"name\"=>\"OFF\", \"id\"=>\"false\"),array(\"name\"=>\"ON\", \"id\"=>\"true\")),\n\t\t\"std\" => 'false',\n\t\t\"description\" => 'If this option is enabled, the images will be automatically converted to black/white (desaturated) and they will be colored on hover (only for the Grid Gallery template).'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"show_back_btn_end\",\n\t\t\"title\" => 'Show a \"Back to gallery\" button in the end of the image slider',\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array( array(\"name\"=>\"Hide\", \"id\"=>\"false\"),\n\t\tarray(\"name\"=>\"Show\", \"id\"=>\"true\")),\n\t\t\"std\" => 'false',\n\t\t\"description\" => 'If \"Show\" selected, a \"Back to gallery\" button will be appended to the last image of the image slider (only for the Grid Gallery template)'\n\t\t),\n\n\t\tarray(\n\t\t\"name\" => \"partial_loading\",\n\t\t\"title\" => 'Partial image loading in horizontal slider',\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array( array(\"name\"=>\"Disabled\", \"id\"=>\"false\"),\n\t\tarray(\"name\"=>\"Enabled\", \"id\"=>\"true\")),\n\t\t\"std\" => 'false',\n\t\t\"description\" => 'If \"Enabled\" selected, the slider will not wait for all the images to be loaded in order to get displayed. Before the slider is displayed it will load the amount of images you set in the \"Number of images to load before displaying the slider\" field below and after that the rest of the images will be displayed dynamically - as soon as the image gets loaded it will be displayed on the slider (only for the Grid Gallery template)'\n\t\t),\n\n\t\tarray(\n\t\t\"name\" => \"img_num_before_load\",\n\t\t\"title\" => \"Number of images to load before displaying the slider\",\n\t\t\"type\" => \"text\",\n\t\t\"std\" => '3',\n\t\t\"description\" => 'If partial image loaing is enabled above, this would be the number of images to load before displaying the horizontal slider. (only for the Grid Gallery template)'\n\t\t)\n\t\t\n\t\t);\n\n\n\n\t\t/* ------------------------------------------------------------------------*\n\t\t * META BOXES FOR THE PORTFOLIO POSTS\n\t\t * ------------------------------------------------------------------------*/\n\n\t\t$new_meta_portfolio_boxes =\n\t\tarray(\n\n\t\tarray(\n\t\t\"title\" => \"Preview Image URL\",\n\t\t\"name\" => \"preview\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"upload\",\n\t\t\"description\" => 'Main preview image. If the \"Custom Thumbnail URL\" field below is empty, the thumbnail image\n\t\twill be automatically generated by the image set in this field.'\n\t\t),\n\n\t\tarray(\n\t\t\"title\" => \"Custom Thumbnail URL (optional)\",\n\t\t\"name\" => \"thumbnail\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"upload\",\n\t\t\"description\" => 'By default the theme will generate automatically the thumbnail image for the item from\n\t\tthe bigger perview image, set in the \"Preview Image URL\" field below. However, if you prefer to manually set\n\t\tthis thumbnail image, you have to set its URL in this field.'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-image\"></div>Grid Gallery items settings only',\n\t\t\"type\" => \"heading\"),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"When clicked on the image open:\",\n\t\t\"name\" => \"action\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Preview image in lightbox\", \"id\"=>\"lightbox\"),\n\t\tarray(\"name\"=>\"The content of the item as slider\", \"id\"=>\"permalink\"),\n\t\tarray(\"name\"=>\"The content of the item on new page\", \"id\"=>\"permalink_new\"),\n\t\tarray(\"name\"=>\"Play Video\", \"id\"=>\"video\"),\n\t\tarray(\"name\"=>\"Custom link\", \"id\"=>\"custom\"),\n\t\tarray(\"name\"=>\"Do Nothing\", \"id\"=>\"nothing\")),\n\t\t\"std\" => \"lightbox\",\n\t\t\"description\" => \"Select the action to be performed after clicking on the portfolio item.\"\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"Custom Link/Video URL\",\n\t\t\"name\" => \"custom\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"text\",\n\t\t\"description\" => 'If \"Play Video\" selected above, you can insert a video URL here. If \"Custom link\" selected above, \n\t\tyou can insert the custom URL'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"Item Description\",\n\t\t\"name\" => \"description\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"textarea\",\n\t\t\"description\" => 'If \"Preview image in lightbox\" or \"Play Video\" has been selected in the clicking\n\t\taction field above, you can insert a description in this field that will be displayed below the image/video in lightbox.'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"show_content\",\n\t\t\"title\" => \"Show portfolio content on slider preview section\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Show\", \"id\"=>\"show\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"hide\")),\n\t\t\"std\" => 'show',\n\t\t\"description\" => 'If \"Show\" selected, a section containing the portfolio title, category, content and a \"Back to gallery\" button will be\n\t\tprepended to the image slider when the preview is opened in the Grid Gallery template.'),\n\t\t\n\t\t\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-image\"></div>Showcase and single page items settings',\n\t\t\"type\" => \"heading\"),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"Crop image from\",\n\t\t\"name\" => \"crop\",\n\t\t\"type\" => \"imageradio\",\n\t\t\"options\" => array(array(\"img\"=>PEXETO_IMAGES_URL.'crop-c.png', \"id\"=>\"c\", \"title\"=>\"Center\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'crop-t.png', \"id\"=>\"t\", \"title\"=>\"Top\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'crop-b.png', \"id\"=>\"b\", \"title\"=>\"Bottom\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'crop-l.png', \"id\"=>\"l\", \"title\"=>\"Left\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'crop-r.png', \"id\"=>\"r\", \"title\"=>\"Right\")\n\t\t),\n\t\t\"std\" => \"c\",\n\t\t\"description\" => 'This option is available when the thumbnail will be automatically generated from the preview image (when the \"Thumbnail URL\" field above is empty)- you can see above how the cropping settings will affect both portrait and landscape oriented images.\n\t\t(available for Showcase page template only)'\n\t\t),\n\n\t\t\tarray(\n\t\t\"name\" => \"show_title\",\n\t\t\"title\" => \"Show portfolio title on preview page\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Show\", \"id\"=>\"show\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"hide\")),\n\t\t\"std\" => 'show',\n\t\t\"description\" => 'If \"Show\" selected, the portfolio title will be displayed on the single portfolio page and on the\n\t\tPortfolio Showcase template.'),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"show_preview\",\n\t\t\"title\" => \"Show preview image on preview page\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Show\", \"id\"=>\"show\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"hide\")),\n\t\t\"std\" => 'show',\n\t\t\"description\" => 'If \"Show\" selected, the preview image will be displayed on the single portfolio page and on the\n\t\tPortfolio Showcase template.')\n\t\t\n);\n\t\t\n\t\t\n}", "function show() {\n global $post;\n\n $saved = $this->is_saved();\n\n // Container\n printf(\n '<div class=\"rwmb-meta-box\" data-autosave=\"%s\">',\n $this->meta_box['autosave'] ? 'true' : 'false'\n );\n\n wp_nonce_field( \"rwmb-save-{$this->meta_box['id']}\", \"nonce_{$this->meta_box['id']}\" );\n\n // Allow users to add custom code before meta box content\n // 1st action applies to all meta boxes\n // 2nd action applies to only current meta box\n do_action( 'rwmb_before', $this );\n do_action( \"rwmb_before_{$this->meta_box['id']}\", $this );\n\n // Print HTML code for all fields\n $current_tab = null;\n $tab_heading = $tab_body = '';\n\n foreach ( $this->fields as $field ) {\n if ( isset( $field['tab'] ) && $current_tab != $field['tab'] ) {\n $tab_id = sanitize_key( $field['tab'] );\n\n // Update tab heading.\n $tab_heading .= '\n\t\t\t\t\t<li class=\"meta-box-tab-' . $tab_id . ( empty( $current_tab ) ? ' active' : '' ) . '\">\n\t\t\t\t\t\t<a href=\"#' . $tab_id . '\">' . $field['tab'] . '</a>\n\t\t\t\t\t</li>';\n\n // Update tab body.\n $tab_body .= ( empty( $current_tab ) ? '' : '</div>' ) . '\n\t\t\t\t\t<div id=\"' . $tab_id . '\" class=\"meta-box-tabs-content ' . ( empty( $current_tab ) ? '' : 'hidden' ) . '\">';\n\n $current_tab = $field['tab'];\n }\n\n // Start output buffering to hold field output.\n ob_start();\n\n if ( method_exists( __CLASS__, 'get_class_name' ) ) {\n call_user_func( array( self::get_class_name( $field ), 'show' ), $field, $saved );\n } elseif ( class_exists( 'RWMB_Field' ) && method_exists( 'RWMB_Field', 'call' ) ) {\n RWMB_Field::call( 'show', $field, $saved );\n }\n\n $tab_body .= ob_get_contents();\n\n ob_end_clean();\n }\n\n if ( ! empty( $tab_heading ) ) {\n echo '\n\t\t\t\t<div class=\"meta-box-tabs\" id=\"' . $this->meta_box['id'] . '\">\n\t\t\t\t\t<ul class=\"meta-box-tabs-nav\">' . $tab_heading . '</ul>\n\t\t\t\t\t' . $tab_body . '</div>\n\t\t\t\t</div>\n\t\t\t\t<scr' . 'ipt>\n\t\t\t\t\t(function($) {\n\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . '\").on(\"click\", \".meta-box-tabs-nav a\", function(e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . ' .meta-box-tabs-nav li\").removeClass(\"active\");\n\t\t\t\t\t\t\t$(this).parent().addClass(\"active\");\n\t\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . ' .meta-box-tabs-content\").addClass(\"hidden\").filter($(this).attr(\"href\")).removeClass(\"hidden\");\n\t\t\t\t\t\t});\n\t\t\t\t\t})(jQuery);\n\t\t\t\t</scr' . 'ipt>';\n } else {\n echo worldmart_output('' . $tab_body) ;\n }\n\n // Include validation settings for this meta-box\n if ( isset( $this->validation ) && $this->validation ) {\n echo '\n\t\t\t\t<scr' . 'ipt>\n\t\t\t\tif ( typeof rwmb == \"undefined\" )\n\t\t\t\t{\n\t\t\t\t\tvar rwmb = {\n\t\t\t\t\t\tvalidationOptions : jQuery.parseJSON( \\'' , json_encode( $this->validation ) , '\\' ),\n\t\t\t\t\t\tsummaryMessage : \"' , esc_js( esc_html__( 'Please correct the errors highlighted below and try again.', 'worldmart' ) ) , '\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar tempOptions = jQuery.parseJSON( \\'' , json_encode( $this->validation ) . '\\' );\n\t\t\t\t\tjQuery.extend( true, rwmb.validationOptions, tempOptions );\n\t\t\t\t}\n\t\t\t\t</scr' . 'ipt>\n\t\t\t';\n }\n\n // Allow users to add custom code after meta box content\n // 1st action applies to all meta boxes\n // 2nd action applies to only current meta box\n do_action( 'rwmb_after', $this );\n do_action( \"rwmb_after_{$this->meta_box['id']}\", $this );\n\n // End container\n echo '</div>';\n }", "function register_metabox( $_genesis_theme_settings_pagehook ) {\n\t\tadd_meta_box( 'be-title-toggle', __( 'Title Toggle', 'genesis-title-toggle' ), array( $this, 'create_sitewide_metabox' ), $_genesis_theme_settings_pagehook, 'main', 'high' );\n\t}", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "function homepage_display() {\n add_meta_box('shiba2_homepage', 'オプション', 'func_ishomepage', 'page', 'normal', 'default');\n}", "function hide_or_show_contributorstalbe($post_type, $post){\n\t\tadd_meta_box('wiki-table-hide-or-show',__('Show / Hide Wiki-Contribution Table'),array($this,'wiki_shown_hidden'),'incsub_wiki','advanced','high');\n\t}", "function mobile_kiosk_post_meta_boxes_setup() {\n\t// hook adding the meta boxes \n\tadd_action( 'add_meta_boxes', 'mobile_kiosk_add_post_meta_boxes' );\n\t\n\t// Hook saving the meta boxes\n\tadd_action('save_post', 'mobile_kiosk_save_post_meta_boxes', 10, 2);\n}", "public function render_meta_boxes_preferences()\n {\n }", "function master_sidebar_taxonomy_meta_boxes() {\n\n\t$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $taxonomies ) {\n\t\treturn;\n\t}\n\n\tforeach ( $taxonomies as $tax ) {\n\t\t$tax = apply_filters( 'master_sidebar_meta_box_object', $tax );\n\t\tif ( $tax ) {\n\t\t\t$id = $tax->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$tax->labels->name, \n\t\t\t\t'master_sidebar_item_taxonomy_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$tax \n\t\t\t);\t\t\t\n\t\t}\n\t}\n}", "public function setup_meta_box() {\n\t\t\tadd_meta_box( 'add-shortcode-section', __( 'Shortcode', IFLANG ), array( $this, 'meta_box' ), 'nav-menus', 'side', 'high' );\n\t\t}", "function clonemaker_add_meta_box(){\r\n add_meta_box(\r\n 'clonemaker',\r\n 'Clone a Page',\r\n 'add_post_list',\r\n 'page',\r\n 'side'\r\n );\r\n\r\n\r\n}", "function idem_pop_up_add_meta_box()\n{\n add_meta_box(\n 'idem-pop-up-meta-box', // id, used as the html id att\n __( 'Idem Pop Up' ), // meta box title, like \"Page Attributes\"\n 'idem_pop_up_meta_box_cb', // callback function, spits out the content\n 'page', // post type or page. We'll add this to pages only\n 'side', // context (where on the screen)\n 'high' // priority, where should this go in the context?\n );\n}", "function MPU_seo_metabox( $object, $box ) { ?>\n<?php \nwp_nonce_field( basename( __FILE__ ), 'MPU_seo_nonce' ); \n$seo_arr = get_post_meta( $object->ID, \"seo\", false );\n?>\n<div class=\"mpu_seo MP_utils \">\n <h4>Use this to add simple SEO to the page.</h4>\n <div class=\"tabpanel fullwidth\">\n\t\t<nav>\n\t\t\t<a href=\"#seo\" class=\"active\">SEO</a>\n\t\t\t<a href=\"#opengraph\">OpenGraph</a>\n\t\t</nav>\n \t\t<div class=\"tabBody active\" id=\"seo\">\n\t\t\t<p>\n\t\t\t\t<label for=\"MPU_seo_title\"><?php _e( \"SEO Title\", 'example' ); ?></label>\n\t\t\t\t<input class=\"widefat\" type=\"text\" name=\"MPU_seo[]\" id=\"MPU_seo_title\" value=\"<?php echo $seo_arr[0][0] ?>\" size=\"30\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label for=\"MPU_seo_desc\"><?php _e( \"SEO Meta Description\", 'example' ); ?></label>\n\t\t\t\t<textarea class=\"widefat\" name=\"MPU_seo[]\" id=\"MPU_seo_desc\"><?php echo $seo_arr[0][1] ?></textarea>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label for=\"MPU_seo_keywords\"><?php _e( \"SEO Meta Keywords\", 'example' ); ?></label>\n\t\t\t\t<input class=\"widefat\" type=\"text\" name=\"MPU_seo[]\" id=\"MPU_seo_keywords\" value=\"<?php echo $seo_arr[0][2] ?>\" size=\"30\" />\n\t\t\t</p>\n \t</div>\n\t\t<div class=\"tabBody\" id=\"opengraph\">\n\t\t<h4>Optional Social media opengraph tags. If not set, the page will default to the regular SEO settings above.</h4>\n\t\t<p>\n\t\t\t<label for=\"MPU_og_title\"><?php _e( \"OpenGraph Title\", 'example' ); ?></label>\n\t\t\t<input class=\"widefat\" type=\"text\" name=\"MPU_seo[]\" id=\"MPU_og_title\" value=\"<?php echo $seo_arr[0][3] ?>\" size=\"30\" />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"MPU_og_desc\"><?php _e( \"OpenGraph Description\", 'example' ); ?></label>\n\t\t\t<textarea class=\"widefat\" name=\"MPU_seo[]\" id=\"MPU_og_desc\"><?php echo $seo_arr[0][4] ?></textarea>\n\t\t</p>\n\t\t<p>Choose an OpenGraph image for this page. This prevents Social media services from using a random image from your page.</p>\n\t\t<input type=\"text\" name=\"MPU_seo[]\" id=\"MPU_og_img\" value=\"<?php echo $seo_arr[0][5] ?>\" />\n\t\t<input id=\"MPU_seo_OG_upload-button\" type=\"button\" class=\"button mediapicker\" rel=\"MPU_og_img\" value=\"Upload Image\" />\n\t\t</div>\n </div>\n</div>\n<?php \n}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "function formulize_meta_box() {\n\t\tadd_meta_box('formulize_sectionid',\n\t __('Formulize', 'formulize_textlabel'),\n\t 'formulize_inner_custom_box',\n\t 'page'\n\t\t);\n}", "public function add_meta_boxes() {\n\t\tglobal $current_screen;\n\n\t\t$page_main = $this->_admin_pages[ 'vfb-pro' ];\n\n\t\tif ( $current_screen->id == $page_main && isset( $_REQUEST['form'] ) ) {\n\t\t\tadd_meta_box( 'vfb_form_switcher', __( 'Quick Switch', 'visual-form-builder-pro' ), array( &$this, 'meta_box_switch_form' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_items_meta_box', __( 'Form Items', 'visual-form-builder-pro' ), array( &$this, 'meta_box_form_items' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_media_button_tip', __( 'Display Forms', 'visual-form-builder-pro' ), array( &$this, 'meta_box_display_forms' ), $page_main, 'side', 'low' );\n\t\t}\n\t}", "function master_sidebar_post_type_meta_boxes() {\n\t\n\t$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $post_types ) {\n\t\treturn;\n\t}\n\n\t// Add metabox for each posttype\n\tforeach ( $post_types as $post_type ) {\n\t\t$post_type = apply_filters( 'master_sidebar_meta_box_object', $post_type );\n\t\tif ( $post_type ) {\n\t\t\t$id = $post_type->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$post_type->labels->name, \n\t\t\t\t'master_sidebar_item_post_type_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$post_type \n\t\t\t);\n\t\t}\n\t}\n}", "function do_meta_boxes( $page, $context ) {\n\t\t\treturn;\n\t\t\tif ( ( 'page' === $page || 'post' === $page ) && 'side' === $context )\n\t\t\t\tadd_meta_box( 'draft-publish-notify', __( 'Revision Workflow', $this->text_domain ), array( &$this, 'meta_box' ), $page, 'side', 'high' );\n\t\t}", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "static function metabox_at_post_edit_page(){\n\t\t \tadd_meta_box('matebox-to-handle-keywords', 'Affiliate Keywords', array(get_class(), 'metabox_to_deal_keywords'), 'product', 'advanced', 'high');\t \t\n\t\t }", "public function addMetaBox()\r\n {\r\n add_meta_box($this->id, esc_html__($this->title, 'firalabs-tv-show'), array(\r\n $this,\r\n 'render'\r\n ), 'firalabs_tv_show', $this->context, 'default');\r\n }", "public function linkages_meta_box() {\n\t\tglobal $post;\n\t\t\n\t\tif ( isset( $_GET['post'] ) )\n\t\t\t$post_ID = (int) $_GET['post'];\n\t\telse\n\t\t\t$post_ID = '';\n\t\t\n\t\techo '<input type=\"hidden\" name=\"_lingo_hidden\" id=\"_lingo_hidden\" value=\"1\" />';\n\t\t\n\t\tforeach( $this->post_meta as $key => $value ) {\n\t\t\techo '\n\t\t<p>\n\t\t\t<label for=\"' . $key . '\">' . $value . '</label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"' . $key . '\" id=\"' . $key . '\" value=\"' . get_post_meta( $post_ID, $key, true ) . '\" />\n\t\t</p>';\n\t\t}\n\t\t?>\n\t\t<?php\n\t}", "function gssettings_settings_boxes() {\n global $_gssettings_settings_pagehook;\n add_meta_box( 'gssettings-function-box', __( 'Genesis Sandbox Functions Settings', 'genesis' ), 'gssettings_function_box', $_gssettings_settings_pagehook, 'main' );\n \n add_meta_box( 'gssettings-homepage-widgets-box', __( 'Genesis Sandbox Homepage Widgets', 'genesis' ), 'gssettings_homepage_widgets_box', $_gssettings_settings_pagehook, 'main' );\n \n }", "function the_block_editor_meta_boxes()\n {\n }", "function idem_pop_up_inner_add_meta_box()\n{\n add_meta_box(\n 'idem-pop-up-inner-meta-box', // id, used as the html id att\n __( 'Idem Pop Up Inner Meta Box' ), // meta box title, like \"Page Attributes\"\n 'idem_pop_up_inner_meta_box_cb', // callback function, spits out the content\n 'idem_pop_up', // post type or page. We'll add this to pages only\n 'side', // context (where on the screen)\n 'low' // priority, where should this go in the context?\n );\n}", "function thd_re_post_info_show_box() {\n\tthd_meta_box_callback(thd_re_post_meta_box_fields(), 'post');\n}", "function ppes_admin_init(){\r\n\tadd_meta_box(\"et_post_meta\", \"ET Settings\", \"et_post_meta\", \"auctions\", \"normal\", \"high\");\r\n}", "function custom_meta_box($object)\n {\n wp_nonce_field(basename(__FILE__), \"meta-box-nonce\");\n\n ?>\n <div class=\"MetaHeader\"><p><b>Appear Post</b></p>\n <div>\n\n <label for=\"Main_Posts\">Main Posts</label>\n <?php\n /*------- Add CheckBox To Appear The Post In Main Posts Area --------*/\n $Main_value = get_post_meta($object->ID, \"Main_Posts\", true);\n\n if($Main_value == \"\")\n {\n ?>\n <input name=\"Main_Posts\" type=\"checkbox\" value=\"main\">\n <?php\n }\n else if($Main_value == \"main\")\n {\n ?> \n <input name=\"Main_Posts\" type=\"checkbox\" value=\"main\" checked>\n <?php\n }\n ?>\n </div>\n\n <div>\n\n <label for=\"Features_Posts\">Features Posts</label>\n <?php\n /*------- Add CheckBox To Appear The Post In Feature Posts Area --------*/\n $Feature_value = get_post_meta($object->ID, \"Features_Posts\", true);\n\n if($Feature_value == \"\")\n {\n ?>\n <input name=\"Features_Posts\" type=\"checkbox\" value=\"feature\">\n <?php\n }\n else if($Feature_value == \"feature\")\n {\n ?> \n <input name=\"Features_Posts\" type=\"checkbox\" value=\"feature\" checked>\n <?php\n }\n ?>\n </div>\n <p><b>Type Of Post</b></p>\n <div>\n\n <label for=\"Local_Posts\">Local Posts</label>\n <?php\n /*------- Add CheckBox To Check If The Type Of The Post Is Local --------*/\n $Local_value = get_post_meta($object->ID, \"Local_Posts\", true);\n\n if($Local_value == \"\")\n {\n ?>\n <input name=\"Local_Posts\" type=\"checkbox\" value=\"local\">\n <?php\n }\n else if($Local_value == \"local\")\n {\n ?> \n <input name=\"Local_Posts\" type=\"checkbox\" value=\"local\" checked>\n <?php\n }\n ?>\n </div>\n\n <div>\n\n <label for=\"World_Posts\">World Posts</label>\n <?php\n /*------- Add CheckBox To Check If The Type Of The Post Is World --------*/\n $World_value = get_post_meta($object->ID, \"World_Posts\", true);\n \n if($World_value == \"\")\n {\n ?>\n <input name=\"World_Posts\" type=\"checkbox\" value=\"world\">\n <?php\n }\n else if($World_value == \"world\")\n {\n ?> \n <input name=\"World_Posts\" type=\"checkbox\" value=\"world\" checked>\n <?php\n }\n ?>\n </div>\n </div>\n <?php \n }", "function greater_jackson_habitat_add_page_metaboxes() {\n\t\n\tglobal $post;\n\t\n\t// Each page except the Home Page\n\tif ( greater_jackson_habitat_is_editing_home() ) return;\n\t\n\tif ( get_post_meta( $post->ID, '_wp_page_template', true ) !== 'page-templates/about.php' ) {\n\t\n\t\tadd_meta_box(\n\t\t\t'gjh-subtitle',\n\t\t\t__( 'Subtitle', 'greater-jackson-habitat-theme' ),\n\t\t\t'greater_jackson_habitat_subtitle_metabox_content',\n\t\t\t'page',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t\t\n\t}\n\t\n\t/*\n\t\n\tadd_meta_box(\n\t\t'gjh-extra-meta',\n\t\t__( 'Extra Section', 'greater-jackson-habitat-theme' ),\n\t\t'greater_jackson_habitat_extra_metabox_content',\n\t\t'page',\n\t\t'normal',\n\t\t'low'\n\t);\n\t\n\t*/\n \n}", "function remove_extra_meta_boxes() {\n\tremove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts.\n\tremove_meta_box( 'revisionsdiv' , 'post' , 'normal' ); // custom fields for posts.\n\tremove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages.\n\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages.\n\tremove_meta_box( 'tagsdiv-post_tag' , 'page' , 'side' ); // page tags.\n\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' ); // post trackbacks.\n\tremove_meta_box( 'trackbacksdiv' , 'page' , 'normal' ); // page trackbacks.\n\tremove_meta_box( 'slugdiv', 'post', 'normal' ); // post slug.\n\tremove_meta_box( 'slugdiv', 'page', 'normal' ); // page slug.\n}", "function show_my_meta_box( $post ) {\n\t\t\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'civ_slider';\n\t\t$row_count = $wpdb->get_var( 'select count(*) from $table_name' );\n\t\t$slide_count = $row_count + 1;\n\t\t$post_id_check = $post->ID;\n\n\t\t$box_check = $wpdb->get_row($wpdb->prepare(\"select * from $table_name where post_id=%d\", $post_id_check));\n?>\n\t<form method=\"post\" >\n\t\t<label>Check here to add post to homepage slider: </label>\n\t\t<input type=\"checkbox\" name=\"chkd\" <?php if($box_check != null ){echo \"checked\";} ?> />\n\t\t<input type=\"hidden\" value=\"<?php echo $post->ID; ?>\" name=\"post_id\" />\n\t\t<input type=\"hidden\" value=\"<?php echo $slide_count; ?>\" name=\"slide_order\" />\n\t</form>\n\t\t<?php\n\t}", "function customize_meta_boxes()\n{\n // These remove meta boxes from POSTS\n //remove_post_type_support(\"post\",\"excerpt\"); //Remove Excerpt Support\n //remove_post_type_support(\"post\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"post\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"post\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"post\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"post\",\"editor\"); //Remove Editor Support\n //remove_post_type_support(\"post\",\"custom-fields\"); //Remove custom-fields Support\n //remove_post_type_support(\"post\",\"title\"); //Remove Title Support\n\n\n // These remove meta boxes from PAGES\n //remove_post_type_support(\"page\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"page\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"page\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"page\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"page\",\"custom-fields\"); //Remove custom-fields Support\n\n}", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "function _sp_custom_meta_boxes() {\n\t$post_id = ( isset( $_GET['post'] ) ) ? $_GET['post'] : ( isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : '');\n\n\t$template_file = get_post_meta( $post_id, '_wp_page_template', TRUE );\n\n\t/////////////////////////////////////////////////////\n\t// portfolio sort position\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'portfolio-sort-position',\n\t\t__( 'Sort Position', 'sp-theme' ),\n\t\t'_sp_custom_box_portfolio_sort_position',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// slider carousel shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'carousel-shortcode',\n\t\t__( 'Carousel Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_carousel_shortcode',\n\t\t'sp-slider',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_post',\n\t\t__( 'Auto Content Formating', 'sp-theme' ),\n\t\t'_sp_custom_box_wpautop',\n\t\t'post',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop page\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_page',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'page',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// wpatup portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_portfolio',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\tadd_meta_box(\n\t\t\t'sp_page_layout',\n\t\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t\t'_sp_custom_box_layout',\n\t\t\t'page',\n\t\t\t'side',\n\t\t\t'low'\n\t\t);\t\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_post_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_portfolio_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout product\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_product_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'product',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t// check if SEO enabled\n\tif ( sp_get_option( 'seo_enable', 'is', 'on' ) || ! sp_get_option( 'seo_enable', 'isset' ) ) {\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo post\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'post'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo page\n\t\t/////////////////////////////////////////////////////\n\t\t// don't show on maintenance page\n\t\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'sp_seo_settings',\n\t\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t\t'page'\n\t\t\t);\n\t\t}\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo woo product\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'product'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo portfolio\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'sp-portfolio'\n\t\t);\n\t}\n\t\n\t/////////////////////////////////////////////////////\n\t// testimonial submitter\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_testimonial_submitter',\n\t\t__( 'Testimonial Submitter', 'sp-theme' ),\n\t\t'_sp_custom_box_testimonial_settings',\n\t\t'sp-testimonial',\n\t\t'side',\n\t\t'core'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// advanced page options\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'sp_advanced_page_options',\n\t\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t\t'_sp_custom_box_advanced_page_options',\n\t\t\t'page'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// advanced post options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_post_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'post'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced portfolio options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_portfolio_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'sp-portfolio'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced woo product options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_woo_product_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'product'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-shortcode',\n\t\t__( 'Contact Form Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_shortcode',\n\t\t'sp-contact-form',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form general settings\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-settings',\n\t\t__( 'Contact Form Settings', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_settings',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\t\n\t/////////////////////////////////////////////////////\n\t// contact form content\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-content',\n\t\t__( 'Contact Form Content', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_content',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// contact form messages\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-messages',\n\t\t__( 'Contact Form Messages', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_messages',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// page builder page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'page-builder',\n\t\t\t__( 'Page Builder', 'sp-theme' ),\n\t\t\t'_sp_custom_box_page_builder',\n\t\t\t'page',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// alternate product image on hover\n\t/////////////////////////////////////////////////////\n\t/*\n\tadd_meta_box(\n\t\t'sp_alternate_product_image',\n\t\t__( 'Alternate Product Image', 'sp-theme' ),\n\t\t'_sp_custom_box_alternate_product_image',\n\t\t'product',\n\t\t'side',\n\t\t'low' \n\t);\n\t*/\n\n\t/////////////////////////////////////////////////////\n\t// custom product tabs\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_custom_product_tabs',\n\t\t__( 'Product Tabs Option', 'sp-theme' ),\n\t\t'_sp_custom_product_tabs',\n\t\t'product',\n\t\t'normal',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// featured video post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_featured_video',\n\t\t__( 'Featured Video', 'sp-theme' ), \n\t\t'_sp_custom_box_featured_video',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// faq sort order\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_faq_order',\n\t\t__( 'Sort Order', 'sp-theme' ), \n\t\t'_sp_custom_box_faq_order',\n\t\t'sp-faq',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\treturn true;\n}", "function MetaBox()\n\t{\n\t\t\n\t\t// wordpress global\n\t\tglobal $post;\n\n\t\t// grab meta data, if it exists\n\t\t$tlsp_text = get_post_meta( $post->ID, 'tlsp_text', true );\n\n\t\t// use a nonce for verification\n\t\twp_nonce_field( plugin_basename(__FILE__), 'tlsp_noncename' );\n\t\t\n\t\t// this is the html for the metabox\n\t\t$security = 1;\n\t\tinclude( 'metabox-html.php' );\n\t\t$security = 0;\n\t\t\n\t}", "function remove_dashboard_meta() {\r\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\r\n\t\t\t\tremove_meta_box( 'dashboard_welcome', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\r\n}", "function socialtoaster_add_custom_box()\n {\n if( function_exists( 'add_meta_box' )) {\n\n add_meta_box( 'socialtoaster_sectionid', get_option('socialtoaster_name') . \" Options\",\n 'socialtoaster_post_options', 'post', 'normal', 'high' );\n\n } else {\n\n // Otherwise just use the old functions\n add_action( 'simple_edit_form', 'socialtoaster_post_options' );\n\n }\n }", "function page_attributes_meta_box($post)\n {\n }", "function construction_realestate_posttype_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'construction-realestate-posttype' ), 'construction_realestate_posttype_cs_meta_callback' , 'agents');\n}", "function mobile_kiosk_add_post_meta_boxes() {\n\t\n\t// Gallery Options\n\tadd_meta_box(\n\t\t'gallery-options',\n\t\tesc_html__( 'Gallery Options', 'gallery-options' ),\n\t\t'mobile_kiosk_gallery_options_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'high' \n\t);\n\t\n\t// Gallery Slides\n\tadd_meta_box(\n\t\t'gallery-slides',\n\t\tesc_html__( 'Gallery Slides', 'gallery-slides' ),\n\t\t'mobile_kiosk_gallery_slides_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'low' \n\t);\n\t\n}", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "function page_show_sidebar_save($post_id, $post) {\n /*if ( !wp_verify_nonce( $_POST['page_show_sidebar_nonce'], plugin_basename(__FILE__) )) {\n return $post_id;\n }\n\n //is the user allowed to edit the post or page?\n if ( !current_user_can( 'edit_post', $post_id ))\n return $post_id;\n //@TODO:figur eout why thi is causing save to fail\n */\n\n $sidebar_checkbox_value = ( isset( $_POST['_show_sidebar'] ) && '1' === $_POST['_show_sidebar'] ) ? 1 : 0; //input var okay.\n update_post_meta( $post_id, '_show_sidebar', esc_attr( $sidebar_checkbox_value ) );\n}", "public function add_admin_meta_boxes() {\n\n\t\t$id = 'away_mode_options';\n\t\t$title = __( 'Away Mode', 'it-l10n-ithemes-security-pro' );\n\n\t\tadd_meta_box(\n\t\t\t$id,\n\t\t\t$title,\n\t\t\tarray( $this, 'metabox_away_mode_settings' ),\n\t\t\t'security_page_toplevel_page_itsec_settings',\n\t\t\t'advanced',\n\t\t\t'core'\n\t\t);\n\n\t\t$this->core->add_toc_item(\n\t\t array(\n\t\t\t 'id' => $id,\n\t\t\t 'title' => $title,\n\t\t )\n\t\t);\n\n\t}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "function pvplugin_add_meta_box() {\n\t\n\t$screens = array( 'policy' );\n\t\n\tforeach ( $screens as $screen ) {\n\t\n\t\tadd_meta_box(\n\t\t\t'myplugin_sectionid',\n\t\t\t__( 'Custom Meta Box', 'policy_library_plugin' ),\n\t\t\t array( &$this, 'pvplugin_meta_box_callback' ),\n\t\t\t$screen\n\t\t);\n\t\t\n\t\tadd_meta_box(\n\t\t\t'myplugin_side_sectionid',\n\t\t\t__( 'Policy Expire', 'policy_library_plugin' ),\n\t\t\t array( &$this, 'pvplugin_side_meta_box_callback' ),\n\t\t\t$screen,'side','high'\n\t\t);\n\t\t\n\t}\n\t}", "function siteorigin_panels_metaboxes() {\n\tforeach( siteorigin_panels_setting( 'post-types' ) as $type ){\n\t\tadd_meta_box( 'so-panels-panels', __( 'Page Builder', 'positive-panels' ), 'siteorigin_panels_metabox_render', $type, 'advanced', 'high' );\n\t}\n}", "public function register_meta_box() {\r\n add_meta_box( self::POST_TYPE . '-meta', 'Downloadable Resource URL', array ($this, 'meta_box_html'), self::POST_TYPE, 'side', 'default', '');\r\n }", "public function render_meta_hide_fields_for_post($post){\n\n\t\t// Add an nonce field so we can check for it later.\n\t\twp_nonce_field('post_metabox_hide_fields_for_post', 'post_metabox_hide_fields_for_post_nonce');\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_box_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_box_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_box_author.'\">'.__('Hide about author', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_related , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_related.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_related.'\">'.__('Hide related', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_date , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_date.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_date.'\">'.__('Hide published date', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_author.'\">'.__('Hide meta author', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_categories , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_categories.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_categories.'\">'.__('Hide meta categories', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_tags , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_tags.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_tags.'\">'.__('Hide meta tags', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_comments , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_comments.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for=\"'.self::$checkbox_post_comments.'\">'.__('Hide comments', THEME_NAME).'</label></div>';\n\t}", "function of_metabox_function(){\n require_once('of_meta_database.php');\n echo '<h2 class=\"text-left\">OF Metabox and Taxonomy Options<h2><br/>';\n of_settings_page();\n}", "function civ_meta_box() {\n\n\tadd_meta_box( 'my box', 'Civ Slider','show_my_meta_box', 'post' );\n\n\tfunction show_my_meta_box( $post ) {\n\t\t//\tThis will count the amount of slides total to insert for the slide order .\n\t\t\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'civ_slider';\n\t\t$row_count = $wpdb->get_var( 'select count(*) from $table_name' );\n\t\t$slide_count = $row_count + 1;\n\t\t$post_id_check = $post->ID;\n\n\t\t$box_check = $wpdb->get_row($wpdb->prepare(\"select * from $table_name where post_id=%d\", $post_id_check));\n?>\n\t<form method=\"post\" >\n\t\t<label>Check here to add post to homepage slider: </label>\n\t\t<input type=\"checkbox\" name=\"chkd\" <?php if($box_check != null ){echo \"checked\";} ?> />\n\t\t<input type=\"hidden\" value=\"<?php echo $post->ID; ?>\" name=\"post_id\" />\n\t\t<input type=\"hidden\" value=\"<?php echo $slide_count; ?>\" name=\"slide_order\" />\n\t</form>\n\t\t<?php\n\t}\n}", "public static function add_meta_box() {\n\t\tadd_meta_box( 'sponsor-meta', __( 'Sponsor Meta', self::$text_domain ), array( __CLASS__, 'do_meta_box' ), self::$post_type_name , 'normal', 'high' );\n\t}", "public function add_meta_boxes($post_type) {\n\n if ($post_type == 'post') {\n \tadd_meta_box(\n\t\t\t\t'post_metabox_hide_fields_for_post'\n\t\t\t\t,__('Hide fields',THEME_NAME)\n\t\t\t\t,array($this, 'render_meta_hide_fields_for_post')\n\t\t\t\t,$post_type\n\t\t\t\t,'side'\n\t\t\t\t,'default'\n\t\t\t);\n \t\n }elseif($post_type == 'page') {\n \tadd_meta_box(\n\t\t\t\t'post_metabox_hide_fields_for_page'\n\t\t\t\t,__('Hide fields',THEME_NAME)\n\t\t\t\t,array($this, 'render_metabox_hide_fields_for_page')\n\t\t\t\t,$post_type\n\t\t\t\t,'side'\n\t\t\t\t,'default'\n\t\t\t);\n }\n\n if ( in_array( $post_type, array('post','page') )) {\n\n\t\t\tadd_meta_box(\n\t\t\t\t'post_metabox_feature'\n\t\t\t\t,__('Feature',THEME_NAME)\n\t\t\t\t,array($this, 'render_meta_box_feature')\n\t\t\t\t,$post_type\n\t\t\t\t,'normal'\n\t\t\t\t,'high'\n\t\t\t);\n }\n\t}", "public static function registerMetaBoxes() {}", "function wiki_shown_hidden($post){\n\t\t\n\t\t$status = get_post_meta($post->ID,'wiki-contributons-status',true);\n\t\t\n\t?>\t\n\t\tTo hide the table check the box &nbsp;\n\t\t\n\t\t<input type=\"checkbox\" value=\"hide\" name=\"wiki-tabel-shownorhide\" <?php checked('hide',$status); ?> /> \n\t\n\t<?php\t\n\t}", "function vw_hospital_cs_savecustom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'w_hospital_cs_appoint_callback' , 'Appointment','normal', 'high' ); \n}", "function my_metabox_top_right() {\n add_meta_box( 'after-title-help', 'Come pubblicare e salvare le modifiche', 'my_top_right_help_metabox_content', array('antipasti', 'pizze-classiche', 'pizze-speciali', 'dolci'), 'side', 'high' );\n}", "function clix_uppe_meta_box(){\r\n\tglobal $post;\r\n\t// Use nonce for verification\r\n\techo '<input type=\"hidden\" name=\"clix_uppe_nonce\" id=\"clix_uppe_nonce\" value=\"' .\r\n\twp_create_nonce( plugin_basename(__FILE__) ) . '\" />';\r\n\t// Output checkboxes\r\n\t$options = array(\r\n\t\t'disable_home' \t\t\t=> 'Disable Listing on Home Page',\r\n\t\t'disable_tag' \t\t\t=> 'Disable on Tag Listings',\r\n\t\t'disable_archive' \t\t=> 'Disable Listing in Archives',\r\n\t\t'disable_search' \t\t=> 'Disable Listing in Search',\r\n\t\t'disable_unlesslogin' \t=> 'Disable Listing for Users Not Logged In',\r\n\t\t'disable_unlessshow'\t=> 'Disable but show available if Logged In'\r\n\t\t);\r\n\tforeach( $options as $option=>$legend ){\r\n?>\r\n<label for=\"clix_uppe_<?php echo $option; ?>\">\r\n\t<input type=\"checkbox\" name=\"_clix_uppe_<?php echo $option; ?>\" id=\"clix_uppe_<?php echo $option; ?>\" <?php\r\n\t\tif ( get_post_meta( $post->ID, \"_clix_uppe_$option\", true ) == '1' )\r\n\t\t\techo ' checked=\"checked\"';\r\n\t?>/>\r\n\t<?php echo $legend; ?>\r\n</label>\r\n<br /><?php\r\n\t}\r\n}", "function agnosia_post_excerpt_settings_meta_box() {\r\n\r\n\t\tglobal $post;\r\n\r\n\t\twp_nonce_field( basename( __FILE__ ) , 'agnosia_post_excerpt_settings_nonce' );\r\n\r\n\t\t$meta_value = get_post_meta( $post->ID, 'agnosia_post_meta' , true ) ;\r\n\r\n\t\t$value_post = isset( $meta_value['content_show_post_excerpt_in_post'] ) ? $meta_value['content_show_post_excerpt_in_post'] : '' ;\r\n\t\t$value_index = isset( $meta_value['content_show_post_excerpt_in_index'] ) ? $meta_value['content_show_post_excerpt_in_index'] : '' ;\r\n\r\n\t\t?>\r\n\r\n\t\t<div id=\"post-excerpt-settings-container\" class=\"settings-container\">\r\n\r\n\t\t\t<ul class=\"category-tabs\" id=\"post-excerpt-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#excerpt-into-post\"><?php _e( 'Into post' , 'agnosia' ); ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#excerpt-into-index\"><?php _e( 'Into index' , 'agnosia' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<div id=\"excerpt-into-post\" class=\"tabs-panel\">\r\n\r\n\t\t\t\t<input type=\"checkbox\" name=\"agnosia_post_meta[content_show_post_excerpt_in_post]\" id=\"content_show_post_excerpt_in_post\" value=\"true\" <?php agnosia_is_checked_meta_box_setting( $value_post , 'true' ); ?>>\r\n\t\t\t\t<label for=\"content_show_post_excerpt_in_post\"><?php _e( 'Show excerpt before content' , 'agnosia' ) ; ?></label><br />\r\n\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"excerpt-into-index\" class=\"tabs-panel hidden\">\r\n\r\n\t\t\t\t<input type=\"radio\" name=\"agnosia_post_meta[content_show_post_excerpt_in_index]\" id=\"content_show_post_excerpt_in_index[0]\" value=\"true\" <?php agnosia_is_checked_meta_box_setting( $value_index , 'true' ); agnosia_default_meta_box_setting( $value_index ); ?>>\r\n\t\t\t\t<label for=\"content_show_post_excerpt_in_index[0]\"><?php _e( 'Show excerpt' , 'agnosia' ) ; ?></label><br />\r\n\r\n\t\t\t\t<input type=\"radio\" name=\"agnosia_post_meta[content_show_post_excerpt_in_index]\" id=\"content_show_post_excerpt_in_index[1]\" value=\"false\" <?php agnosia_is_checked_meta_box_setting( $value_index , 'false' ); ?>>\r\n\t\t\t\t<label for=\"content_show_post_excerpt_in_index[1]\"><?php _e( 'Show content' , 'agnosia' ) ; ?></label><br />\r\n\r\n\t\t\t</div>\r\n\r\n\t\t</div>\r\n\r\n\t\t<?php\r\n\r\n\t}", "function vulcan_page_meta_boxes() {\r\r\n $meta_boxes = array(\r\r\n \"short_desc\" => array(\r\r\n \"name\" => \"short_desc\",\r\r\n \"title\" => \"Short Description\",\r\r\n \"description\" => \"Add short description to your pages.\",\r\r\n \"type\" => \"textarea\"\r\r\n ),\r\r\n \"page_thumbnail_image\" => array(\r\r\n \"name\" => \"page_thumbnail_image\",\r\r\n \"title\" => \"Thumbnail Image\",\r\r\n \"description\" => \"Add thumbnail image url, will be use for your page thumbnail, for example in Services child pages list.\",\r\r\n \"type\" => \"text\"\r\r\n )\r\r\n );\r\r\n \r\r\n return $meta_boxes;\r\r\n}", "final public function add_meta_boxes()\n {\n foreach ((array)$this->GetHooks() as $hook) :\n if (!$hook['edit']) {\n continue;\n }\n foreach ((array)$hook['permalink'] as $post_type) :\n remove_meta_box('tagsdiv-' . $this->Archive, $post_type, 'side');\n remove_meta_box($this->Archive . 'div', $post_type, 'side');\n endforeach;\n endforeach;\n }", "function mf_SALF_artist_meta_show_box() {\n global $artist_meta_box, $post;\n \n // Use nonce for verification\n \n\techo '<input type=\"hidden\" name=\"artist_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n \n echo '<table class=\"form-table\">';\n\n foreach ($artist_meta_box['fields'] as $field) {\n // get current post meta data\n \n switch ($field['type']) {\n \n\t\t\t\tcase 'select2':\n\t\t\t\t$meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\t\t\n\t\t\t\techo '<div style=\"margin: 12px 0; float: left;\">';\n\t\t echo '<h2><label for=\"', $field['id'], '\">', $field['name'], '</label></h2>';\n\t\t\t\techo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $ID => $option) {\n echo '<option value=\"'. $ID .'\" ', $meta == $ID ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n\t\t\t\techo '</div><h2 style=\"clear: both; margin: 12px 0;\">Additional Speakers</h2>';\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox';\n\t\t\t\t$meta = get_post_meta($post->ID, 'mf_SALF_artist_meta_checks', true);\n\t\t\t\tif (!$meta){\n\t\t\t\t\t$meta = array();\n\t\t\t\t}\n\t\techo '<div style=\"margin-right: 12px; float: left;\">';\n echo '<label for=\"', $field['id'], '\">', $field['name'], '</label>';\n\n \n\t\techo '<input type=\"checkbox\" name=\"mf_SALF_artist_meta_checks[]\"value=\"', $field['id'], '\" id=\"', $field['id'], '\"', in_array($field['id'],$meta) ? ' checked=\"checked\"' : '', ' />';\n\t\techo '</div>';\n\t\t\t break;\n\t\t}\t\t\t \n \n }\n \n echo '</table>';\n}" ]
[ "0.72019047", "0.7086406", "0.68498", "0.6814837", "0.68131715", "0.6740622", "0.673663", "0.6707423", "0.67020327", "0.66827893", "0.6675523", "0.663549", "0.6614527", "0.66097975", "0.6607575", "0.6593614", "0.6585065", "0.65683", "0.6562835", "0.6537237", "0.65305334", "0.65129066", "0.65112066", "0.6502337", "0.6495093", "0.64845645", "0.64827615", "0.64774024", "0.6472447", "0.6466204", "0.64614284", "0.64415073", "0.6435972", "0.6432978", "0.6425588", "0.6421137", "0.6413464", "0.6412433", "0.6411441", "0.6409105", "0.6406801", "0.63798684", "0.6373144", "0.6369561", "0.6355439", "0.6339554", "0.63317466", "0.63297933", "0.63243484", "0.63223684", "0.6314527", "0.6312425", "0.63050157", "0.63042885", "0.6297385", "0.62933236", "0.62691146", "0.62469226", "0.62443453", "0.62395394", "0.6224326", "0.6214699", "0.62095916", "0.6207788", "0.6199688", "0.61995196", "0.61956614", "0.6194356", "0.61906123", "0.6189531", "0.61766577", "0.61754596", "0.616867", "0.6167304", "0.61628866", "0.616288", "0.61621064", "0.61541945", "0.6149136", "0.61438286", "0.61437416", "0.6124242", "0.6123668", "0.6123541", "0.6117548", "0.6105753", "0.61054724", "0.6104207", "0.61019146", "0.6097796", "0.6097621", "0.6095209", "0.60939676", "0.60837007", "0.60816664", "0.60774016", "0.6072647", "0.6069805", "0.606495", "0.60619867" ]
0.743109
0
verify this came from the our screen and with proper authorization
function page_show_sidebar_save($post_id, $post) { /*if ( !wp_verify_nonce( $_POST['page_show_sidebar_nonce'], plugin_basename(__FILE__) )) { return $post_id; } //is the user allowed to edit the post or page? if ( !current_user_can( 'edit_post', $post_id )) return $post_id; //@TODO:figur eout why thi is causing save to fail */ $sidebar_checkbox_value = ( isset( $_POST['_show_sidebar'] ) && '1' === $_POST['_show_sidebar'] ) ? 1 : 0; //input var okay. update_post_meta( $post_id, '_show_sidebar', esc_attr( $sidebar_checkbox_value ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkAuth();", "public function checkAuth();", "public function isAuth() {\n $connector = Mage::getSingleton('vidtest/connector')->getApiModel($this->getApiModelCode());\n return $connector->isLoggedIn();\n }", "public function authorize(): bool\n {\n return MoonShineAuth::guard()->check();\n }", "protected function authorization()\n {\n $this->gate();\n\n FlowDash::auth(function ($request) {\n return app()->environment('local') ||\n Gate::check('viewFlowDash', [$request->user()]);\n });\n }", "public function authorize()\n {\n return !empty(session(\"borrower_id\"));\n }", "public function authorize()\n {\n return auth()->user()->is_author($this->route('board'));\n }", "public function authorize()\n { \n //放入購物車時驗證權限 無則發送403\n $v = Auth::user()->verify;\n if(!$v){\n return false;\n }\n return true;\n \n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuth() {}", "function userValid()\n\t{\n\t\tif ( ! $this->_isAuthorized() ){\n\t\t\n\t\t\t\t// Store Query String - user will be redirected to this page (query_string)\n\t\t\t\t// after logging in - [if used in login.php]\n\t\t\t\t$dataBank =& new DataBank($this->sessionKey);\n\t\t\t\t$dataBank->setVar('s_c_pending_query',$_SERVER['QUERY_STRING']);\n\t\t\t\t\n\t\t\t\t// Not Auth - Redirect to admin login page\n\t\t\t\theader('HTTP/1.1 301 Moved Permanently');\n\t\t\t\theader(\"Location: index.php?_a=login\");\n\t\t\t\theader('Connection: close');\n\t\t\t\texit;\t\n\t\t}\n\t}", "public function verify(){\n if (!isset($_SESSION['user_api_key']) || !isset($_SESSION['user_id'])){\n header(\"Location: \" . Utility::getUrlFor('login'));\n return;\n }\n if (isset($_POST[\"channel_id\"])){\n if (!isset($_SESSION)){\n session_start();\n }\n $_SESSION[\"channel_id\"] = $_POST[\"channel_id\"];\n header(\"Location: \" . Utility::getUrlFor('admin/home'));\n }\n else{\n $this->view();\n }\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function isAuth();", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public function check_auth()\n {\n if (isset($_SESSION['atk_email'])) {\n redirect(base_url().\"permintaan/\");\n }\n }", "private function compare_with_login()\n {\n }", "public function checkAccess()\n {\n // need to be modified for security\n }", "public function checkAuthentication() {}", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "private function checkAuth()\n {\n $this->isAuthenticated = false;\n $isLoggedIn = is_user_logged_in();\n\n if ($isLoggedIn) {\n $this->username = wp_get_current_user()->user_login;\n $id = wp_get_current_user()->ID;\n $meta = get_user_meta($id, 'wp_capabilities', false);\n foreach ($meta[0] as $key => $value) {\n $k = strtoupper($key);\n if (($k == $this->PluginRole) or\n ($k == $this->AdminRole)) {\n $this->isAuthenticated = true;\n }\n }\n }\n }", "public function authorize()//AQUI QUE VALIDA USUÀRIO\r\n {\r\n return true;\r\n }", "public function authorize()\n {\n return Auth::check() && optional($this->route('spacecraft'))->fleet_id == auth()->user()->fleet_id;\n }", "public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "abstract public function authorize();", "abstract public function authorize();", "public function testShowUnauthicatedAccess(): void { }", "public function authorize()\n {\n $user = \n return false;\n }", "private function _checkAuth()\n {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }", "public function isAuthorized() {}", "public function authorize () : bool\n\t{\n\t\treturn true;\n\t}", "public function authorize () : bool\n\t{\n\t\treturn true;\n\t}", "public function authorize () : bool\n\t{\n\t\treturn true;\n\t}", "public function authorize ()\n\t{\n\t\treturn true;\n\t}", "public function authorize ()\n\t{\n\t\treturn true;\n\t}", "protected function checkAuthorized()\n\t{\n\t\tglobal $USER;\n\t\tglobal $APPLICATION;\n\n\t\tif (!$USER->IsAuthorized())\n\t\t\t$APPLICATION->AuthForm(Localization\\Loc::getMessage(\"SPOL_ACCESS_DENIED\"));\n\t}", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize(): bool\n {\n return config('fenerum.webhook_auth_username') === $this->getUser() &&\n config('fenerum.webhook_auth_password') === $this->getPassword();\n }", "public function authDoView(){\n if(!$this->authUser()){\n echo '{\"status\":-1,\"result\":\"/user/login?prePage='.$_SERVER['HTTP_REFERER'].'\"}';\n exit();\n }\n }", "public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "protected function Authorized(){\n // usuario\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return true;\n }\n \n // Autorizar la solicitud atendiendo a la activacion del usuario\n\t\t$uType = $this->getUserType();\n\t\t\n\t\tif ($uType >= USER_CLIENT){ // Ok user is active\n\t\t\t$res = DBHelper::Select('users', '*', \"email='{$this->user}'\");\n\t\t\t//if ((!$res[0]['name'] || !$res[0]['phone']) && $res[0]['expiration'] - time() >= 7 * 24 * 3600){\n\t\t\t//\t$this->url = Url::Parse(\n // \t\t\"http://\".HTTP_HOST.\"/__www/set-user-info.php?user={$this->user}&success_url=\" . urlencode((string)$this->data->url)\n \t//\t);\n\t\t\t//}\n\t\t}elseif(DBHelper::is_user_registered($this->user) > 0){ \n // La activacion del usuario ha expirado. Redirigir a\n // la pagina de recarga\n\t\t\t\n /** @var Url url */\n $url = $this->getUrlFromData();\n if (stripos($url->host, HTTP_HOST) === FALSE){\n\t\t\t $this->url = Url::Parse(ACCOUNT_EXPIRED_URL . \"&user={$this->user}&mobile={$this->data->mobile}&success_url=\". urlencode((string)$this->data->url));\n }\n\t\t}else {\n // Se permite acceso solamente al servidor de Aurora\n return FALSE;\n }\n \n return true;\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n return true; // I do not know how to create authorisation for the back-end and the time constraints of the project did not allow me to get to this stage either. It is something I would like to learn to do in the future however.\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function checkAuthentication() \n {\n if(!isset($this->userInfo['admin_id']) && empty($this->userInfo['admin_id'])) \n {\n redirect('login/loginPage');\n }\n }", "protected function checkScreenAction() {}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "protected function isPermissionCorrect() {}", "public function testSucceededDifferentUserLoggedInButAdmin(): void\n {\n self::$httpAuthorizationToken = AccessTokenFixture::DATA['access-token-yannis']['id'];\n\n $this->checkSucceeded();\n }", "public function authorize() {\n\t\t$this->db = new Database();\n\t\t$this->user = ( 'rjg70' );//$_SERVER['REMOTE_USER']);\n\t\t$this->db->query( 'SELECT * FROM users WHERE crsid = :id' );\n\t\t$this->db->bind( ':id', $this->user );\n\t\t$row = $this->db->single();\n\n\t\t//print_r($row);\n\t\tif ( $row ) {\n\t\t\tif ( $row[\"authorised\"] ) {\n\t\t\t\t$this->admin = $row[\"admin\"];\n\t\t\t\t$this->type = $row[\"type\"];\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n $staffSn = $this->staff_sn;\n $staff = Staff::visible()->find($staffSn);\n $authority = app('Authority');\n if (!empty($staffSn) && empty($staff)) {\n return false;\n }\n $departmentId = $this->department_id;\n if (!empty($departmentId) && !$authority->checkDepartment($departmentId)) {\n return false;\n }\n $brandId = $this->brand_id;\n if (!empty($brandId) && !$authority->checkBrand($brandId)) {\n return false;\n }\n return true;\n }", "private function authorize()\n {\n $authorized = FALSE;\n\n if ( in_array(ee()->session->userdata['group_id'], ee()->publisher_setting->can_admin_publisher()))\n {\n $authorized = TRUE;\n }\n\n if (ee()->session->userdata['group_id'] == 1)\n {\n $authorized = TRUE;\n }\n\n if ( !$authorized)\n {\n ee()->publisher_helper_url->redirect(ee()->publisher_helper_cp->mod_link('view_unauthorized'));\n }\n }", "function auth(){\n\t\t//TODO auth implementieren\n\t\treturn true;\n\t}", "public function checkSecurity() {\n }", "public function testSucceededDifferentUserLoggedInButModerator(): void\n {\n self::$httpAuthorizationToken = AccessTokenFixture::DATA['access-token-leslie']['id'];\n\n $this->checkSucceeded();\n }", "function authorize()\n {\n try {\n $authRequest = $this->heimdall->validateAuth();\n $authRequest->setUser(new UserEntity());\n $this->heimdall->completeAuth($authRequest);\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "public function authorize()\n {\n // $user = app( 'auth' )->user();\n // $rsvp = Rsvp::findOrFail( $this->rsvps );\n\n // return $rsvp->user_id === $user->id;\n return true;\n }", "public function authorize()\n {\n return $this->header('Authorization') === config('services.salla.webhook_secret');\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return True;\n }", "public function authorize()\n {\n return True;\n }", "public function authorize()\n {\n return True;\n }", "public function authorize()\n {\n return True;\n }", "public function authorize()\n {\n return True;\n }", "public function authorize()\n {\n return True;\n }", "public function authorize()\n {\n return True;\n }", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function checkAccess()\n {\n if (!$this->isAuthenticated()) {\n header('HTTP/1.1 401 Unauthorized');\n exit();\n }\n }", "public function isAuthenticated()\n {\n //get headers from postMan\n $this->headers = getallheaders();\n //cut the first word from the header, ex:Bearer, the space before and after the token\n $token = !empty($this->headers['Authorization']) ? trim(substr($this->headers['Authorization'], 6)) : null;\n\n //request in the database to take the token\n $tokenDataBase = $this->authToken->getToken();\n\n //the token in the header must exist and be the same as in the base date in order to make the request\n if (!$token || $token !== $tokenDataBase) {\n http_response_code(401);\n echo json_encode(array(\"message\" => \"Unauthorized\"));\n exit;\n }\n }", "public function authorize()\n {\n return (Auth::user()->type === User::VENDEDOR);\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return Auth::user()->data_confirmacao != null;\n }", "public function authorize()\t{\n\t\treturn true;\n\t}", "public function authorize(): bool\n {\n return null !== $this->getGame()->findPlayerByName($this->request->get('nickname'));\n }", "public function authorize (): bool\n {\n return true;\n }", "public function authorize()\n {\n //return false; //return False will stop everything\n\t\treturn true;\n }", "public function authorize(): bool\n {\n return true;\n }", "abstract protected function auth();", "public function authorize(){\n\t\treturn true;\n\t}", "public function authorize(){\n\t\treturn true;\n\t}", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n $auth_user = User::find(ApiHelper::getAuthenticatedUser()->id);\n $user_id = $this->route('user_id');\n if($user_id == $auth_user->id || ApiHelper::isPatient($user_id)){\n\n // ugly code; since iOs sends back <null> instead of null -> need to filter out these fields\n $fields = array('firstName', 'lastName', 'phone', 'gender', 'dateOfBirth', 'email');\n foreach ($fields as $f) {\n if($f == '<null>'\n )\n {\n echo $this->$f;\n $this->$f == null;\n }\n }\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n {\n //dd($this);\n return true;\n }", "public function authorize()\n {\n return Auth::user()->type == 1;\n }", "function authorize($request) {\n return $this->Session->get('auth-valid');\n }", "private function checkValidUser() {\n return;\n if(!($this->getData('key') == $this->sessionId && isset($_SESSION['user']) && isset($_SESSION['valid']) && $_SESSION['valid'] === true)) {\n $this->output = array(\n 'success' => false,\n 'key' => 'kMIvl'\n );\n\n // Terminate the call now, user isn't allowed to perform this action\n $this->renderOutput(true);\n }\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }", "function authorization() {\n\t\t//~ screening user data\n\t\t$user_data=mysql::screening_array($_POST);\n\t\t//~ Find a user with the same name and taking his key\n\t\t$find_user=mysql::query(\"SELECT * FROM `users` WHERE `login_user`='\".$user_data['login'].\"';\", 'assoc');\n\t\tif (!$find_user) {\n\t\t\t//~ user not found\n\t\t\tself::$error='Пользователь не найден';\n\t\t\treturn false;\n\t\t} else {\n\t\t\t//~ user found\n\t\t\t$passwd=md5($find_user['key_user'].$user_data['passwd'].SECRET_KEY); //~ password hash with the private key and user key\n\t\t\tif ($passwd==$find_user['passwd_user']) {\n\t\t\t\t//~ passwords match\n\t\t\t\t$_SESSION['id_user']=$find_user['id_user'];\n\t\t\t\t$_SESSION['login_user']=$find_user['login_user'];\n\t\t\t\t//~ if user select \"remember me\"\n\t\t\t\tif (isset($user_data['remember']) and $user_data['remember']=='on') {\n\t\t\t\t\t$cook_code=$this->generateCode(15);\n\t\t\t\t\t$user_agent=mysql::screening($_SERVER['HTTP_USER_AGENT']);\n\t\t\t\t\tmysql::query(\"INSERT INTO `session` (`id_sess`, `id_user`, `code_sess`, `user_agent_sess`) VALUES (NULL, '\".$find_user['id_user'].\"', '\".$cook_code.\"', '\".$user_agent.\"');\");\n\t\t\t\t\tsetcookie(\"id_user\", $_SESSION['id_user'], time()+3600*24*30);\n\t\t\t\t\tsetcookie(\"code_user\", $cook_code, time()+3600*24*30);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t//~ passwords not match\n\t\t\t\tself::$error='Пользователь не найден или пароль не совпадают';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function authorize()\n {\n $user = Auth::user();\n $vendor = $user->vendor->first();\n $isOwner = AvailableFacility::where(array(\n 'id' => $this->id,\n 'vendor_id' => $vendor->id\n ))->count();\n if ($isOwner) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n\t\t\n\n \n return false;\n }" ]
[ "0.66954374", "0.66954374", "0.6611234", "0.65510195", "0.65388316", "0.65146744", "0.64678615", "0.64601415", "0.6454204", "0.6433053", "0.64254737", "0.6416964", "0.6399467", "0.63704", "0.6370227", "0.636569", "0.6356984", "0.6345048", "0.6336429", "0.6330203", "0.6327351", "0.63213", "0.6316193", "0.63003457", "0.6292168", "0.6282551", "0.627798", "0.627798", "0.6276581", "0.62668836", "0.62646806", "0.62415594", "0.62381124", "0.62381124", "0.62381124", "0.6232954", "0.6232954", "0.62267166", "0.6220506", "0.6210937", "0.62105685", "0.6203369", "0.6202579", "0.6197369", "0.61924374", "0.61882687", "0.61878216", "0.61878216", "0.6183635", "0.61733466", "0.61733156", "0.61521083", "0.61512", "0.6135655", "0.6135214", "0.6133359", "0.61312085", "0.61299706", "0.6128364", "0.61271167", "0.6124007", "0.61223775", "0.61213046", "0.61149305", "0.61136913", "0.6112967", "0.6112967", "0.6112967", "0.6112967", "0.6112967", "0.6112967", "0.6112967", "0.6110711", "0.6107921", "0.61060184", "0.6104729", "0.6101919", "0.6101919", "0.6101566", "0.60994387", "0.6094514", "0.608919", "0.60872924", "0.60855305", "0.60850877", "0.60807043", "0.6075228", "0.6075228", "0.60724515", "0.6071704", "0.6069932", "0.60680234", "0.6063841", "0.60636115", "0.60614544", "0.6060725", "0.60576963", "0.6056179", "0.6055605", "0.6054811", "0.6053182" ]
0.0
-1
Initiera dessa privata identifierare
public function __construct() { $this->model = new Model(); $this->view = new View(); $this->cart = array(); $this->productArray = array(); $this->productVar = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function metodo_privado() {\n }", "public function __construct()\n {\n $this->_id = new ObjectID;\n $this->secret = uniqid(bin2hex(random_bytes(2)), true);\n }", "public function truycapvao_private_cha(){\n }", "public function init() {\n \n $this->_helper->acl->allow('public',null);\n }", "public function __construct() {\n parent::__construct();\n $this->privileges = [\"page-all\", \"page-services-dhcpserver-editstaticmapping\"];\n $this->change_note = \"Deleted DHCP static mapping via API\";\n }", "public function init()\n {\n parent::init();\n \n if (isset($this->target->type) && $this->target->type == 'VIA' && isset($this->via)) {\n $this->target->id = $this->via->id;\n }\n else {\n $this->target->id = $this->member->profile->id;\n $this->_minPrivilege = null;\n $this->target->acl->owner = true;\n }\n }", "public function __construct() {\n parent::__construct();\n $this->privileges = [\"page-all\", \"page-services-dhcpserver\"];\n\n }", "public function setPrivate()\r\n {\r\n $this->data['security'] = 'private';\r\n }", "public function __construct() {\n parent::__construct();\n $this->privileges = [\"page-all\", \"page-system-user-authserver\"];\n $this->change_note = \"Deleted LDAP authentication server via API\";\n }", "function __construct(){\n\t\tparent::__construct();\n\t\t$hak_akses = array(0,2);\n\t\tno_access($hak_akses);\n\t}", "public function init() {\n extract($this->data);\n\n // Generate unique ID\n $this->data['id'] = uniqid();\n }", "public function __construct()\n {\n $this->rememberIdentifier = bin2hex(random_bytes(32));\n $this->enabled = '0';\n $this->confirmationToken = bin2hex(random_bytes(32));\n }", "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->password = \"\";\n\n\t}", "public function __construct()\n {\n # code...\n //$this->auth = $auth;\n // $this->$id = $id;\n }", "function __construct(){\r\n\t\t$this->mIDCache\t\t\t= MY_DB_IN . \"-\" . SAFE_VERSION . \"-\" . SAFE_REVISION;\r\n \t\t$this->init();\r\n }", "function\t__construct( $_id='') {\n\t\tparent::__construct( \"AktivitaetenMitarbeiter\", \"LfdNr\") ;\n\t\t$this->setIdKey( \"UniqueID\") ;\n\t\tif ( strlen( $_id) > 0) {\n\t\t\t$this->setId( $_id) ;\n\t\t} else {\n\t\t}\n\t}", "function AbstractPrivilegePeer() {\n }", "public function init()\n {\n // Name might be set from outside\n if (!$this->MCONF['name']) {\n $this->MCONF = $GLOBALS['MCONF'];\n }\n $this->id = (int)GeneralUtility::_GP('id');\n $this->CMD = GeneralUtility::_GP('CMD');\n $this->perms_clause = $this->getBackendUser()->getPagePermsClause(1);\n $this->menuConfig();\n $this->handleExternalFunctionValue();\n }", "function __construct1($uid) {\n \n $this->uid = $uid;\n }", "public function __construct()\n {\n $this->setIdentificationRules();\n }", "public function __construct ()\n {\n $this->Sec = new Packages_Security();\n }", "function __construct()\n {\n $this->reqAdminToMod = Base_GeneralFunctions::asBoolean(Container_Config::brokerByID('OnlyAdminsCanTagTalks', 'false')->getKey('value'));\n $this->reqCreatorToMod = Base_GeneralFunctions::asBoolean(Container_Config::brokerByID('OnlyTagCreatorsCanEditTalkTags', 'true')->getKey('value'));\n return parent::__construct();\n }", "public function init() {\n\t$this->_helper->_acl->allow('fa',null);\n\t$this->_helper->_acl->allow('admin',null);\n\t$this->_messages = new Messages();\n\t$this->_replies = new Replies();\n \n }", "public function setPrivate()\n {\n $this->private = true;\n }", "public function __construct()\n {\n $this->author_id = (Auth::check()?Auth::user()->id:0);\n }", "public function __construct()\n {\n //generate identifier only once, here a 64 characters length code\n $this->code = substr(hash('sha512', bin2hex(openssl_random_pseudo_bytes(64))), 0, 64);\n }", "function __construct($_ID){\n \t$this->m_ID = $_ID;\n }", "public function __construct()\n\t{\n\t\t$this->tokenId = bin2hex(random_bytes(32));\n\t}", "private function __construct0() {\n\t\t\t$this->idea_uniqueId = $this->createUniqueId();\n\t\t}", "function __construct($keyID,$vCode,$characterID=null) {\n\t\tparent::__construct($keyID,$vCode);\n\t\t$this->scope=\"account\";\n\t\t$this->page=\"APIKeyInfo.xml.aspx\";\n\t\t$this->char=array();\n\t\t$this->kam=null;\n\t\t$this->expires=null;\n\t}", "function __construct()\n\t{\n\t\t$this->name = uniqid();\n\t}", "function __construct($id=\"\") {\n\t\tself::$id = $id;\n\t}", "public function __construct()\n {\n $this->author_id = (\\Auth::check()?\\Auth::user()->id:0);\n }", "public function init()\n {\n \t$this->auth=Zend_Auth::getInstance();\n\n\t\tif($this->auth->hasIdentity()){\n\n\t\t\t$this->authIdentity=$this->auth->getIdentity();\n\n\t\t}\n\n\t\t$this->registry=Zend_Registry::getInstance();\n }", "public function __construct($idCredito)\n {\n $this->idCredito = $idCredito;\n }", "public function GenPrivate() {\n\t\topenssl_pkey_export($this->res, $privKey);\n\t\treturn $privKey;\n\t}", "public function __construct()\n {\n $this->uid = null;\n $this->fields = array('username' => '',\n 'password' => '',\n 'emailAddr' => '',\n 'isActive' => false);\n }", "public function __construct() {\n \n parent::__construct();\n \n $this->sessionUser = Zf_SessionHandler::zf_getSessionVariable(\"ttv_identificationCode\");\n \n \n }", "public function __construct(){\n\t\t$this->uid = null;\n\t\t$this->fields = array('username'=>'', 'emailAddr'=>'', 'isActive'=> false);\n\t}", "public function __construct($uid)\n {\n //\n $this->uid = $uid;\n }", "public function __construct()\n\t{\n// \t\t$this->code = substr(md5(uniqid(rand(), true)), 0, 6);\n\t}", "function __construct() \n\t{\n\t\tparent::__construct();\n\n\t\t$this->attributes['id']\t\t= $this->createID('KOPERASI');\n\n\t\tif(isset($this->ext_appends))\n\t\t{\n\t\t\t$this->appends \t\t\t= array_merge($this->appends, $this->ext_appends);\n\t\t}\n\n\t}", "public function __construct($_loginId = NULL,$_password = NULL,$_licenseKey = NULL,$_accountNumber = NULL)\n {\n parent::__construct(array('loginId'=>$_loginId,'password'=>$_password,'licenseKey'=>$_licenseKey,'accountNumber'=>$_accountNumber),false);\n }", "public function init()\n {\n \t$auth = Zend_Auth::getInstance();\n \tif($auth->hasIdentity()){\n \t\t$this->identity = $auth->getIdentity();\n \t}\n }", "public function __init(){}", "public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n }", "public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "public function is_private()\n {\n }", "protected function _construct()\n\t{\n\t\t$this->_init('affiliate/withdrawal', 'id');\n\t}", "public function __construct() {\n $this->id_merchant = \\Session::get('authMerchant.id_merchant');\n }", "function __construct() { \r\n\t\t\t\t$this->id;\r\n\t\t\t\t$this->cpf;\r\n\t\t\t\t$this->email;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n }", "public function __construct()\n {\n $this->initCurrentUser();\n }", "public function setAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "public function __construct()\n {\n $this->fileExtensionPermissions['allow'] = GeneralUtility::uniqueList(strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['allow']));\n $this->fileExtensionPermissions['deny'] = GeneralUtility::uniqueList(strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['deny']));\n }", "public function init() {\r\n\t\tregister_setting( $this->key, $this->key );\r\n\t}", "private function __construct() \n {\n $this->id = random_int(1, 10);\n }", "public function __construct()\n {\n $this->user_id = Auth::id();\n }", "public function __construct() {\n \t\n\t \tinclude('../conexion/datos.php');\n \n\t $this->id_modulo = 14;\n\t $this->NameCookieApp = $NomCookiesApp;\n\t //$this->permisosInst = new permisosController();\n\t }", "public function __construct($aid) {\n\t\t$this->profile['AffiliateID'] = $aid;\n\t}", "public function __construct($aid) {\n\t\t$this->profile['AffiliateID'] = $aid;\n\t}", "public function __construct()\n\t{\n\t\t$this->can_delete = true;\n\t\t$this->can_download_to_browser = true;\n\t\t$this->can_download_to_file = true;\n\t}", "public function generateAuthKey() {\n $this->llaveAutenticacion = Yii::$app->security->generateRandomString();\n }", "private function private_method() {}", "public function __construct()\n\t{\n\t\t$this->registry = ipsRegistry::instance();\n\t\t$this->settings =& $this->registry->fetchSettings();\n\t\t$this->memberData =& $this->registry->member()->fetchMemberData();\n\t}", "public function _init() {\r\n\r\n }", "public function __construct()\n\t\t{\n\t\t\t$this->_username = \"lenykoskey\";\n\t\t\t$this->_apiKey = \"abbfa09e621a6ece272a254e3fcd910657ff46e88f82db205499603d06dda908\";\n\n\t\t}", "function __construct()\n\t{\n\n\t\tparent::__construct();\n\t\t\n\t\t$this->data['isnewmember'] = false;\n\t\t\n\t\t\n\t\t$this->load->library('ion_auth');\n\n\t\t$this->phrases = $this->config->item('words');\n\n\t\t$this->data['site_settings'] = $this->config->item('site_settings');\n\t\t\t\t\n\t\t$this->isdemo = FALSE;\n\t}", "public function __construct1($id) {\n\t \t$this->user_id=$id;\n\t \n\t}", "public function _init(){}", "function __construct($serverid, $data_private_path = \"\")\n {\n // if it doesn't exists, just stop the process\n // because we can't initialize the chat from the external API\n if ($data_private_path == \"\")\n $data_private_path = dirname(__FILE__) . \"/../data/private\";\n $cachefile = pfcGlobalConfig :: _GetCacheFile($serverid, $data_private_path);\n if (! file_exists($cachefile))\n {\n $this->errors[] = _pfc(\"Error: the cached config file doesn't exists\");\n return;\n }\n // then intitialize the pfcglobalconfig\n $params = array();\n $params[\"serverid\"] = $serverid;\n $params[\"data_private_path\"] = $data_private_path;\n $this->c = pfcGlobalConfig :: Instance($params);\n }", "function __construct()\n {\n parent::__construct();\n $this->config->load('permissions/dati_permissions');\n }", "public function __construct()\n {\n parent::__construct();\n //$this->output->enable_profiler(TRUE);\n if ( ! $this->session->user_id)\n {\n redirect('', 'refresh');\n }\n $this->privileges = $this->MUser_privileges->get_by_ref_user($this->session->user_id);\n }", "function __construct()\r\n {\r\n $this->id = 0;\r\n $this->name = \"\";\r\n $this->surname = \"\";\r\n $this->username = \"\";\r\n $this->email = \"\";\r\n $this->password = \"\";\r\n }", "private function init()\n\t{\n\t\tif (!$this->CI->session->userdata(AUTH_AFFILIATION_ARRAY))\n\t\t{\n\t\t\t$this->CI->session->set_userdata(AUTH_AFFILIATION_ARRAY, array());\n\t\t}\n\t\t\n\t\tif (!$this->CI->session->userdata(AUTH_FUNCTION_ARRAY))\n\t\t{\n\t\t\t$this->CI->session->set_userdata(AUTH_FUNCTION_ARRAY, array(AUTH_FUNCTION_DEFAULT_ATTRIBUTE));\n\t\t}\n\t\t\n\t\t// Copy to the local variable to avoid repeat access!\n\t\t$this->functions = $this->CI->session->userdata(AUTH_FUNCTION_ARRAY);\n\t\t$this->affiliations = $this->CI->session->userdata(AUTH_AFFILIATION_ARRAY);\n\t}", "protected function init() {\n if ($this->uuid == null)\n $this->uuid = Uuid::uuid1(Mixy::$app->uuidNodeProvider->getNode())->toString();\n }", "public function __construct()\n {\n parent::__construct('BaseMtc_permissions');\n }", "public function __construct()\n\n\t{\n\n\t\t$this->CI =& get_instance();\n\n\t\t\n\n\t\tdefine('AUTH_REG_SUCCESS', 0);\n\n\t\tdefine('AUTH_REG_USERNAME_IN_USE', 1);\n\n\t\tdefine('AUTH_REG_DATABASE_ERROR', 2);\n\n\t}", "private static function init() {\n\t\t\tself::$_ownerName = function_exists( 'get_current_user' ) ?\n\t\t\t\tget_current_user() :\n\t\t\t\t'unknown';\n\t\t\tself::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );\n\t\t\tself::$_abspathLength = strlen( ABSPATH );\n\t\t\tself::$_processID = mt_rand( 0, 32000 );\n\n\t\t\t// Process ID may be `false` on errors.\n\t\t\tif ( ! is_numeric( self::$_processID ) ) {\n\t\t\t\tself::$_processID = 0;\n\t\t\t}\n\t\t}", "public function _initialize()\r\n {\r\n $this->user_id = 1;\r\n parent::_initialize();\r\n }", "public function __construct()\n {\n $this->admin = Admin::where('user_id', Auth::id())->first();\n\n $this->admin_id = $this->admin->id;\n }", "function __construct()\n {\n $this->tablename = 'tmst_admin';\n \n\t\t$this->fieldlist = array('id_admin','user','pass');\n \n\t\t$this->sql_orderby = 'user';\n\t\t\n\t\t$this->fieldlist['id_admin'] = array('pkey' => 'y');\n\t\t$this->fieldlist['user'] = array('pkey' => 'y');\n\t\t \n\t\t\t\t\n }", "public function __construct($_manuId = NULL,$_manuName = NULL)\n\t{\n\t\tparent::__construct(array('manuId'=>$_manuId,'manuName'=>$_manuName));\n\t}", "function cilien_autoriser(){}", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "protected function is_private()\n {\n }", "public function __construct()\r\n\t\t{\r\n\t\t\t$this->api_id = self::API_ID;\r\n\t\t\t$this->api_secret = self::API_SECRET;\r\n\t\t}", "public function __construct() {\n parent::__construct();\n $this->privileges = [\"page-all\", \"page-firewall-trafficshaper-limiter\"];\n $this->change_note = \"Deleted firewall traffic shaper limiter bandwidth via API\";\n }", "public function _construct(){\n $lb_request_id = 0;\n if (isset($_SESSION['LB_Session_RequestId']))\n {\n if($_SESSION['LB_Session_RequestId'] > 0)\n {\n $lb_request_id = $_SESSION['LB_Session_RequestId'];\n }\n }\n if(empty($lb_request_id)){\n $clientId = Mage::getStoreConfig('lbconfig_section/lb_settings_group/client_id_field');\n $lb_request_id = Lb_Points_Helper_Data::getLbRequestId($clientId);\n $_SESSION['LB_Session_RequestId'] = $lb_request_id;\n }\n Lb_Points_Helper_Data::init($lb_request_id);\n //Lb_Points_Helper_Data::init();\n }", "private function privateDummy()\n {\n }" ]
[ "0.6732709", "0.670029", "0.6491009", "0.64277196", "0.62333584", "0.6206105", "0.620549", "0.6115013", "0.6097648", "0.6055264", "0.6037686", "0.6016362", "0.6014468", "0.5981909", "0.59678763", "0.59293747", "0.5891823", "0.5885448", "0.58668804", "0.58544296", "0.58438426", "0.57934356", "0.5777127", "0.57762235", "0.5764649", "0.57505816", "0.5750495", "0.5747777", "0.574617", "0.57344466", "0.57244056", "0.5722952", "0.57013446", "0.569826", "0.5694775", "0.5684443", "0.5673278", "0.5672557", "0.565962", "0.5652368", "0.565115", "0.5650003", "0.56495506", "0.5645673", "0.56395096", "0.5633787", "0.5633787", "0.5633224", "0.5633224", "0.5633224", "0.5620646", "0.5619119", "0.5618098", "0.56135714", "0.5606311", "0.56062686", "0.5602438", "0.5602438", "0.5602438", "0.5582081", "0.5581947", "0.5579761", "0.5575464", "0.55708915", "0.5568489", "0.5568489", "0.5567392", "0.5563398", "0.55625707", "0.5552861", "0.5543717", "0.55292946", "0.5528989", "0.5528352", "0.5527807", "0.55207014", "0.5518336", "0.55144155", "0.55075383", "0.5506555", "0.55050766", "0.55010986", "0.5497142", "0.54927605", "0.5490295", "0.548785", "0.54870504", "0.5486631", "0.54861", "0.54860216", "0.54860216", "0.54860216", "0.54860216", "0.54860216", "0.54860216", "0.54860216", "0.54860216", "0.54854125", "0.54846156", "0.5479121", "0.5477572" ]
0.0
-1
Populate the model from request data, creating a new model.
abstract public function createFromRequest(Request $request = null, array $otherAttributes = array());
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createModel()\n {\n $class = get_class($this->data);\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "protected function newModel($data)\n{\n\t$className = Model::className($this->query['from']);\n\t$model = new $className($this->query['from']);\n\n\tif (!$this->cachedTemplate) {\n\t\t$this->cachedTemplate = $model->getTemplate();\n\t}\n\n\t$model->setTemplate($this->cachedTemplate);\n\n\tif ($data) {\n\t\t$model->setValues($data);\n\t\t$model->isInDb(true);\n\t}\n\n\treturn $model;\n}", "public function __construct($request)\n {\n #TODO change the request data type\n $id = isset($request[0]) ? $request[0] : null;\n $modelClass = $this->getModelClass();\n $this->model = new $modelClass($id);\n }", "function populate_from_request();", "public function load()\n {\n $input = $this->getCleanInput();\n $this->populate($input);\n }", "public function populateModels()\n {\n }", "protected final function parse_model_request() {\n\t \n\t /* get the model from the request */\n\t $modeldata = (is_array($this->request['model'])) ? $this->request['model'] : array();\n\t /*\n\t *\tlooks something like this now:\n\t\t *\t$modeldata = array(\n\t\t * \t'title'\t\t\t\t=> 'my title',\n\t\t * \t'content'\t\t\t=> 'some content',\n\t\t * 'any backbone key'\t=> 'any backbone value'\n\t\t * );\n\t\t */\n\t \t \n\t \t/* the formatting of the parsed output */\n \t$parsed = array();\n \t\n \t/* get all data packages, also the core packages and parse them */\n\t \t$data_packages = array_merge($this->core_data_packages, $this->properties->custom_data_packages ); \n\t \tforeach ($data_packages as $data_package) {\n\t\t \t$parsed[$data_package] = array();\n\t \t} \t\n \t/*\n\t *\tlooks something like this now:\n\t\t *\t$parsed = array(\n\t\t * \t'post'\t\t\t\t\t\t\t=> array(),\n\t\t * \t'postmeta'\t\t\t\t\t\t=> array(),\n\t\t * \t'comment'\t\t\t\t\t\t=> array(),\n\t\t *\t\t'any registered data package' \t=> array()\n\t\t * );\n\t\t */\n \n \t/* get default values if some are set in the extended handler class */\n \t$parsed = $this->filter_pre_parse_model_request($parsed, $this->request_method);\n \t\n \t/* start parsing */\n\t\tforeach ($modeldata as $id_backbone => $value) {\n\t\t\t\n\t\t\t/* check if the data package field is registered */\n\t\t\t/* only data_package_fields registered in backbone pass this gate */\n\t\t\tif ( ! array_key_exists($id_backbone, $this->properties->data_package_fields) )\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t// shorthand for data package fields\n\t\t\t$field = $this->properties->data_package_fields[$id_backbone]; // any backbone key\n\t\t\t$data_package = $field['data_package']; // the name of the package, e.g. 'post' or 'author'\n\t\t\t$wp_id = $field['id']; // the wp key name, e.g. post_title, post_parent\t\t\n\n\t\t\t/* some preprocessing */\n\t\t\tif( isset($field['options']) ) {\n\t\t\t\n\t\t\t\t/* this field is read only, so throw it away, we ignore this value */\n\t\t\t\tif( array_key_exists('readonly', $field['options']) && $field['options']['readonly'] )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t/* validate the data */\n\t\t\t\tif( array_key_exists('validate', $field['options']) ) { \t\t\t\t\t\n\t\t\t\t\t$validate_callback = $field['options']['validate'];\n\t\t\t\t\t\n\t\t\t\t\t/* execute the validation callback e.g. esc_attr(), esc_url(), .. */\n\t\t\t\t\tif(function_exists($validate_callback))\n\t\t\t\t\t\t$value = call_user_func ($validate_callback, $value);\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* sort all data in a nice way */\n\t\t\t$parsed[$data_package][$wp_id] = $value;\n\t\t\t/*\n\t\t *\tlooks something like this now:\n\t\t\t *\t$parsed = array(\n\t\t\t * \t'post'\t\t=> array( 'post_title' \t=> 'my title',\n\t\t\t * \t\t\t\t\t\t\t 'post_content'=> 'my content',\n\t\t\t *\t\t\t\t\t\t\t 'any wp key'\t=> 'value from backbone'\n\t\t\t *\t\t\t\t\t\t\t),\n\t\t\t * \t'postmeta'\t=> array(...),\n\t\t\t * \t'comment'\t=> array(...)\n\t\t\t * );\n\t\t\t */\n\t\t\t\n\t\t}\t\t\t\t\t\n\t\t\n\t\t/* override some key, values with filter in the child class */\n \t$parsed = $this->filter_post_parse_model_request($parsed, $this->request_method);\n \t\n \t/* there might be an error \t */\n \tif( ! $parsed ) {\n\t \t$this->set_error( 500, 'request could nt be parsed' );\n\t \t$parsed = array();\n \t}\n \t\n \t// successfully set our data\n \t$this->parsed_model_request = $parsed;\t \t\t\n\t}", "public function buildModel() {}", "public function __construct(Request $request)\n {\n // $this->model = $model;\n }", "protected function prepareModel($data = [])\n {\n return $this->getModel();\n }", "protected function createModelInstance(array $data) {\n\n $this->entity = $this->model_instance ?? new $this->model_class();\n\n foreach($this->fields as $field) {\n\n $this->entity->$field = $data[$field];\n\n }\n\n if(!empty($this->object_name)) {\n $obj_name = $this->object_name;\n $this->$obj_name = $this->entity;\n }\n }", "public function init()\n {\n\t\t$this->user_model = new Application_Model_Users;\n\t\t$this->request_model = new Application_Model_Requests;\n\t\t$this->material_model = new Application_Model_Materials;\n\t\t$this->course_model = new Application_Model_Courses;\n\t\t$this->comment_model = new Application_Model_Comments;\n\t\t$this->category_model = new Application_Model_Categories;\n \t$this->assoc_rules_model = new Application_Model_Assocrules;\n }", "protected abstract function loadModel($data, $entry);", "public function create($modelData);", "private function loadModel()\n {\n require_once APP . '/model/User.php';\n // create new \"model\" (and pass the database connection)\n $this->model = new User($this->db);\n }", "public function get_model() {\r\n\t\t$model = null;\r\n\t\t\r\n\t\t//Includes the shared model, if exists.\r\n\t\t$path_shared = 'models/shared.php';\r\n\t\tif (file_exists($path_shared)) include($path_shared);\r\n\t\t\r\n\t\t//Checks if the models' file for the current controller exists.\r\n\t\t$path_current_model = 'models/'.$this->controller.'.php';\r\n\t\t\r\n\t\tif (file_exists($path_current_model)) {\r\n\t\t\t//If the file exists, checks if the class for the current action exists.\r\n\t\t\tinclude($path_current_model);\r\n\t\t\t$class_name = ucwords($this->controller).ucwords($this->action).\"Model\";\r\n\t\t\t\r\n\t\t\tif (class_exists($class_name)) {\r\n\t\t\t\t//Creates the class and populates its properties.\r\n\t\t\t\t$model = new $class_name();\r\n\t\t\t\t\r\n\t\t\t\t//Iterates through all request values and check for properties with the same name.\r\n\t\t\t\tforeach ($_REQUEST as $key => $value) {\r\n\t\t\t\t\tif (property_exists($model, $key)) {\r\n\t\t\t\t\t\t$model->$key = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $model;\r\n\t}", "public function loadModel()\n {\n $data = ModelsPegawai::find($this->dataId);\n $this->name = $data->name;\n $this->email = $data->email;\n $this->username = $data->username;\n $this->password = $data->password;\n $this->level = $data->level;\n\n }", "abstract protected function prepareModels();", "public function create($data)\n\t{\n\t\t$model = $this->model->create($data);\n\n\t\treturn $model;\n\t}", "public function __construct(HOPDONG $model, Request $request)\n {\n $this->model = $model;\n }", "public function createModel($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->createModelWithOptions($request, $runtime);\n }", "public function create(array $request): Model;", "public function loadModel()\n {\n $data = Contest::find($this->modelId);\n $this->title = $data->title;\n $this->description = $data->description;\n $this->image = $data->image;\n $this->featured_image = $data->featured_image;\n\n }", "public function initial($data=null,$model=null){\n if($this->model==null){\n $this->model=$model;\n }\n return $this;\n }", "public function create($data=null) {\n\t\t\treturn $this->_create_model_instance(parent::create($data));\n\t}", "private function createModel($data)\n {\n $model = new SensorModel();\n\n if (isset($data['id'])) {\n $model->id = intval($data['id']);\n }\n if (isset($data['bluetooth_address'])) {\n $model->bluetooth_address = $data['bluetooth_address'];\n }\n if (isset($data['name'])) {\n $model->name = $data['name'];\n }\n if (isset($data['description'])) {\n $model->description = $data['description'];\n }\n if (isset($data['active'])) {\n $model->active = boolval($data['active']);\n }\n\n return $model;\n }", "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "public function initModel(Application $app)\n {\n $this->vetementModel = new VetementModel($app);\n $this->typeModel = new TypeModel($app);\n }", "public function fillModelAttributes($model, $request, $fields)\n {\n }", "public function populate_from_request()\r\n\t\t{\t\t\r\n\t\t\t// Interate through each class method.\r\n\t\t\tforeach(get_class_methods($this) as $method) \r\n\t\t\t{\t\t\r\n\t\t\t\t$key = str_replace('set_', '', $method);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t// If there is a request var with key matching\r\n\t\t\t\t// current method name, then the current method \r\n\t\t\t\t// is a set mutator for this request var. Run \r\n\t\t\t\t// it (the set method) with the request var. \r\n\t\t\t\tif(isset($_GET[$key]))\r\n\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t\t$this->$method($_GET[$key]);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function newEntryModel();", "public function __construct() {\n\n\t\t// get Session data\n\t\t$this->session = Session::get();\n\n\t\t// get Response format (json, unless html is explicitly asked for)\n\t\t(strpos($_SERVER['HTTP_ACCEPT'], 'html')) ? $this->format = 'html' : $this->format = 'json';\n\n\t\t// get URI data\n\t\t$this->uri = new URI();\n\n\t\t// get Request method\n\t\t$this->method = $this->crud_map[$_SERVER['REQUEST_METHOD']];\n\n\t\t// get Model\n\t\t$this->model = $this->uri->get('model', 'index');\n\n\t\t// get Request body\n\t\t//\t\t@todo: combine this switch into a simpler statement that uses php://input for all methods\n\t\t//\t\t\t\tand can tell if data is url encoded (parse_str) or json.\n\t\tswitch($this->method) {\n\t\t\tcase 'create':\n\t\t\t\t$this->data = $_POST;\n\t\t\t\tbreak;\n\t\t\tcase 'read':\n\t\t\t\t$this->data = $_GET;\n\t\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\tparse_str(file_get_contents('php://input'), $_put);\n\t\t\t\t$this->data = $_put;\n\t\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\tparse_str(file_get_contents('php://input'), $_delete);\n\t\t\t\t$this->data = $_delete;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// get User data\n\t\t$this->user = new User(Session::get('user_id',0));\n\t}", "protected function loadModelByData($data)\n {\n $model = $this->getModel();\n if ($model) {\n $primaryAttribute = $this->getPrimaryAttribute();\n if ($primaryAttribute) {\n $name = $primaryAttribute->getName();\n $value = (isset($data[$name])) ? $primaryAttribute->clean($data[$name]) : null;\n if ($value) {\n $this->loadModelByAttribute($name, $value);\n }\n }\n }\n return $this;\n }", "protected function createModel()\n {\n $model = $this->info['model'];\n\n $modelName = basename(str_replace('\\\\', '/', $model));\n\n // make it singular\n $modelName = Str::singular($modelName);\n\n $this->info['modelName'] = $modelName;\n\n $modelOptions = [\n 'model' => $this->info['model'],\n '--module' => $this->moduleName,\n ];\n $options = $this->setOptions([\n 'index',\n 'unique',\n 'data',\n 'uploads',\n 'float',\n 'bool',\n 'int',\n 'data',\n 'parent'\n ]);\n\n $this->call('engez:model', array_merge($modelOptions, $options));\n }", "abstract public function initFromRequest(\\App\\Request $request);", "public function fillModel(&$model, $input)\n\t{\n\t\t$model->{$this->getOption('field_name')} = $input;\n\t}", "public function set_data() {\n\t\tif (!empty($_GET)) {\n\t\t\tif ('search' === $this->_getKey) {\n\t\t\t\t$this->_getKey = array_keys($_GET);\n\t\t\t\t$this->searchModel->set_search_query(($this->searchModel->searchable)\n\t\t\t\t\t->registerModel(Modules::class, 'module_name')\n\t\t\t\t\t->registerModel(Multiplatforms::class, 'name')\n\t\t\t\t\t->registerModel(Log::class, 'method')\n\t\t\t\t\t->perform($_GET[$this->_getKey[0]])\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->searchModel->result();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "protected function processCreate(RequestInterface $request) : ModelInterface\n {\n //process the input\n $request = $this->processInput($request->getPostData());\n\n $this->model->saveOrFail($request, $this->createFields);\n\n return $this->model;\n }", "public function createModelObject($modelName){\n //$this->modelObject = new SignupModel;\n\n }", "public function getModel($data = array());", "public static function fromDataContainer(array $data, Request $request = null)\n {\n $models = collect();\n foreach ($data as $model) {\n\n $models->push((new RequestModel($request))->data(['data' => $model]));\n }\n return (new static($request))->models($models);\n }", "public function __construct () {\n\t\tparent::__construct ();\n\t\t\n\t\tif ($this->models)\n\t\tforeach ($this->models as $model) {\n\t\t\tunset ($this->models[$model]);\n\t\t\t$this->models[$model] = $this->session->getModel ($model,$this);\n\t\t\t$this->$model = $this->models[$model];\n\t\t}\n\t}", "public function prepareData($data)\n {\n $this->requestModel = new Request();\n $this->requestModel->setPostMethod();\n $this->requestModel->setBody(json_encode($data));\n $this->requestModel->setApiUrl($this->connector->getBaseApiUrl() . $this->apiUrl);\n }", "public function makeModels($data, $updateWithColumns)\n {\n return $this->instantiateModels($data, $updateWithColumns);\n }", "public function create($data) : Model\n {\n return $this->getModel()->create($data);\n }", "public function getRecordModelFromRequest(Vtiger_Request $request) {\n\t\t$moduleName = $request->getModule();\n\t\t$recordId = $request->get('record');\n\t\t$currentUserModel = Users_Record_Model::getCurrentUserModel();\n\n\t\tif(!empty($recordId)) {\n\t\t\t$recordModel = Vtiger_Record_Model::getInstanceById($recordId, $moduleName);\n\t\t\t$modelData = $recordModel->getData();\n\t\t\t$recordModel->set('id', $recordId);\n\t\t\t$sharedType = $request->get('sharedtype');\n\t\t\tif(!empty($sharedType))\n\t\t\t\t$recordModel->set('calendarsharedtype', $request->get('sharedtype'));\n\t\t\t$recordModel->set('mode', 'edit');\n\t\t} else {\n\t\t\t$recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);\n\t\t\t$modelData = $recordModel->getData();\n\t\t\t$recordModel->set('mode', '');\n\t\t}\n\n\t\tforeach ($modelData as $fieldName => $value) {\n\t\t\t$requestFieldExists = $request->has($fieldName);\n\t\t\tif(!$requestFieldExists){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$fieldValue = $request->get($fieldName, null);\n\t\t\tif ($fieldName === 'is_admin' && (!$currentUserModel->isAdminUser() || !$fieldValue)) {\n\t\t\t\t$fieldValue = 'off';\n\t\t\t}\n\t\t\t//to not update is_owner from ui\n\t\t\tif ($fieldName == 'is_owner') {\n\t\t\t\t$fieldValue = null;\n\t\t\t}\n\t\t\tif ($fieldName == 'roleid' && !($currentUserModel->isAdminUser())) {\n\t\t\t\t$fieldValue = null;\n\t\t\t}\n\n\t\t\tif($fieldValue !== null) {\n\t\t\t\tif(!is_array($fieldValue)) {\n\t\t\t\t\t$fieldValue = trim($fieldValue);\n\t\t\t\t}\n\t\t\t\t$recordModel->set($fieldName, $fieldValue);\n\t\t\t}\n\t\t}\n\t\t$homePageComponents = $recordModel->getHomePageComponents();\n\t\t$selectedHomePageComponents = $request->get('homepage_components', array());\n\t\tforeach ($homePageComponents as $key => $value) {\n\t\t\tif(in_array($key, $selectedHomePageComponents)) {\n\t\t\t\t$request->setGlobal($key, $key);\n\t\t\t} else {\n\t\t\t\t$request->setGlobal($key, '');\n\t\t\t}\n\t\t}\n\t\tif($request->has('tagcloudview')) {\n\t\t\t// Tag cloud save\n\t\t\t$tagCloud = $request->get('tagcloudview');\n\t\t\tif($tagCloud == \"on\") {\n\t\t\t\t$recordModel->set('tagcloud', 0);\n\t\t\t} else {\n\t\t\t\t$recordModel->set('tagcloud', 1);\n\t\t\t}\n\t\t}\n\t\treturn $recordModel;\n\t}", "public function init(Request $request)\n {\n $request->user->order->package = $request->input('package');\n $request->user->order->items = $request->input('items');\n $request->user->order->description = $request->input('description');\n $request->user->order->ostate = 1;\n\n $request->user->order->save();\n\n return $request->user->data();\n }", "public function __construct(PHIEUCHI $model, Request $request)\n {\n $this->model = $model;\n }", "protected function createModel(Request $request)\n {\n // Back and forth on this\n $model = array();\n\n // Need current project\n $project = $this->getProject();\n $model['project'] = $project;\n\n // Pull the games\n $gameRepo = $this->get('cerad_game.game_repository');\n \n $criteria = array();\n $criteria['projects' ] = $project->getKey();\n $criteria['levels'] = $this->getLevels($request);;\n\n $criteria['groupTypes'] = 'SF';\n $model['gamesSF'] = $gameRepo->queryGameSchedule($criteria);\n\n $criteria['groupTypes'] = 'CM';\n $model['gamesCM'] = $gameRepo->queryGameSchedule($criteria);\n\n $criteria['groupTypes'] = 'FM';\n $model['gamesFM'] = $gameRepo->queryGameSchedule($criteria);\n\n return $model;\n }", "public static function createFromRequest($data)\n {\n $post = new self($data);\n $post->published_at = Carbon::parse($data['published_at']);\n $post->user_id = Auth::id();\n if (!$post->short_body) {\n $post->short_body = $post->short();\n }\n $post->save();\n return $post;\n }", "public function initModel() {\n\t\t\tAppLoader::includeModel('UserEventModel');\n\t\t\t$objUserEvent = new UserEventModel();\n\t\t\treturn $objUserEvent;\n\t\t}", "public function preRequest(SS_HTTPRequest $request, Session $session, DataModel $model);", "public function create(Request $request): Model;", "public function __construct(Model $data)\n {\n parent::__construct($data);\n\n $metas = $data->hasMany('Andriynto\\Ebri\\Models\\UserMeta')->getResults();\n\n if ( ! $metas->isEmpty()) {\n $metas = $metas->toArray();\n\n foreach ($metas as $item) {\n $this->setAttribute($item['key'], $item['value']);\n }\n\n unset($metas);\n }\n\n unset($metas);\n }", "protected function setModel()\n {\n $class = 'Src\\Modules\\\\' . $this->module_name . '\\Models\\\\' . $this->class . 'Model';\n $this->model = new $class;\n $this->model->setModuleName( $this->module_name );\n $this->model->run();\n }", "public function __construct()\n {\n $this->modelName = explode('.', Route::currentRouteName())[0];\n $this->model = new Model($this->modelName);\n }", "protected function createModel()\n {\n $this->call('make:model', array_filter([\n 'name' => $this->getNameInput(),\n '--factory' => $this->option('factory'),\n '--migration' => $this->option('migration'),\n ]));\n }", "protected function makeModel()\n {\n new MakeModel($this, $this->files);\n }", "public function getDataRequest()\n {\n /** @var Core_Entity_Request $dataRequest */\n $dataRequest = $this->_requestClass;\n return new $dataRequest(\n array(\n Core_Entity_Model_Abstract::CONSTRUCT_STORAGE => $this->getStorage()\n )\n );\n }", "public function createFromRequest(Request $request);", "public function setCurModelObject() {\n //'cause when the Controller is called by another Controller\n //and thus the Model in the local Controller is also called remotely\n //by that remote Controller\n //$curModel = CURMODEL;\n //$this->model = new $curModel();\n\n $model = $this->CMO->model_prefix.get_class($this);\n $this->model = new $model();\n //Models' pseudo constructor cannot pass Parameters\n if(method_exists($this->model,'_construct')) {\n call_user_func_array(array($this->model,'_construct'),array());//this invokes the pseudo constructor of Model class\n }\n if(method_exists($this->model,'_'.$model)) {\n call_user_func_array(array($this->model,'_'.$model),array());//this invokes the pseudo constructor of Model class\n }\n }", "protected function instantiateModels($data, $updateWithColumns)\n {\n $csvParser = new CSVParser($data);\n $parserIterator = $csvParser->getIterator();\n $mappedModels = collect();\n $dataItemManipulator = $this->dataItemManipulator;\n\n $mappings = $this->getMappings();\n $mappingKeys = array_keys($mappings);\n\n foreach ($parserIterator as $parsedRow) {\n //on the row, grab the values inside of the search columns\n $model = $this->getModel($parsedRow, $updateWithColumns);\n foreach ($mappingKeys as $mapFrom) {\n $CSVValue = $parsedRow[$mapFrom];\n $toKey = $this->getValidToProperty($mapFrom);\n\n $CSVValue = $dataItemManipulator($toKey, $CSVValue, $parsedRow);\n\n $model->setAttribute($toKey, $CSVValue);\n }\n $mappedModels->push($model);\n }\n\n return $mappedModels;\n }", "private function _populateEntryModel(Entry $entry)\n {\n $request = Craft::$app->getRequest();\n\n // Set the entry attributes, defaulting to the existing values for whatever is missing from the post data\n $entry->typeId = $request->getBodyParam('typeId', $entry->typeId);\n $entry->slug = $request->getBodyParam('slug', $entry->slug);\n if (($postDate = $request->getBodyParam('postDate')) !== null) {\n $entry->postDate = DateTimeHelper::toDateTime($postDate) ?: null;\n }\n if (($expiryDate = $request->getBodyParam('expiryDate')) !== null) {\n $entry->expiryDate = DateTimeHelper::toDateTime($expiryDate) ?: null;\n }\n $entry->enabled = (bool)$request->getBodyParam('enabled', $entry->enabled);\n $entry->enabledForSite = $entry->getSection()->getHasMultiSiteEntries()\n ? (bool)$request->getBodyParam('enabledForSite', $entry->enabledForSite)\n : true;\n $entry->title = $request->getBodyParam('title', $entry->title);\n\n if (!$entry->typeId) {\n // Default to the section's first entry type\n $entry->typeId = $entry->getSection()->getEntryTypes()[0]->id;\n }\n\n // Prevent the last entry type's field layout from being used\n $entry->fieldLayoutId = null;\n\n $fieldsLocation = $request->getParam('fieldsLocation', 'fields');\n $entry->setFieldValuesFromRequest($fieldsLocation);\n\n // Author\n $authorId = $request->getBodyParam('author', ($entry->authorId ?: Craft::$app->getUser()->getIdentity()->id));\n\n if (is_array($authorId)) {\n $authorId = $authorId[0] ?? null;\n }\n\n $entry->authorId = $authorId;\n\n // Parent\n if (($parentId = $request->getBodyParam('parentId')) !== null) {\n if (is_array($parentId)) {\n $parentId = reset($parentId) ?: '';\n }\n\n $entry->newParentId = $parentId ?: '';\n }\n\n // Revision notes\n $entry->revisionNotes = $request->getBodyParam('revisionNotes');\n }", "protected function _set_request_data_from_params(){\n \n //if( !$this->request->is('post') && !empty($this->request->params['named'])){\n// $this->request->data['Region']['id'] = $this->request->params['named']['region_id'];\n// $this->request->data['Area']['id'] = $this->request->params['named']['area_id'];\n// $this->request->data['House']['id'] = $this->request->params['named']['house_id'];\n// \n// if( isset($this->request->params['named']['house_id']) ){\n// $this->request->data['House']['id'] = $this->request->params['named']['house_id'];\n// }\n// if( isset($this->request->params['named']['representative_id']) ){\n// $this->request->data['Representative']['id'] = $this->request->params['named']['representative_id'];\n// }\n// if( isset($this->request->params['named']['section_id']) ){\n// $this->request->data['Section']['id'] = $this->request->params['named']['section_id'];\n// }\n// if( isset($this->request->params['named']['outlet_id']) ){\n// $this->request->data['Outlet']['id'] = $this->request->params['named']['outlet_id'];\n// }\n// if( isset($this->request->params['named']['from_date']) ){\n// $this->request->data['from_date'] = $this->request->params['named']['from_date'];\n// }\n// if( isset($this->request->params['named']['till_date']) ){\n// $this->request->data['till_date'] = $this->request->params['named']['till_date'];\n// }\n //} \n \n $this->request->data['Region']['id'] = $this->request->query['region_id'];\n $this->request->data['Area']['id'] = $this->request->query['area_id'];\n $this->request->data['House']['id'] = $this->request->query['house_id'];\n \n \n if( isset($this->request->params['named']['representative_id']) ){\n $this->request->data['Representative']['id'] = $this->request->query['representative_id'];\n }\n if( isset($this->request->params['named']['section_id']) ){\n $this->request->data['Section']['id'] = $this->request->query['section_id'];\n }\n if( isset($this->request->params['named']['outlet_id']) ){\n $this->request->data['Outlet']['id'] = $this->request->query['outlet_id'];\n }\n if( isset($this->request->params['named']['from_date']) ){\n $this->request->data['from_date'] = $this->request->query['from_date'];\n }\n if( isset($this->request->params['named']['till_date']) ){\n $this->request->data['till_date'] = $this->request->query['till_date'];\n }\n }", "private function loadModel() {\n // name as requested resource.\n $name = $this->name.'Model';\n $path = str_replace(kPlaceholder, $this->version, kModelsFolder);\n $path = $path . $name . \".php\";\n // If it does not exist, go with\n // the default Model class.\n if (!file_exists($path)) {\n return new Model();\n } else {\n if (!class_exists($name)) {\n include $path;\n }\n\n return new $name();\n }\n }", "public static function populateModel($values)\n\t{\n\t\t// Strip out the element record attributes if this is getting called from a child class\n\t\t// based on an Active Record result eager-loaded with the ElementRecord\n\t\tif (isset($values['element']))\n\t\t{\n\t\t\t$elementAttributes = $values['element'];\n\t\t\tunset($values['element']);\n\t\t}\n\n\t\t$model = parent::populateModel($values);\n\n\t\t// Now set those ElementRecord attributes\n\t\tif (isset($elementAttributes))\n\t\t{\n\t\t\tif (isset($elementAttributes['i18n']))\n\t\t\t{\n\t\t\t\t$model->setAttributes($elementAttributes['i18n']);\n\t\t\t\tunset($elementAttributes['i18n']);\n\t\t\t}\n\n\t\t\t$model->setAttributes($elementAttributes);\n\t\t}\n\n\t\treturn $model;\n\t}", "public function __construct(ContactRequest $model)\n {\n $this->model = $model;\n }", "public function creating(Request $model)\n {\n # Set Current User as Creator\n $model->setAttribute('creator', $model->getAttribute('creator') ?: $this->getUserId() );\n # Set the Owner ID to current user\n $model->setAttribute('owner_id', $model->getAttribute('owner_id') ?: $this->getUserId() );\n # Set Tiering Needs\n $model->setAttribute('is_tiering_needed', $this->isTieringNeeded($model));\n # Set Tiering New\n $model->setAttribute('is_tiering_new', $this->isTieringNew($model));\n }", "public function create(array $data): ?Model;", "abstract public function populateRequest(PHPFrame_Request $request);", "function __construct () {\n\t\t$this->_model = new Model();\n\t}", "protected function createEntity($data) {\n\n if(!empty($this->model_class)) {\n \n $this->createModelInstance($data);\n\n } else {\n \n $this->entity = $data;\n\n }\n \n }", "protected function makeModel()\n {\n return factory(Employee::class)->create();\n }", "public function loadModel(){\n $this->load->model('Data_Model');\n return new Data_Model($this->used_table,$this->used_db);\n }", "public function fetch()\n {\n foreach ($this->getData() as $id => $model_data) {\n if (!isset($model_data->id)) {\n $model_data->id = $id;\n }\n $this->add($model_data);\n }\n return $this;\n }", "public function createModel()\n {\n }", "public function __construct()\n {\n $this->model = app()->make($this->model());\n }", "function __construct() {\n parent::__construct();\n\t\t$this->load->model('migration_request', 'request');\n }", "protected function newModelInstance()\n {\n return resolve(Arr::get(self::DOCUMENT_TYPES, $this->type));\n }", "public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }", "function __contruct()\n {\n $this->load->model('Inbound_message_model');\n $this->load->model('Psychic_model');\n $data['title'] = 'Bulletin board';\n\t\t$data['user'] = Auth::me();\n\n\t\t\n }", "public function create($data = null) {\n\t\t$class = $this->type->getModelClassname();\n\t\t$object = new $class($data);\n\t\t$object->setModelStorage($this->type->getStorage());\n\t\treturn $object;\n\t}", "public function createModel()\n\t{\n\t\treturn $this->getModelConfiguration()->createModel();\n\t}", "public static function initModel($modelType){\n $m=new $modelType();\n unset($m);\n }", "public static function newModel()\n {\n $model = static::$model;\n\n return new $model;\n }", "public static function LoadWithData($row)\n \t{\n \t\treturn new Users_model(\n \t\t\t$row->user_signup_id,\n \t\t\t$row->email,\n \t\t\t$row->name,\n \t\t\t$row->school,\n \t\t\t$row->city,\n \t\t\t$row->exam\n \t\t);\n \t}", "protected function prepare_results_to_model($income_data = array()){\n\n\t\tif(isset($income_data[\"id\"])){\n\n\t\t\t$this->find($income_data[\"id\"]);\n\t\t}\n\t\t\n\t\t$model = static::get_model();\n\n\t\tforeach($model as $model_key => &$default_value){\n\n\t\t\tif(array_key_exists($model_key, $income_data)){\n\n\t\t\t\tif($model_key == 'updated_at' || $model_key == 'created_at'){\n\n\t\t\t\t\tif(!is_numeric($income_data[$model_key])){ \n\n\t\t\t\t\t\t$income_data[$model_key] = (string) (strtotime($income_data[$model_key])) ? strtotime($income_data[$model_key]) : $income_data[$model_key];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->{$model_key} = $income_data[$model_key];\n\t\t\t}\n\n\t\t\tunset($model_key, $default_value);\n\t\t}\n\n\t\t$this->__destruct();\n\n\t\treturn $this;\n\t}", "protected function resolveModel()\n {\n if (!\\method_exists($this, 'model')) {\n throw new NoModelDefined('No model defined');\n }\n\n return app()->make($this->model()); //make model\n }", "public static function updateBeforeLoad($model)\n {\n $model = Order::getShippingDetail($model);\n // Order type and dropdown values for setting customer and agent\n $model = \\common\\models\\User::RequestedUserDetail($model);\n // Product detail for price and quantity\n \n \n // check status of order\n $orderReturn = array_search('Return Request', \\common\\models\\Lookup::$status);\n $orderTransfer = array_search('Transfer Request', \\common\\models\\Lookup::$status);\n // order type for return and transfer\n if ($orderReturn == $model->status) {\n $model->order_type = 'Return';\n $currentStock = \\common\\models\\helpers\\Statistics::CurrentStock($model->child_user);\n } else {\n $currentStock = \\common\\models\\helpers\\Statistics::CurrentStock($model->request_agent_name);\n }\n if ($orderTransfer == $model->status) {\n $model->order_type = 'Transfer';\n }\n $model->total_stock = $currentStock;\n return $model;\n }", "public function loadModel() : void\n {\n $model = $this->newModel();\n\n $model->loadModel($this->modelPath);\n $model->printModel();\n\n $this->fm = FunctionMap::loadFunctionMap();\n }", "protected function parseRequest()\n {\n $this->input = $this->request->getPostList()->toArray();\n }", "protected abstract function model();", "protected function newObject($data = [])\n {\n return new $this->model($data);\n }", "function initData() {\n\t\t$representative =& $this->getRepresentative();\n\n\t\tif ($representative) {\n\t\t\t$this->_data = array(\n\t\t\t\t'representativeId' => $representative->getId(),\n\t\t\t\t'role' => $representative->getRole(),\n\t\t\t\t'representativeIdType' => $representative->getRepresentativeIdType(),\n\t\t\t\t'representativeIdValue' => $representative->getRepresentativeIdValue(),\n\t\t\t\t'name' => $representative->getName(),\n\t\t\t\t'phone' => $representative->getPhone(),\n\t\t\t\t'fax' => $representative->getFax(),\n\t\t\t\t'email' => $representative->getEmail(),\n\t\t\t\t'url' =>$representative->getUrl(),\n\t\t\t\t'isSupplier' => $representative->getIsSupplier(),\n\t\t\t);\n\t\t}\n\t}", "public function __construct(Model $data)\n {\n $schemas = $data->getSchemas();\n if ($data->getTmpSave()) {\n foreach ($data->getTmpSave() as $key => $val) {\n $this->doRelateSave($key, $schemas, $val, $data);\n }\n }\n\n $data->afterSave($data);\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('Request_model');\n\t\t$this->load->model('Book_model');\n\t}", "protected function init()\n {\n if (!isset($this['fields'])) {\n $model = $base = [];\n if (isset($this->options['base_model']) && $this->options['base_model']) {\n $base = static::getTableInfo($this->options['base_model']) ? : [];\n }\n if (isset($this->options['table_name']) && (!$base || $this->options['table_name'] != $base['table_name'])) {\n $model = $this->getTableInfo($this->options['table_name']) ? : [];\n }\n \n if ($model && $base) {\n $model['ext_table'] = $model['table_name'];\n $model['ext_fields'] = isset($model['master_fields']) ? $model['master_fields'] : array_keys($model['fields']);\n \n $model['master_table'] = $base['table_name'];\n $model['master_fields'] = isset($base['master_fields']) ? $base['master_fields'] : array_keys($base['fields']);\n }\n \n // merge\n $model = ArrayHelper::merge($base, $model);\n $this->setOption($model);\n }\n }", "public function _populate($data){\n\t\t$object = new Model_Aclusuariosonline();\n\t\tif($data == null)return $object;\n\t\t$label = null;\n\t\tif(array_key_exists(\"aclusuariosonline_id\", $data))$object->setId($data[\"aclusuariosonline_id\"]);\n\t\tif(array_key_exists(\"ultimoacceso\", $data))$object->setUltimoacceso($data[\"ultimoacceso\"]);\n\t\tif(array_key_exists(\"tiempo\", $data))$object->setTiempo($data[\"tiempo\"]);\n\t\tif(array_key_exists(\"ip\", $data))$object->setIp($data[\"ip\"]);\n\tif(array_key_exists(\"usuario_id\", $data)){\n\t\t$object->setUsuario_id($data[\"usuario_id\"]);\n\t\tif($this->getPerezoso()){\n\t\t\t$usuario_idDB = new Model_AclusuariosMapper();\n\t\t\t$usuario_idDB->setPerezoso(false);\n\t\t\t//$objectRelacion = $usuario_idDB->getById(0);\t\n\t\t\t$objectRelacion = $usuario_idDB->getById($data[\"usuario_id\"]);\t\n\t\t\t$object->setUsuario_idObject($objectRelacion);\n\t\t}\t\n\t}\n\n\n \t\treturn $object;\n\t}", "public function fillModelFromRequest(Request $request, $id = null): Model\n\t{\n\t\tif (!$id) {\n\t\t\t$entity = $this->newModel();\n\t\t} else {\n\t\t\t$entity = $this->find($id);\n\t\t}\n\n\t\tif (!$entity) {\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t$data = $request->all();\n\t\t$entity->fill($data);\n\n\t\tif (method_exists($this, 'beforeSavingModel')) {\n\t\t\t$this->beforeSavingModel($request, $entity);\n\t\t}\n\n\t\t$entity->save();\n\n\t\tif (method_exists($this, 'afterSavingModel')) {\n\t\t\t$this->afterSavingModel($request, $entity);\n\t\t}\n\n\t\treturn $entity->isDirty() ? $entity->refresh() : $entity;\n\t}", "public function create($data)\n {\n return new JsonModel(array('data' => array('id'=> 3, 'name' => 'Chris M', 'role' => 'Overlord')));\n }" ]
[ "0.66980684", "0.64865977", "0.63726634", "0.60867536", "0.5994268", "0.59437597", "0.5936076", "0.58875793", "0.5882241", "0.5878325", "0.58662343", "0.5841976", "0.58235145", "0.58178365", "0.58154327", "0.5803009", "0.5784061", "0.5776095", "0.5737752", "0.568038", "0.5662774", "0.5647277", "0.5636676", "0.5629926", "0.5622677", "0.56052464", "0.5598921", "0.5590711", "0.557719", "0.5573788", "0.55589837", "0.55576205", "0.5555585", "0.5544897", "0.5527734", "0.5498367", "0.5491089", "0.54835147", "0.5483111", "0.5482016", "0.54718715", "0.5470973", "0.5467133", "0.5458197", "0.5457539", "0.5452236", "0.5448709", "0.544188", "0.5441338", "0.5433839", "0.5433789", "0.5433578", "0.541719", "0.5401197", "0.5396252", "0.53912145", "0.5384486", "0.5381611", "0.5347011", "0.5326338", "0.5314475", "0.5312624", "0.5303932", "0.5287757", "0.5284119", "0.52780086", "0.5274583", "0.5270747", "0.52704185", "0.5267136", "0.5263415", "0.52610135", "0.52597517", "0.5242591", "0.5237458", "0.522297", "0.5219069", "0.5210443", "0.52098656", "0.5203617", "0.51912326", "0.5190041", "0.5174777", "0.5169436", "0.51670414", "0.516609", "0.51657283", "0.5157008", "0.5156667", "0.5143587", "0.513792", "0.5133564", "0.5130909", "0.5128607", "0.51233435", "0.51232225", "0.51137906", "0.5113473", "0.5113458", "0.51121724" ]
0.5478705
40
Update the model from request data.
abstract public function updateFromRequest(Request $request = null, array $otherAttributes = array());
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function updateModel();", "public function update(Request $request, _modelName_ $_modelEntry_)\n {\n $_modelEntry_->update($request->all());\n return [\n \"status\" => 1,\n \"data\" => $_modelEntry_->makeHidden($this->hidden),\n \"msg\" => \"_modelName_ updated successfully\"\n ];\n }", "abstract protected function updateResponse(Model $data);", "public function update($data) {}", "public function update($data) {}", "public function actionUpdate() {\n $json = file_get_contents('php://input'); //$GLOBALS['HTTP_RAW_POST_DATA'] is not preferred: http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data\n $put_vars = CJSON::decode($json, true); //true means use associative array\n switch ($_GET['model']) {\n // Find respective model\n case 'Order':\n $model = Order::model()->findByPk($_GET['id']);\n break;\n case 'Users':\n $model = Users::model()->findByPk($_GET['id']);\n break;\n case 'Product':\n $model = Product::model()->findByPk($_GET['id']);\n break;\n case 'Vendor':\n $model = Vendor::model()->findByPk($_GET['id']);\n break;\n case 'FavoriteProduct':\n $model = FavoriteProduct::model()->findByPk($_GET['id']);\n break;\n case 'Rating':\n $model = Rating::model()->findByPk($_GET['id']);\n break;\n case 'Review':\n $model = Review::model()->findByPk($_GET['id']);\n break;\n case 'UserAddress':\n $model = UserAddress::model()->findByPk($_GET['id']);\n break;\n case 'OrderDetail':\n $model = OrderDetail::model()->findByPk($_GET['id']);\n break;\n default:\n $this->_sendResponse(0, sprintf('Error: Mode update is not implemented for model ', $_GET['model']));\n Yii::app()->end();\n }\n // Did we find the requested model? If not, raise an error\n if ($model === null)\n $this->_sendResponse(0, sprintf(\"Error: Didn't find any model with ID .\", $_GET['model'], $_GET['id']));\n\n // Try to assign PUT parameters to attributes\n unset($_POST['id']);\n foreach ($_POST as $var => $value) {\n // Does model have this attribute? If not, raise an error\n if ($model->hasAttribute($var))\n $model->$var = $value;\n else {\n $this->_sendResponse(0, sprintf('Parameter %s is not allowed for model ', $var, $_GET['model']));\n }\n }\n // Try to save the model\n if ($model->update())\n $this->_sendResponse(1, '', $model);\n else\n $this->_sendResponse(0, $msg);\n // prepare the error $msg\n // see actionCreate\n // ...\n }", "public function saveUpdate($request)\n {\n $old_record = $this->model->__toString();\n $action = $this->action;\n //check if the data is object of request\n if ($request instanceof Request) {\n $formData = $request->all();\n } elseif (is_array($request)) {\n $formData = $request;\n } else {\n throw new \\Exception(\"undefined data\");\n }\n\n foreach ($formData as $key => $value):\n if ($key != \"formData\" && $key != 'undefined') {\n $this->model->$key = $value;\n }\n endforeach;\n\n $this->model->$action = auth()->check() ? auth()->id() : 0;\n\n $user_id = 0;\n\n // $this->updateHeadersAlpha();\n\n //if action is set to useru_id that means it's update so we need to push data in audit table\n if ($this->action == \"useru_id\") {\n $this->audit($this->model->id, $old_record, $this->model->__toString(), auth()->check() ? auth()->id() : $user_id);\n }\n $this->model->save();\n return $this->model;\n }", "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "public function updateUseModel($model, $requestData, $merge_data_with = [])\n {\n $model->fill(array_merge($requestData, $merge_data_with));\n $model->save();\n return $model;\n }", "public function update(){\n\n\t\t/* set method */\n\t\t$this->request_method = 'update';\n\t\t\t\t\n\t\t/* check for a model id */\n\t\tif( ! $this->id) {\n\t\t\t$this->set_error( 10, 'No model id in request, cant update' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* read the data received from backbone */\n\t\t$this->parse_model_request();\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\t\t\n\t\t/* get the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\n\t\t \t\t\t \t\n\t\t/* insert database */\n\t\tswitch( $this->properties->modelclass ) {\n\t\t\n\t\t\t/* posts */\n\t\t\tcase('post'):\n\t\t\tcase('attachment'):\n\t\t\t\t$post = $item_data['post'];\n\t\t\t\t\n\t\t\t\t/* privileg check */ //improve this for coded api calls, like when setting up bootstrap data (for reading it is no problem any way, because this check is only made for update and create and delete)\n\t\t\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('edit_post', $this->id)) { \n\t\t\t\t\t$this->set_error( 11, 'no user privileges to update the item on server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$result = wp_update_post( $post );\n\t\t\t\t\n\t\t\t\t/* maybe an error while updating */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 12, 'updating the item failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* geting the id means update was a success */\n\t\t\t\t$updated_id = $result;\n\t\t\t\t\n\t\t\t\t/* save custom data, this only method does all the magic, \n\t\t\t\tdetails must be specified in the custom package handlers */\n\t\t\t\t$this->_action_custom_package_data( $updated_id, $item_data);\t\n\t\t\t\t\n\t\t\t\t/* set a clean response */\n\t\t\t\t$this->parse_model_response($updated_id);\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t/* comment */\n\t\t\tcase('comment'):\n\t\t\t\t$comment = $item_data['comment'];\n\t\t\t\t\n\t\t\t\t/* comment updateding is not supported */\n\t\t\t\t$this->set_error( 13, 'comments cant be updated!' );\n\t\t\t\t\treturn; \n\t\t\tbreak;\n\t\t\tcase('user'):\n\t\t\t//@TODO\n\t\t\tbreak;\n\t\t\tcase('idone'):\n\t\t\t\t$new_id = $this->id;\n\t\t\t\t$this->_action_custom_package_data( $new_id, $item_data);\t\t\t\t\t\n\t\t\t\t$this->parse_model_response($new_id);\t\t\n\t\t\tbreak;\n\t\t}\n do_action('bb-wp-api_after_update', $updated_id, $this->properties, $this );\n\t\n\t}", "public function Update($data) {\n\n }", "public function processUpdate()\n {\n // Validate Request\n $validationRules = $this->getValidationRules();\n // Hook Filter updateModifyValidationRules\n $validationRules = $this->doFilter(\"updateModifyValidationRules\", $validationRules);\n $validationMessages = array();\n // Hook Filter updateModifyValidationMessages\n $validationMessages = $this->doFilter(\"updateModifyValidationMessages\", $validationMessages);\n $validator = Validator::make($this->Request->all(), $validationRules, $validationMessages);\n if ($validator->fails()) {\n $Response = back()->withErrors($validator)->withInput();\n $this->redirect($Response);\n }\n // Record is valid\n $Model = $this->isValidRecord();\n if ($Model instanceof \\Illuminate\\Http\\RedirectResponse) {\n $this->redirect($Model);\n }\n // Set value for BIT columns\n $this->setValueBitColumns();\n // Set initial configuration\n $Model->build($this->Model->getTable());\n $requestParameters = $this->Request->all();\n $requestParameters = $this->setValueBlobColumns($requestParameters);\n // Hook Filter updateModifyRequest\n $this->Model = clone $Model;\n $parameters = $this->doFilter(\"updateModifyRequest\", $requestParameters);\n // Update record\n if ($this->getIsTransaction()) {\n DB::transaction(function ($db) use ($Model, $parameters) {\n $Model->update($parameters);\n // Hook Action updateAfterUpdate\n $this->doHooks(\"updateAfterUpdate\", array($Model));\n });\n } else {\n $Model->update($parameters);\n // Hook Action updateAfterUpdate\n $this->doHooks(\"updateAfterUpdate\", array($Model));\n }\n // Set response redirect to list page and set session flash\n $Response = redirect($this->getFormAction())\n ->with('dk_' . $this->getIdentifier() . '_info_success', trans('dkscaffolding.notification.update.success'));\n // Hook Filter updateModifyResponse\n $Response = $this->doFilter(\"updateModifyResponse\", $Response);\n $this->redirect($Response);\n }", "function update(){\n\t\t$this->model->update();\n\t}", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "public function update(Request $request, object $model): bool;", "public function update(Request $request) {\n $this->model->update($request->only($this->model->getModel()->fillable), $request->id); \n return response()->json($this->model->show($request->id));\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update(Request $request) : object\n {\n return new $this->resource(\n $this->model->update($request->validated)\n );\n }", "public function update(Request $request)\n {\n $post = $request->all();\n $model = $this->model->getDetailProduct($post['id']);\n if (!empty($post['name'])) {\n $model->name = $post['name'];\n }\n // if (!empty($post['color'])) {\n // $model->color = $post['color'];\n // }\n if (!empty($post['price'])) {\n $model->price = $post['price'];\n }\n if (!empty($post['stock'])) {\n $model->stock = $post['stock'];\n }\n\n if ($model->update()) {\n session()->flash('flash_message','Data has been updated');\n return Redirect::back();\n } else {\n session()->flash('flash_message_error','Update data failed');\n return Redirect::back();\n }\n }", "public function update() {\n $updateData = $this->data;\n $model = new ReferralModel;\n $ref = $model->findOne($updateData['id']);\n if ($ref) {\n $ref->set($updateData);\n $keepNullFields = [\n 'route_id', 'estimator_id', 'date_requested',\n 'date_service', 'class_id', 'lat', 'lng'\n ];\n foreach ($keepNullFields as $field) {\n if (!$updateData[$field]) {\n $ref->set($field, null);\n }\n }\n $ref->save();\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request updated successfully',\n 'data' => $ref->asArray()\n ]);\n } else {\n http_response_code(404);\n $this->renderJson([\n 'success' => false,\n 'message' => 'Resource not found'\n ]);\n }\n }", "public function update(Request $request)\n {\n //\n $data = $request->all();\n $attr = Attribute::find($data['edit_id']);\n $attr->attribute_name = $data['attribute_name'];\n $attr->attribute_type = $data['attribute_type'];\n $attr->is_required = (isset($data['is_required']))?1:0;\n $attr->save();\n return $this->index();\n }", "abstract public function updateData();", "public function update(Request $request, FormModel $formModel)\n {\n //\n }", "protected function updateFormModelData($params, $responseBody, $data)\n\t{\n\t\t$w = new FabrikWorker;\n\t\t$dataMap = $params->get('put_include_list', '');\n\t\t$include = $w->parseMessageForPlaceholder($dataMap, $responseBody, true);\n\t\tif (FabrikWorker::isJSON($include))\n\t\t{\n\t\t\t$include = json_decode($include);\n\n\t\t\t$keys = $include->put_key;\n\t\t\t$values = $include->put_value;\n\t\t\t$defaults = $include->put_value;\n\t\t\tfor ($i = 0; $i < count($keys); $i++)\n\t\t\t{\n\t\t\t\t$key = $keys[$i];\n\t\t\t\t$default = $defaults[$i];\n\t\t\t\t$localKey = FabrikString::safeColNameToArrayKey($values[$i]);\n\t\t\t\t$remoteData = FArrayHelper::getNestedValue($data, $key, $default, true);\n\t\t\t\tif (!is_null($remoteData))\n\t\t\t\t{\n\t\t\t\t\t$this->formModel->_data[$localKey] = $remoteData;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "protected function update() {}", "public function update(Model $model, Request $request): ?Model;", "public function update( $data )\n {\n foreach ( $data as $key => $value )\n {\n $this->{$key} = $value;\n }\n return $this->save();\n }", "public function update(Request $request)\n {\n \n \n\t\t\n \n }", "protected function beforeUpdateResponse(Model &$data)\n {\n }", "public function update(Request $request)\n\t{\n\n\t}", "public function updating($model)\n\t{\n\t}", "public function actionUpdate()\r\n {\r\n $this->_userAutehntication();\r\n\r\n /*\r\n * Receive all the PUT parameters\r\n */\r\n parse_str(file_get_contents('php://input'), $put_params);\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Find respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>update</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($model))\r\n $this->_sendResponse(400, sprintf(\"Error: Didn't find any model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n \r\n /*\r\n * assign PUT parameters to attributes\r\n */ \r\n foreach($put_params as $var=>$value) {\r\n /*\r\n * Check if the model have this attribute\r\n */ \r\n if($model->hasAttribute($var)) {\r\n $model->$var = $value;\r\n } else {\r\n /* Error : model don't have this attribute */\r\n $this->_sendResponse(500, sprintf('Parameter <b>%s</b> is not allowed for model <b>%s</b>', $var, $_GET['model']) );\r\n }\r\n }\r\n /*\r\n *save the model\r\n */\r\n if($model->save()) {\r\n $this->_sendResponse(200, sprintf('The model <b>%s</b> with id <b>%s</b> has been updated.', $_GET['model'], $_GET['id']) );\r\n } else {\r\n $message = \"<h1>Error</h1>\";\r\n $message .= sprintf(\"Couldn't update model <b>%s</b>\", $_GET['model']);\r\n $message .= \"<ul>\";\r\n foreach($model->errors as $attribute=>$attribute_errors) {\r\n $message .= \"<li>Attribute: $attribute</li>\";\r\n $message .= \"<ul>\";\r\n foreach($attribute_errors as $attr_error) {\r\n $message .= \"<li>$attr_error</li>\";\r\n } \r\n $message .= \"</ul>\";\r\n }\r\n $message .= \"</ul>\";\r\n $this->_sendResponse(500, $message );\r\n }\r\n }", "public function updateFollowup(Request $request){\n \n $Problem = $request->input('Problem');\n $Solution = $request->input('Solution');\n $NumberOfVisits = $request->input('NumberOfVisits');\n $EndOfTherapy = $request->input('EndOfTherapy');\n $FamilyTherapy = $request->input('FamilyTherapy');\n $EndOfFamilyTherapy = $request->input('EndOfFamilyTherapy');\n $Psychologist = $request->input('Psychologist');\n $id = $request->input('id');\n \n if($Problem !=''){\n \n $data = array('Problem'=>$Problem,'Solution'=>$Solution,'NumberOfVisits'=>$NumberOfVisits,'EndOfTherapy'=>$EndOfTherapy,'FamilyTherapy'=>$FamilyTherapy,\"EndOfFamilyTherapy\"=>$EndOfFamilyTherapy,\"Psychologist\"=>$Psychologist);\n // Call updateData() method of Page Model\n FamilyFollowup::updateData($id, $data);\n echo 'Update successfully.';\n }else{\n echo 'Fill all fields.';\n }\n \n exit; \n }", "public function update(Request $request, ProData $proData)\n {\n //\n }", "public function update(Request $request)\r\n {\r\n }", "public function update(Request $request)\r\n {\r\n }", "public function update(Request $request)\n {\n \n }", "public function update(Request $r)\n {\n //\n\n }", "protected function setPutData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "public function update(Request, $request)\n {\n \n\n }", "public function update(Request $req)\n { \n\n }", "private function _updateModel($model, $data) {\n\t\t\n\t\t$changeAttributes = array();\n\t\t\n\t\tforeach($data as $attr=>$value){\n\t\t\tif($value['value'] || $value['replace']) {\n\t\t\t\t\t$changeAttributes[$value['name']] = $value['value'];\n\t\t\t}\n\t\t}\n\n\t\t$model->setAttributes($changeAttributes);\n\t\t\n\t\treturn $model->save();\n\t}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function actionUpdate($id) {\n\n $put_var = array();\n parse_str(file_get_contents('php://input'), $put_var);\n\n foreach ($put_var as $data) {\n $json = CJSON::decode($data, true);\n }\n\n $model = $this->loadModel($id);\n\n foreach ($json as $var => $value) {\n // Does model have this attribute? If not, raise an error\n if ($model->hasAttribute($var)) {\n $model->$var = $value;\n }\n }\n\n if ($model->save()){\n echo json_encode(array(\n \"success\" => true,\n \"data\" => array(\n \"id\" => $model->id,\n )\n ));\n }\n\t}", "public function update(Request $request, ScrapeData $scrapeData)\n {\n //\n }", "public function update(Request $request)\n {\n $pigBreeder = PigBreeder::find($request->id);\n $pigBreeder->fill($request->all()); \n $pigBreeder->save();\n }", "public function update(Request $request) {\n \n \n }", "public function update(Request $request) {\n }", "public function update(Request $request) {\n }", "public function update(Request $request)\n {\n \n }", "public function update(Model $entity, array $data){\n $entity->fill($data);\n $entity->save();\n return $entity;\n\n }", "public function update(Request $request)\n { }", "public function update(Request $request)\n {\n \n }", "public function update(Request $request, Data $data)\n {\n $data->fill($request->all());\n $data->update();\n\n return redirect()->back()->with('success', 'Atualizado com sucesso'); \n }", "public function update(Request $request)\n {\n \n\n \n }", "public function update(Request $request, string $model, string $id): Response\n {\n //\n }", "public function update(Request $request)\n {\n \n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function update(Request $request)\n {\n }", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function update(Request $request) {\n echo '<pre>';\n print_r($request->all());exit;\n }", "public function update(Request $request, TonelajesModel $tonelajesModel)\n {\n //\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request)\n {\n\n }", "public function update(Request $request, ChatModel $chatModel)\n {\n //\n }", "public function setDataFromRequest(App\\Request $request)\n\t{\n\t\tforeach (array_keys($this->getEditFields()) as $field) {\n\t\t\tif ($request->has($field)) {\n\t\t\t\tswitch ($field) {\n\t\t\t\t\tcase 'server_id':\n\t\t\t\t\tcase 'status':\n\t\t\t\t\tcase 'type':\n\t\t\t\t\tcase 'user_id':\n\t\t\t\t\tcase 'istorage':\n\t\t\t\t\t\t$value = $request->getInteger($field);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'crmid':\n\t\t\t\t\t\t$value = $request->isEmpty('crmid') ? '' : $request->getInteger('crmid');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'user_name':\n\t\t\t\t\tcase 'language':\n\t\t\t\t\t\t$value = $request->getByType($field, 'Text');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'password_t':\n\t\t\t\t\t\t$value = $request->getRaw($field, null);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\tthrow new \\App\\Exceptions\\Security(\"ERR_ILLEGAL_FIELD_VALUE||{$field}\", 406);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$this->set($field, $this->getValueToSave($field, $value));\n\t\t\t}\n\t\t}\n\t}", "public function update(Model $model, array $attributes);", "public function update(Request $request)\n { \n }" ]
[ "0.74450904", "0.7021086", "0.6926597", "0.687611", "0.687611", "0.67087024", "0.67078143", "0.6703032", "0.6694597", "0.66865027", "0.6573738", "0.65256906", "0.64981276", "0.64859897", "0.6482769", "0.64564735", "0.64413714", "0.6402719", "0.6402719", "0.6402719", "0.6402719", "0.63146293", "0.6272072", "0.626056", "0.62568116", "0.6241737", "0.62358737", "0.62348944", "0.6234492", "0.6176586", "0.6137736", "0.6128268", "0.6112745", "0.60998553", "0.60833603", "0.6078603", "0.60696477", "0.606257", "0.60532117", "0.60532117", "0.6045935", "0.60186666", "0.60150665", "0.60140795", "0.6007822", "0.60036904", "0.6001815", "0.6001815", "0.6000372", "0.599821", "0.5992195", "0.5992129", "0.5986735", "0.5986735", "0.5984455", "0.59785384", "0.5972864", "0.5969798", "0.59624106", "0.5960451", "0.5960083", "0.5958679", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.595287", "0.59376687", "0.5935678", "0.5935678", "0.59291124", "0.5924767", "0.5919699", "0.5919699", "0.5919699", "0.5919699", "0.5919699", "0.5919045", "0.59186447", "0.5915365", "0.59080684" ]
0.6352977
21
Creates a packed dictionary.
private static function packDictionary(array $dictionary) { // First byte will be the count of items in the dictionary $out = chr(count($dictionary)); // Get the binary index mapping $indexMap = self::createBinaryIndexes(count($dictionary)); $dictionary = array_keys($dictionary); foreach ($dictionary as $idx => $char) { $out = $out . chr(bindec($indexMap[$idx])) . base64_decode($char); } return $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createDictionary() {}", "public function packingCreate(array $array);", "private function packData()\n {\n $this->packedData = json_encode($this->CacheData, JSON_UNESCAPED_UNICODE);\n return $this;\n }", "public static function createExtGStateDictionary() {}", "function benc_dict($d) {\n\t$s = \"d\";\n\t$keys = array_keys($d);\n\tsort($keys);\n\tforeach ($keys as $k) {\n\t\t$v = $d[$k];\n\t\t$s .= benc_str($k);\n\t\t$s .= benc($v);\n\t}\n\t$s .= \"e\";\n\treturn $s;\n}", "public function getDictionary() {}", "public function getDictionary() {}", "public function getDictionary() {}", "public function getDictionary() {}", "public function getDictionary() {}", "public function getDictionary() {}", "public function getDictionary() {}", "public function getDictionary() {}", "function createDictionary($items = [])\n {\n return new \\Phanda\\Dictionary\\Dictionary($items);\n }", "public function getEncryptionDictionary();", "private function packMeta()\n {\n $transport = $this->modx->fromJSON(file_get_contents(__DIR__ . '/../transport.json'));\n unset($transport['support']['db']);\n\n $this->builder->setPackageAttributes([\n 'changelog' => file_get_contents(__DIR__ . '/../meta/changelog.txt'),\n 'license' => file_get_contents(__DIR__ . '/../meta/license.txt'),\n 'readme' => file_get_contents(__DIR__ . '/../meta/readme.txt'),\n 'requires' => $transport['support']\n ]);\n }", "public function getEncryptionDictionary() {}", "protected function _getDictionary() {}", "protected function _getDictionary() {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public static function pack($value) {\n if (is_float($value)) { // float\n $msgpack = new MessagePackFloat();\n } else if (is_int($value)) { // integer\n $msgpack = new MessagePackInteger();\n } else if (self::is_assoc($value)) { // map\n $msgpack = new MessagePackMap();\n } else if (is_array($value)) { // array\n $msgpack = new MessagePackArray();\n } else if (is_string($value)) { // string\n $msgpack = new MessagePackString();\n } else if (is_null($value)) { // null\n $msgpack = new MessagePackNil();\n } else if (is_bool($value)) { // boolean\n $msgpack = new MessagePackBoolean();\n } else {\n throw new \\Exception(\"Unknown object: \".get_class($value));\n }\n\n $msgpack->data = $value;\n return $msgpack;\n }", "public function createData()\n {\n $data['locations'] = ['top', 'left', 'bottom'];\n\n $data['positions'] = [\n 'top' => $this->positionCount('top'), \n 'left' => $this->positionCount('left'),\n 'bottom' => $this->positionCount('bottom'),\n ];\n\n return (object) $data;\n }", "public function getPack()\n {\n return $this->get(self::_PACK);\n }", "abstract public function toDER();", "function infoDictionary() {}", "private function packSettings()\n {\n $settings = include_once __DIR__ . '/elements/settings.php';\n if (!is_array($settings)) {\n $this->modx->log(modX::LOG_LEVEL_ERROR, 'Cannot build settings');\n } else {\n foreach ($settings as $setting) {\n $this->builder->putVehicle($this->builder->createVehicle($setting, [\n xPDOTransport::UNIQUE_KEY => 'key',\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => false\n ]));\n }\n $this->modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($settings) . ' system settings.');\n }\n }", "function des_createKeys (key) {\r\n //declaring this locally speeds things up a bit\r\n pc2bytes0 = new Array (0,0x4,0x20000000,0x20000004,0x10000,0x10004,0x20010000,0x20010004,0x200,0x204,0x20000200,0x20000204,0x10200,0x10204,0x20010200,0x20010204);\r\n pc2bytes1 = new Array (0,0x1,0x100000,0x100001,0x4000000,0x4000001,0x4100000,0x4100001,0x100,0x101,0x100100,0x100101,0x4000100,0x4000101,0x4100100,0x4100101);\r\n pc2bytes2 = new Array (0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808,0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808);\r\n pc2bytes3 = new Array (0,0x200000,0x8000000,0x8200000,0x2000,0x202000,0x8002000,0x8202000,0x20000,0x220000,0x8020000,0x8220000,0x22000,0x222000,0x8022000,0x8222000);\r\n pc2bytes4 = new Array (0,0x40000,0x10,0x40010,0,0x40000,0x10,0x40010,0x1000,0x41000,0x1010,0x41010,0x1000,0x41000,0x1010,0x41010);\r\n pc2bytes5 = new Array (0,0x400,0x20,0x420,0,0x400,0x20,0x420,0x2000000,0x2000400,0x2000020,0x2000420,0x2000000,0x2000400,0x2000020,0x2000420);\r\n pc2bytes6 = new Array (0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002,0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002);\r\n pc2bytes7 = new Array (0,0x10000,0x800,0x10800,0x20000000,0x20010000,0x20000800,0x20010800,0x20000,0x30000,0x20800,0x30800,0x20020000,0x20030000,0x20020800,0x20030800);\r\n pc2bytes8 = new Array (0,0x40000,0,0x40000,0x2,0x40002,0x2,0x40002,0x2000000,0x2040000,0x2000000,0x2040000,0x2000002,0x2040002,0x2000002,0x2040002);\r\n pc2bytes9 = new Array (0,0x10000000,0x8,0x10000008,0,0x10000000,0x8,0x10000008,0x400,0x10000400,0x408,0x10000408,0x400,0x10000400,0x408,0x10000408);\r\n pc2bytes10 = new Array (0,0x20,0,0x20,0x100000,0x100020,0x100000,0x100020,0x2000,0x2020,0x2000,0x2020,0x102000,0x102020,0x102000,0x102020);\r\n pc2bytes11 = new Array (0,0x1000000,0x200,0x1000200,0x200000,0x1200000,0x200200,0x1200200,0x4000000,0x5000000,0x4000200,0x5000200,0x4200000,0x5200000,0x4200200,0x5200200);\r\n pc2bytes12 = new Array (0,0x1000,0x8000000,0x8001000,0x80000,0x81000,0x8080000,0x8081000,0x10,0x1010,0x8000010,0x8001010,0x80010,0x81010,0x8080010,0x8081010);\r\n pc2bytes13 = new Array (0,0x4,0x100,0x104,0,0x4,0x100,0x104,0x1,0x5,0x101,0x105,0x1,0x5,0x101,0x105);\r\n\r\n //how many iterations (1 for des, 3 for triple des)\r\n var iterations = key.length > 8 ? 3 : 1; //changed by Paul 16/6/2007 to use Triple DES for 9+ byte keys\r\n //stores the return keys\r\n var keys = new Array (32 * iterations);\r\n //now define the left shifts which need to be done\r\n var shifts = new Array (0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0);\r\n //other variables\r\n var lefttemp, righttemp, m=0, n=0, temp;\r\n\r\n for (var j=0; j<iterations; j++) { //either 1 or 3 iterations\r\n left = (key.charCodeAt(m++) << 24) | (key.charCodeAt(m++) << 16) | (key.charCodeAt(m++) << 8) | key.charCodeAt(m++);\r\n right = (key.charCodeAt(m++) << 24) | (key.charCodeAt(m++) << 16) | (key.charCodeAt(m++) << 8) | key.charCodeAt(m++);\r\n\r\n temp = ((left >>> 4) ^ right) & 0x0f0f0f0f; right ^= temp; left ^= (temp << 4);\r\n temp = ((right >>> -16) ^ left) & 0x0000ffff; left ^= temp; right ^= (temp << -16);\r\n temp = ((left >>> 2) ^ right) & 0x33333333; right ^= temp; left ^= (temp << 2);\r\n temp = ((right >>> -16) ^ left) & 0x0000ffff; left ^= temp; right ^= (temp << -16);\r\n temp = ((left >>> 1) ^ right) & 0x55555555; right ^= temp; left ^= (temp << 1);\r\n temp = ((right >>> 8) ^ left) & 0x00ff00ff; left ^= temp; right ^= (temp << 8);\r\n temp = ((left >>> 1) ^ right) & 0x55555555; right ^= temp; left ^= (temp << 1);\r\n\r\n //the right side needs to be shifted and to get the last four bits of the left side\r\n temp = (left << 8) | ((right >>> 20) & 0x000000f0);\r\n //left needs to be put upside down\r\n left = (right << 24) | ((right << 8) & 0xff0000) | ((right >>> 8) & 0xff00) | ((right >>> 24) & 0xf0);\r\n right = temp;\r\n\r\n //now go through and perform these shifts on the left and right keys\r\n for (var i=0; i < shifts.length; i++) {\r\n //shift the keys either one or two bits to the left\r\n if (shifts[i]) {left = (left << 2) | (left >>> 26); right = (right << 2) | (right >>> 26);}\r\n else {left = (left << 1) | (left >>> 27); right = (right << 1) | (right >>> 27);}\r\n left &= -0xf; right &= -0xf;\r\n\r\n //now apply PC-2, in such a way that E is easier when encrypting or decrypting\r\n //this conversion will look like PC-2 except only the last 6 bits of each byte are used\r\n //rather than 48 consecutive bits and the order of lines will be according to \r\n //how the S selection functions will be applied: S2, S4, S6, S8, S1, S3, S5, S7\r\n lefttemp = pc2bytes0[left >>> 28] | pc2bytes1[(left >>> 24) & 0xf]\r\n | pc2bytes2[(left >>> 20) & 0xf] | pc2bytes3[(left >>> 16) & 0xf]\r\n | pc2bytes4[(left >>> 12) & 0xf] | pc2bytes5[(left >>> 8) & 0xf]\r\n | pc2bytes6[(left >>> 4) & 0xf];\r\n righttemp = pc2bytes7[right >>> 28] | pc2bytes8[(right >>> 24) & 0xf]\r\n | pc2bytes9[(right >>> 20) & 0xf] | pc2bytes10[(right >>> 16) & 0xf]\r\n | pc2bytes11[(right >>> 12) & 0xf] | pc2bytes12[(right >>> 8) & 0xf]\r\n | pc2bytes13[(right >>> 4) & 0xf];\r\n temp = ((righttemp >>> 16) ^ lefttemp) & 0x0000ffff; \r\n keys[n++] = lefttemp ^ temp; keys[n++] = righttemp ^ (temp << 16);\r\n }\r\n } //for each iterations\r\n //return the keys we've created\r\n return keys;\r\n}", "public function create_depts_array()\n {\n // return debug($a);\n // die;\n return array('Apps'=>array('kitchen_ken', 'smith_diedra', 'tiller_don', 'farned_v', 'scott_a', 'fryar_n', 'kyles_d', 'rrios' ),'Network'=>array('churst', 'cook_t', 'csoborowicz', 'sewell_jason'),'Systems'=>array('jstakich', 'sheppard_d', 'jpeel'));\n }", "public function createValidObject() : object {\n\t\treturn (object) [\"tweetContent\" => bin2hex(random_bytes(12))];\n\t}", "function to_entry() \n {\n $entry = array(\"entry\" => array(\"content\" => array()));\n # set file array\n $entry[\"entry\"][\"content\"][\"file\"] = array();\n foreach ($this->file_objs as $f) {\n array_push($entry[\"entry\"][\"content\"][\"file\"], $f->to_array());\n }\n # set params dict\n $entry[\"entry\"][\"content\"][\"params\"] = array();\n $entry[\"entry\"][\"content\"][\"params\"][\"name\"] = $this->name;\n $entry[\"entry\"][\"content\"][\"params\"][\"yt_id\"] = $this->yt_id;\n $entry[\"entry\"][\"content\"][\"params\"][\"tag\"] = $this->tags;\n if (! empty($this->meta_objs) ) {\n $entry[\"entry\"][\"content\"][\"params\"][\"meta\"] = array();\n foreach ($this->meta_objs as $m) {\n array_push($entry[\"entry\"][\"content\"][\"params\"][\"meta\"], $m->to_array());\n }\n }\n # set file_params dict\n $entry[\"entry\"][\"content\"][\"file_params\"] = array();\n $entry[\"entry\"][\"content\"][\"file_params\"][\"thumb_used\"] = $this->thumb_used;\n $entry[\"entry\"][\"content\"][\"file_params\"][\"update_files\"] = $this->update_files;\n # set chapters\n $entry[\"entry\"][\"content\"][\"chapter\"] = array();\n foreach ($this->chapters as $ch) {\n array_push($entry[\"entry\"][\"content\"][\"chapter\"], $ch->to_array());\n }\n # set comments\n $entry[\"entry\"][\"content\"][\"comment\"] = array();\n // foreach ($this->comments as $ch) {\n // array_push($entry[\"entry\"][\"content\"][\"comment\"], $ch->to_array());\n // }\n\n return $entry;\n }", "function createPPKeys() {\n\t$config = array(\n \"digest_alg\" => \"sha512\",\n \"private_key_bits\" => 1024,\n \"private_key_type\" => OPENSSL_KEYTYPE_RSA,\n\t);\n\n\t// Create the private and public key\n\t$res = openssl_pkey_new($config);\n\n\t// Extract the private key from $res to $privKey\n\topenssl_pkey_export($res, $privKey);\n\n\t// Extract the public key from $res to $pubKey\n\t$pubKey = openssl_pkey_get_details($res);\n\t$pubKey = $pubKey[\"key\"];\n\n\t$results = array (\n\t\t\"pub\" => $pubKey,\n\t\t\"pri\" => $privKey\n\t\t);\n\n\treturn $results;\n}", "public function structure(): array\n {\n $structure = [];\n\n $structure['shipmentNumber'] = $this->shipmentNumber;\n\n $structure['packageNumber'] = $this->packageNumber;\n\n $structure['productType'] = $this->productType;\n\n $structure['weightReal'] = $this->weightReal;\n\n $structure['weightVoulmetric'] = $this->weightVoulmetric;\n\n $structure['width'] = $this->width;\n\n $structure['length'] = $this->length;\n\n $structure['height'] = $this->height;\n\n return $structure;\n }", "public static function createDictionary($fileSpecificationString) {}", "public static function createActionDictionary() {}", "abstract protected function buildMap();", "public function getFieldDictionary() {}", "function bdec_dict($s) {\n\tif ($s[0] != \"d\")\n\treturn;\n\t$sl = strlen($s);\n\t$i = 1;\n\t$v = array();\n\t$ss = \"d\";\n\tfor (;;) {\n\t\tif ($i >= $sl)\n\t\treturn;\n\t\tif ($s[$i] == \"e\")\n\t\tbreak;\n\t\t$ret = bdec(substr($s, $i));\n\t\tif (!isset($ret) || !is_array($ret) || $ret[\"type\"] != \"string\")\n\t\treturn;\n\t\t$k = $ret[\"value\"];\n\t\t$i += $ret[\"strlen\"];\n\t\t$ss .= $ret[\"string\"];\n\t\tif ($i >= $sl)\n\t\treturn;\n\t\t$ret = bdec(substr($s, $i));\n\t\tif (!isset($ret) || !is_array($ret))\n\t\treturn;\n\t\t$v[$k] = $ret;\n\t\t$i += $ret[\"strlen\"];\n\t\t$ss .= $ret[\"string\"];\n\t}\n\t$ss .= \"e\";\n\treturn array('type' => \"dictionary\", 'value' => $v, 'strlen' => strlen($ss), 'string' => $ss);\n}", "private function newKey()\n {\n $kp = sodium_crypto_box_keypair();\n //$pk = sodium_crypto_box_secretkey($kp);\n return $kp;\n }", "public static function createOCGDictionary($name, $encoding = 'UTF-8') {}", "final protected function makeStorable()\n\t{\n\t\tassert( 'is_array( $this->usable )' );\n\n\t\tif ( data::autoType( config::get( 'session.encrypt', false ), 'boolean' ) )\n\t\t\t$this->storable = crypt::create()->encrypt( serialize( $this->usable ) );\n\t\telse\n\t\t\t$this->storable = serialize( $this->usable );\n\t}", "public function createNewKeyPair() {}", "public function createNewKeyPair() {}", "function createPackage() {\n\t\t$package = new ZipArchive();\n\t\t$package->open($this->getPackageFilePath(), ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE);\n\t\tforeach ($this->_files as $fileName => $filePath) {\n\t\t\t$package->addFile($filePath, $fileName);\n\t\t}\n\t\t$package->close();\n\t}", "public function packData($data) {\n return json_encode($data);\n }", "public function readDictionary()\n {\n $ref = $this->readInteger();\n\n $refObj = $this->getReferenceObject($ref);\n if($refObj !== false)\n return $refObj;\n\n // usingWeakTypes - irrelevant in PHP.\n $this->_stream->readInt();\n\n // Create a holder for the array in the reference list\n $data = [];\n $this->_referenceObjects[] =& $data;\n\n $ref = $ref >>1;//Get the length\n\n //We have a dense array\n for ($i=0; $i < $ref; $i++) {\n $data[] = ['key'=>$this->readTypeMarker(),'value'=>$this->readTypeMarker()];\n }\n\n return $data;\n }", "public function pack($sig);", "abstract public function createNewKeyPair() ;", "private function makePackage($files, $sword_metadata, $arr, $userid,$assigid ) \n {\n global $CFG,$DB;\n require_once('api/packager_mets_swap.php');\n \n $user=$DB->get_record('user', array('id' => $userid));\n $assignment=$DB->get_record('assignment',array('id'=> $assigid ));\n \n \n // add context metadata \n \n $datos=array(\n \"author\" => $user->firstname . ' '. $user->lastname,\n \"title\" => $assignment->name . ' ' . $user->lastname,\n \"rootin\" => sys_get_temp_dir(), \n \"dirin\" => 'moodle',\n \"rootout\" => sys_get_temp_dir().'/moodle',\n\t\"fileout\" => basename(tempnam(sys_get_temp_dir(), 'sword_').'.zip')\n\t);\n \n $filesdata=array();\n foreach ($files as $file){\n\t $filesdata[] = array (\n\t \"filename\" => $file->get_filename(),\n\t \"mimetype\" => $file->get_mimetype(),\n\t );\n \n }\n \n $datos[\"files\"]=$filesdata;\n \n \n // add default metadata\n \n \n if (($arr!=NULL) && ($sword_metadata->subject != NULL)) { \n $arr[]=$sword_metadata->subject; \n $datos[\"subject\"]=$arr;\n } else {\n if ($arr!=NULL) {\n\t $datos[\"subject\"]=array($arr);\n }\n if ($sword_metadata->subject != NULL) {\n\t $datos[\"subject\"]=array($sword_metadata->subject);\n }\n\t \n }\n \n if($sword_metadata->rights != NULL) {\n $datos[\"rights\"]=$sword_metadata->rights;\n\t error_log(\"hasta aca bien\");\n }\n\telse{\n\t\terror_log(\"no se tomo el campo rights del formulario\");\t\n\t}\n \n if($sword_metadata->language != NULL) {\n $datos[\"language\"]= $sword_metadata->language;\n }\n\telse{\n\t\terror_log(\"no se tomo el campo lenguaje del formulario\");\t\n\t}\n \n if($sword_metadata->publisher != NULL) {\n $datos[\"publisher\"]=$sword_metadata->publisher;\n }\n\t else{\n\t\terror_log(\"no se tomo el campo publicador del formulario\");\t\n\t}\n \n \n $this->makeMets($datos);\n \n return $datos[\"rootout\"].'/'.$datos[\"fileout\"];\n }", "protected function PackCompactStruct($Struct) {\n $Array= $this->UseMeta ? $Struct['Keys'] : $Struct;\n return $this->GetService('ArrayUtils')->ArrayToIni($Array).\"\\r\\n\";\n }", "function xlsBOF() {\r\n return pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); \r\n \r\n}", "private function newAccount($n=64){\r\n\t\t$data=$this->struct;\r\n\t\t$data['last']=time();\r\n\t\t$data['sign']=$this->db->char(28,'SFXX');\r\n\r\n\t\treturn array(\r\n\t\t\t'public_key'\t=>\t$this->randAccount($n),\r\n\t\t\t'data'\t\t\t=>\t$data,\r\n\t\t);\r\n\t}", "public function constructData()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\tarray('lineend' => \"\\12\"),\n\t\t\t\tarray(\n\t\t\t\t\t'lineend' => \"\\12\",\n\t\t\t\t\t'charset' => 'utf-8',\n\t\t\t\t\t'language' => 'en-gb',\n\t\t\t\t\t'direction' => 'ltr',\n\t\t\t\t\t'tab' => \"\\11\",\n\t\t\t\t\t'link' => '',\n\t\t\t\t\t'base' => ''\n\t\t\t\t)\n\t\t\t),\n\t\t\tarray(\n\t\t\t\tarray('charset' => \"euc-jp\", 'mediaversion' => '1a2b3c4d'),\n\t\t\t\tarray(\n\t\t\t\t\t'lineend' => \"\\12\",\n\t\t\t\t\t'charset' => 'euc-jp',\n\t\t\t\t\t'language' => 'en-gb',\n\t\t\t\t\t'direction' => 'ltr',\n\t\t\t\t\t'tab' => \"\\11\",\n\t\t\t\t\t'link' => '',\n\t\t\t\t\t'base' => '',\n\t\t\t\t 'mediaversion' => '1a2b3c4d'\n\t\t\t\t)\n\t\t\t),\n\t\t\tarray(\n\t\t\t\tarray('language' => \"de-de\", 'direction' => 'rtl',\n\t\t\t\t\t'tab' => 'Crazy Tab', 'link' => 'http://joomla.org',\n\t\t\t\t\t'base' => 'http://base.joomla.org/dir'),\n\t\t\t\tarray(\n\t\t\t\t\t'lineend' => \"\\12\",\n\t\t\t\t\t'charset' => 'utf-8',\n\t\t\t\t\t'language' => 'de-de',\n\t\t\t\t\t'direction' => 'rtl',\n\t\t\t\t\t'tab' => \"Crazy Tab\",\n\t\t\t\t\t'link' => 'http://joomla.org',\n\t\t\t\t\t'base' => 'http://base.joomla.org/dir'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function binarySerialize();", "protected function _pack(DomDocument $dom, $a, $node) {\n $classes = Array(\"GtkBoxPackage\");\n $props = Array();\n\n // Search for properties\n if ( isset($a->packing) ) {\n foreach ( $a->packing->property as $p ) {\n $props[((string) $p['name'])] = ((string) $p);\n }\n }\n\n // Parse packing properties\n if ( isset($props['position']) && (($pos = (int)$props['position']) >= 0) ) {\n $classes[] = \"Position_{$pos}\";\n }\n if ( isset($props['expand']) && ($props['expand'] == \"True\") ) {\n $classes[] = \"Expand\";\n }\n if ( isset($props['expand']) && ($props['expand'] == \"True\") ) {\n $classes[] = \"Fill\";\n }\n\n // Create the outer container for our node(s)\n $pack_node = $dom->createElement(\"div\");\n $pack_node->setAttribute(\"class\", implode(\" \", $classes));\n $pack_node->appendChild($node);\n return $pack_node;\n }", "final public function generateKeyPair() {\n\t\tlist($privateKeyObject, $publicKeyObject) = Salt::box_keypair();\n\t\treturn new KeyPair($privateKeyObject->toString(), $publicKeyObject->toString());\n\t}", "public static function getDefaultDictionary() {}", "public static function getDefaultDictionary() {}", "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 }", "private function toContainer(): void\n {\n $configFiles = [\n 'config' => $this->configManager->getFilePath(),\n 'router' => $this->router->getFilePath(),\n ];\n $this->container::add('configFiles', $configFiles);\n $this->container::add('config', $this->configData);\n $this->container::add('defaultLang', $this->defaultLang);\n $this->container::add('request', $this->request);\n }", "function prepare_array() {\n\n\t\t$obj['name'] = $this->name->value;\n\t\t$obj['url'] = $this->url->value;\n\t\t$obj['image'] = $this->image->value;\n\t\t$obj['description'] = $this->description->value;\n\t\t/*\n\t\tforeach($this as $key => $value) {\n\n\t\t\t$obj[$key] = $value;\n\n\t\t}\n\t*/\n\t\treturn $obj;\n\t}", "public static function build()\n {\n return call_user_func_array([(new static), 'serialize'], func_get_args());\n }", "function initialiseRecord() { //{{{\n global $map;\n \n $record = array();\n \n foreach (array_keys($map) as $tag) {\n $record[$tag] = array();\n }\n \n return $record;\n}", "function xlsBOF() \n{\necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\nreturn;\n}", "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 toHashMap(): HashMap;", "function c_kv($arr)\n {\n if ( ! array_has($arr, ['k', 'v', 'ins_name', 'ins_id']))\n return ee(2);\n $ins = M($arr['ins_name'], 'kv');\n $r = $ins->create($arr);\n return $r ? ss($ins) : ee(1);\n }", "protected function pack($data): string\n {\n return \\serialize($data);\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 public function createSecretKey();", "public function pack()\n {\n return pack('C', $this->getCode());\n }", "private function packResources()\n {\n $resources = include_once __DIR__ . '/elements/resources.php';\n if (!is_array($resources)) {\n $this->modx->log(modX::LOG_LEVEL_ERROR, 'Cannot build resources');\n } else {\n foreach ($resources as $resource) {\n $this->builder->putVehicle($this->builder->createVehicle($resource, [\n xPDOTransport::UNIQUE_KEY => 'id',\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true\n ]));\n }\n $this->modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($resources) . ' resources.');\n }\n }", "function xlsBOF() { \necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); \nreturn; \n}", "protected function createPayload()\n {\n if ($this->data instanceof Closure) {\n $closure = serialize(new Helpers\\SerializableClosure($this->data));\n $data = compact('closure');\n } else {\n $data = $this->data;\n }\n\n return json_encode(array('id' => $this->id, 'class' => $this->class, 'data' => $data));\n }", "public function create()\n {\n return view('admin.dict.dicts.create');\n }", "public static function init_stored_data() {\n\t\t$data = [\n\t\t\t'db_version' => COMMONWP_VERSION,\n\t\t\t'active' => [],\n\t\t\t'inactive' => [],\n\t\t\t'queue' => [],\n\t\t];\n\n\t\treturn $data;\n\t}", "function createKey($bits = 1024, $timeout = false, $partial = array())\n {\n if (!defined('CRYPT_RSA_EXPONENT')) {\n // http://en.wikipedia.org/wiki/65537_%28number%29\n define('CRYPT_RSA_EXPONENT', '65537');\n }\n // per <http://cseweb.ucsd.edu/~hovav/dist/survey.pdf#page=5>, this number ought not result in primes smaller\n // than 256 bits. as a consequence if the key you're trying to create is 1024 bits and you've set CRYPT_RSA_SMALLEST_PRIME\n // to 384 bits then you're going to get a 384 bit prime and a 640 bit prime (384 + 1024 % 384). at least if\n // CRYPT_RSA_MODE is set to self::MODE_INTERNAL. if CRYPT_RSA_MODE is set to self::MODE_OPENSSL then\n // CRYPT_RSA_SMALLEST_PRIME is ignored (ie. multi-prime RSA support is more intended as a way to speed up RSA key\n // generation when there's a chance neither gmp nor OpenSSL are installed)\n if (!defined('CRYPT_RSA_SMALLEST_PRIME')) {\n define('CRYPT_RSA_SMALLEST_PRIME', 4096);\n }\n\n // OpenSSL uses 65537 as the exponent and requires RSA keys be 384 bits minimum\n if (CRYPT_RSA_MODE == self::MODE_OPENSSL && $bits >= 384 && CRYPT_RSA_EXPONENT == 65537) {\n $config = array();\n if (isset($this->configFile)) {\n $config['config'] = $this->configFile;\n }\n $rsa = openssl_pkey_new(array('private_key_bits' => $bits) + $config);\n openssl_pkey_export($rsa, $privatekey, null, $config);\n $publickey = openssl_pkey_get_details($rsa);\n $publickey = $publickey['key'];\n\n $privatekey = call_user_func_array(array($this, '_convertPrivateKey'), array_values($this->_parseKey($privatekey, self::PRIVATE_FORMAT_PKCS1)));\n $publickey = call_user_func_array(array($this, '_convertPublicKey'), array_values($this->_parseKey($publickey, self::PUBLIC_FORMAT_PKCS1)));\n\n // clear the buffer of error strings stemming from a minimalistic openssl.cnf\n while (openssl_error_string() !== false) {\n }\n\n return array(\n 'privatekey' => $privatekey,\n 'publickey' => $publickey,\n 'partialkey' => false\n );\n }\n\n static $e;\n if (!isset($e)) {\n $e = new BigInteger(CRYPT_RSA_EXPONENT);\n }\n\n extract($this->_generateMinMax($bits));\n $absoluteMin = $min;\n $temp = $bits >> 1; // divide by two to see how many bits P and Q would be\n if ($temp > CRYPT_RSA_SMALLEST_PRIME) {\n $num_primes = floor($bits / CRYPT_RSA_SMALLEST_PRIME);\n $temp = CRYPT_RSA_SMALLEST_PRIME;\n } else {\n $num_primes = 2;\n }\n extract($this->_generateMinMax($temp + $bits % $temp));\n $finalMax = $max;\n extract($this->_generateMinMax($temp));\n\n $generator = new BigInteger();\n\n $n = $this->one->copy();\n if (!empty($partial)) {\n extract(unserialize($partial));\n } else {\n $exponents = $coefficients = $primes = array();\n $lcm = array(\n 'top' => $this->one->copy(),\n 'bottom' => false\n );\n }\n\n $start = time();\n $i0 = count($primes) + 1;\n\n do {\n for ($i = $i0; $i <= $num_primes; $i++) {\n if ($timeout !== false) {\n $timeout-= time() - $start;\n $start = time();\n if ($timeout <= 0) {\n return array(\n 'privatekey' => '',\n 'publickey' => '',\n 'partialkey' => serialize(array(\n 'primes' => $primes,\n 'coefficients' => $coefficients,\n 'lcm' => $lcm,\n 'exponents' => $exponents\n ))\n );\n }\n }\n\n if ($i == $num_primes) {\n list($min, $temp) = $absoluteMin->divide($n);\n if (!$temp->equals($this->zero)) {\n $min = $min->add($this->one); // ie. ceil()\n }\n $primes[$i] = $generator->randomPrime($min, $finalMax, $timeout);\n } else {\n $primes[$i] = $generator->randomPrime($min, $max, $timeout);\n }\n\n if ($primes[$i] === false) { // if we've reached the timeout\n if (count($primes) > 1) {\n $partialkey = '';\n } else {\n array_pop($primes);\n $partialkey = serialize(array(\n 'primes' => $primes,\n 'coefficients' => $coefficients,\n 'lcm' => $lcm,\n 'exponents' => $exponents\n ));\n }\n\n return array(\n 'privatekey' => '',\n 'publickey' => '',\n 'partialkey' => $partialkey\n );\n }\n\n // the first coefficient is calculated differently from the rest\n // ie. instead of being $primes[1]->modInverse($primes[2]), it's $primes[2]->modInverse($primes[1])\n if ($i > 2) {\n $coefficients[$i] = $n->modInverse($primes[$i]);\n }\n\n $n = $n->multiply($primes[$i]);\n\n $temp = $primes[$i]->subtract($this->one);\n\n // textbook RSA implementations use Euler's totient function instead of the least common multiple.\n // see http://en.wikipedia.org/wiki/Euler%27s_totient_function\n $lcm['top'] = $lcm['top']->multiply($temp);\n $lcm['bottom'] = $lcm['bottom'] === false ? $temp : $lcm['bottom']->gcd($temp);\n\n $exponents[$i] = $e->modInverse($temp);\n }\n\n list($temp) = $lcm['top']->divide($lcm['bottom']);\n $gcd = $temp->gcd($e);\n $i0 = 1;\n } while (!$gcd->equals($this->one));\n\n $d = $e->modInverse($temp);\n\n $coefficients[2] = $primes[2]->modInverse($primes[1]);\n\n // from <http://tools.ietf.org/html/rfc3447#appendix-A.1.2>:\n // RSAPrivateKey ::= SEQUENCE {\n // version Version,\n // modulus INTEGER, -- n\n // publicExponent INTEGER, -- e\n // privateExponent INTEGER, -- d\n // prime1 INTEGER, -- p\n // prime2 INTEGER, -- q\n // exponent1 INTEGER, -- d mod (p-1)\n // exponent2 INTEGER, -- d mod (q-1)\n // coefficient INTEGER, -- (inverse of q) mod p\n // otherPrimeInfos OtherPrimeInfos OPTIONAL\n // }\n\n return array(\n 'privatekey' => $this->_convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients),\n 'publickey' => $this->_convertPublicKey($n, $e),\n 'partialkey' => false\n );\n }", "function init () {\r\n\t$this->A = 0x6745 << 16 | 0x2301;\r\n\t$this->B = 0xefcd << 16 | 0xab89;\r\n\t$this->C = 0x98ba << 16 | 0xdcfe;\r\n\t$this->D = 0x1032 << 16 | 0x5476;\r\n\t$this->E = 0xc3d2 << 16 | 0xe1f0;\r\n\t$this->ta = $this->A;\r\n\t$this->tb = $this->B;\r\n\t$this->tc = $this->C;\r\n\t$this->td = $this->D;\r\n\t$this->te = $this->E;\r\n\t$this->K0_19 = 0x5a82 << 16 | 0x7999;\r\n\t$this->K20_39 = 0x6ed9 << 16 | 0xeba1;\r\n\t$this->K40_59 = 0x8f1b << 16 | 0xbcdc;\r\n\t$this->K60_79 = 0xca62 << 16 | 0xc1d6;\r\n\r\n $this->buffer = array();\r\n $this->buffsize = 0;\r\n $this->totalsize = 0;\r\n }", "function xlsBOF() {\r\necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\r\nreturn;\r\n}", "function xlsBOF() {\r\necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\r\nreturn;\r\n}", "function xlsBOF() {\r\necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\r\nreturn;\r\n}", "public static function createActionDictionary($name) {}", "function wddx_serialize_value($value){\n \t //typecast\n \t $value = (array)$value;\n\n \t $toReturn = '<struct>';\n \t foreach($value as $key => $val){\n if(is_array($val)){\n if(is_array($val[0])){\n $toReturn .= '<var name=\"'.$key.'\"><array length=\"'.count($val).'\">'.$this->wddx_serialize_value($val).'</array></var>';\n }else{\n //$toReturn .= '<struct>';\n foreach($val as $mk => $mv){\n \n if(is_int($mv)){\n $type = 'number';\n }else{\n $type = 'string';\n }\n\n $toReturn .= '<var name=\"'.$mk.'\"><'.$type.'>'.$mv.'</'.$type.'></var>';\n }\n //$toReturn .= '</struct>';\n }\n }else{\n\n if(is_int($val)){\n $type = 'number';\n }else{\n $type = 'string';\n }\n\n \t $toReturn .= '<var name=\"'.$key.'\"><'.$type.'>'.$val.'</'.$type.'></var>';\n }\n \t }\n \t $toReturn .= '</struct>';\n \t \n \t return $toReturn;\n \t}", "public function createKeyString()\n\t{\n\t\t$keystring = $this->factory->createKeyString( $this ) ;\n\t\treturn $keystring ;\n\t}", "private function getCardPack()\n {\n return [\n 0 => '2C', 1 => '3C', 2 => '4C', 3 => '5C', 4 => '6C', 5 => '7C', 6 => '8C', 7 => '9C', 8 => '10C', 9 => 'JC', 10 => 'QC', 11 => 'KC', 12 => 'AC',\n 13 => '2D', 14 => '3D', 15 => '4D', 16 => '5D', 17 => '6D', 18 => '7D', 19 => '8D', 20 => '9D', 21 => '10D', 22 => 'JD', 23 => 'QD', 24 => 'KD', 25 => 'AD',\n 26 => '2H', 27 => '3H', 28 => '4H', 29 => '5H', 30 => '6H', 31 => '7H', 32 => '8H', 33 => '9H', 34 => '10H', 35 => 'JH', 36 => 'QH', 37 => 'KH', 38 => 'AH',\n 39 => '2S', 40 => '3S', 41 => '4S', 42 => '5S', 43 => '6S', 44 => '7S', 45 => '8S', 46 => '9S', 47 => '10S', 48 => 'JS', 49 => 'QS', 50 => 'KS', 51 => 'AS',\n ];\n }", "private function populateSizes() {\n\n $allocatedSize = $this->LONG_SIZE;\n $hashNextSize = $this->LONG_SIZE;\n $valueSize = $this->LONG_SIZE;\n $flagsSize = $this->CHAR_SIZE;\n $this->CHUNK_META_SIZE = self::MAX_KEY_LENGTH + $hashNextSize + $allocatedSize + $valueSize + $flagsSize;\n\n $this->ZONE_META_SIZE = $this->LONG_SIZE;\n\n $this->MAX_CHUNK_SIZE = self::ZONE_SIZE - $this->ZONE_META_SIZE;\n $this->MIN_CHUNK_SIZE = $this->CHUNK_META_SIZE + self::MIN_VALUE_ALLOC_SIZE;\n $this->MAX_VALUE_SIZE = $this->MAX_CHUNK_SIZE - $this->CHUNK_META_SIZE;\n\n // Note: we cast to (int) so that this is not a float value. Otherwise\n // PHP's === doesn't work when comparing with ints, because 42 !== 42.0.\n $this->ZONE_COUNT = (int) floor( $this->zonesArea->size / self::ZONE_SIZE );\n\n $this->MAX_CHUNKS_PER_ZONE = (int) floor( ( self::ZONE_SIZE - $this->ZONE_META_SIZE ) / $this->MIN_CHUNK_SIZE );\n $this->MAX_CHUNKS = (int) ( $this->MAX_CHUNKS_PER_ZONE * $this->ZONE_COUNT );\n\n $this->MAX_TOTAL_VALUE_SIZE = (int) ( $this->ZONE_COUNT * $this->MAX_VALUE_SIZE );\n\n $this->SHM_SIZE = (int) shmop_size( $this->shm );\n }", "public function __construct($data, $format, $password = null, $alg = 'PBES2-HS256+A128KW') {\n switch ($format) {\n case 'php':\n case 'json':\n case 'jwe':\n parent::__construct($data, $format, $password, $alg);\n break;\n case 'pem':\n $offset = 0;\n $jwk = array();\n\n if (preg_match(Key::PEM_PUBLIC, $data, $matches)) {\n $der = base64_decode($matches[1]);\n\n if ($der === FALSE) throw new KeyException('Cannot read PEM key');\n\n $offset += ASN1::readDER($der, $offset, $value); // SEQUENCE\n $offset += ASN1::readDER($der, $offset, $value); // SEQUENCE\n $offset += ASN1::readDER($der, $offset, $algorithm); // OBJECT IDENTIFIER - AlgorithmIdentifier\n\n $algorithm = ASN1::decodeOID($algorithm);\n if ($algorithm != self::OID) throw new KeyException('Not RSA key');\n\n\n $offset += ASN1::readDER($der, $offset, $value); // NULL - parameters\n $offset += ASN1::readDER($der, $offset, $value, true); // BIT STRING\n $offset += ASN1::readDER($der, $offset, $value); // SEQUENCE\n $offset += ASN1::readDER($der, $offset, $n); // INTEGER [n]\n $offset += ASN1::readDER($der, $offset, $e); // INTEGER [e]\n\n $jwk['kty'] = self::KTY;\n $jwk['n'] = Util::base64url_encode($n);\n $jwk['e'] = Util::base64url_encode($e);\n } elseif (preg_match(self::PEM_PRIVATE, $data, $matches)) {\n $der = base64_decode($matches[1]);\n\n if ($der === FALSE) throw new KeyException('Cannot read PEM key');\n\n $offset += ASN1::readDER($der, $offset, $data); // SEQUENCE\n $offset += ASN1::readDER($der, $offset, $version); // INTEGER\n\n if (ord($version) != 0) throw new KeyException('Unsupported RSA private key version');\n\n $offset += ASN1::readDER($der, $offset, $n); // INTEGER [n]\n $offset += ASN1::readDER($der, $offset, $e); // INTEGER [e]\n $offset += ASN1::readDER($der, $offset, $d); // INTEGER [d]\n $offset += ASN1::readDER($der, $offset, $p); // INTEGER [p]\n $offset += ASN1::readDER($der, $offset, $q); // INTEGER [q]\n $offset += ASN1::readDER($der, $offset, $dp); // INTEGER [dp]\n $offset += ASN1::readDER($der, $offset, $dq); // INTEGER [dq]\n $offset += ASN1::readDER($der, $offset, $qi); // INTEGER [qi]\n if (strlen($der) > $offset) ASN1::readDER($der, $offset, $oth); // INTEGER [other]\n\n $jwk['kty'] = self::KTY;\n $jwk['n'] = Util::base64url_encode($n);\n $jwk['e'] = Util::base64url_encode($e);\n $jwk['d'] = Util::base64url_encode($d);\n $jwk['p'] = Util::base64url_encode($p);\n $jwk['q'] = Util::base64url_encode($q);\n $jwk['dp'] = Util::base64url_encode($dp);\n $jwk['dq'] = Util::base64url_encode($dq);\n $jwk['qi'] = Util::base64url_encode($qi);\n }\n\n parent::__construct($jwk);\n break;\n default:\n throw new KeyException('Incorrect format');\n }\n\n if (!isset($this->data['kty'])) $this->data['kty'] = self::KTY;\n }", "public function\n createKey()\n {\n $customer_private_key = null;\n $privateKey = openssl_pkey_new(array(\n 'digest_alg' => 'sha512',\n 'private_key_bits' => 4096,\n 'private_key_type' => OPENSSL_KEYTYPE_RSA,\n ));\n\n// export private key\n $result = openssl_pkey_export($privateKey,\n $customer_private_key, $this->getPassphrase());\n// generate public key from the private key\n $customer_public_key_array = openssl_pkey_get_details($privateKey);\n $this->setPublicKey($customer_public_key_array['key']);\n $this->setPrivateKey($customer_private_key);\n openssl_free_key($privateKey);\n return $result;\n }", "protected function constructExportObject()\n\t{\n\t\t//default export is \"all public fields\"\n\t\treturn (object) Arrays::getPublicPropertiesOfObject($this);\n\t}", "private function writeKeyValues(array $arr)\n\t{\n\t\t$buffer = \"\";\n\t\tforeach ($arr as $key => $value) {\n\t\t\t$keyLength = strlen($key);\n\t\t\t$valueLength = strlen($value);\n\t\t\tif ($keyLength <= 0x7f) {\n\t\t\t\t$buffer .= pack(\"C\", $keyLength);\n\t\t\t} else {\n\t\t\t\t$buffer .= pack(\"N\", $keyLength | 0x80000000);\n\t\t\t}\n\t\t\tif ($valueLength <= 0x7f) {\n\t\t\t\t$buffer .= pack(\"C\", $valueLength);\n\t\t\t} else {\n\t\t\t\t$buffer .= pack(\"N\", $keyLength | 0x80000000);\n\t\t\t}\n\t\t\t$buffer .= $key;\n\t\t\t$buffer .= $value;\n\t\t}\n\t\treturn $buffer;\n\t}", "function packBitValues($atoms)\n\t{\n\t\tarray_push($this->FMDebug, \"packBitsValues\");\n\n\t\tif (!(is_string($atoms))) {\n\n\t\t\t$this->FMError(\"packBitValues argument not a string\");\n\t\t}\n\n\t\t$atoms = $atoms . str_repeat(\"0\", (int) ((ceil(strlen($atoms) / 8)) * 8 - strlen($atoms)));\n\n\t\t$limit = ceil(strlen($atoms) / 8);\n\n\t\t$bytestream = \"\";\n\n\t\tfor ($n = 0; $n < $limit; $n++) {\n\n\t\t\t$bytestream .= chr(base_convert(substr($atoms, 0, 8), 2, 10));\n\t\t\t$atoms = substr($atoms, 8);\n\t\t}\n\n\t\tarray_pop($this->FMDebug);\n\n\t\treturn $bytestream;\n\t}", "static function generate3($name, $ns) {\n if (!$ns instanceof self)\n $ns = static::fromString($ns);\n $values = unpack('n8', md5($ns->bytes . $name, true));\n $values[2] = $values[2] & 0x0FFF | (0x3 << 12);\n $values[4] = $values[4] & 0x3FFF | (0x1 << 14);\n return new static(pack('n*', ...$values));\n }" ]
[ "0.67360246", "0.5620964", "0.5508225", "0.5467568", "0.52414894", "0.5128614", "0.5128614", "0.5128614", "0.5128614", "0.5128614", "0.5128614", "0.5128614", "0.51281536", "0.5103027", "0.5030998", "0.49749827", "0.49540034", "0.49500006", "0.49500006", "0.4940149", "0.4940149", "0.4940149", "0.4940149", "0.4940149", "0.4940149", "0.49367267", "0.49367267", "0.49367267", "0.49367267", "0.49307513", "0.49081352", "0.4889596", "0.4810246", "0.47951648", "0.47479096", "0.47312045", "0.4714879", "0.46918288", "0.46908385", "0.464084", "0.4608659", "0.45975393", "0.4569099", "0.45468327", "0.4545059", "0.45361102", "0.4515939", "0.45112133", "0.447795", "0.44663304", "0.446455", "0.44467193", "0.44441763", "0.44385904", "0.4434924", "0.44201502", "0.440346", "0.43852526", "0.43849728", "0.4361041", "0.43362936", "0.4335036", "0.4329938", "0.43252784", "0.43090695", "0.43090695", "0.43048534", "0.42992273", "0.42807752", "0.42731106", "0.4272538", "0.42705894", "0.42634693", "0.42601177", "0.4257658", "0.42466325", "0.42420724", "0.42400795", "0.42287436", "0.42251372", "0.42137727", "0.42112085", "0.42093974", "0.4207742", "0.4206351", "0.41954422", "0.41886526", "0.41886526", "0.41886526", "0.4178202", "0.41726846", "0.41673946", "0.4167117", "0.41539994", "0.41538626", "0.4152134", "0.41493586", "0.4148739", "0.41486976", "0.41486183" ]
0.44000864
57
Returns a bit mapping array like this: 100 101 111
private static function createBinaryIndexes($count) { // Start a counter to base our binary frame on $startOffset = 0; // Start a loop that we will manually break out of while (1) { $out = array(); foreach (range(1, $count) as $range) { $out[] = decbin($startOffset + $range); } // Make sure that no index is the prefix of any another $found = false; foreach ($out as $v1) { foreach ($out as $v2) { if ($v1 !== $v2 && strpos($v1, $v2) === 0) { $found = true; } } } // Once a mapping is accepted, return it as an array if (!$found) { return $out; } // ... otherwise, try again from the next highest position $startOffset = $startOffset + 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function base32LookupTable() : array\n {\n return [\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n '=' // padding char\n ];\n }", "public static function bitMapToArray($data)\n {\n if (strlen($data) == 0) {\n return null;\n }\n\n $output = array();\n $offset = 0;\n $length = strlen($data);\n\n while ($offset < $length) {\n \n //\n // unpack the window and length values\n //\n $x = unpack('@' . $offset . '/Cwindow/Clength', $data);\n $offset += 2;\n\n //\n // copy out the bitmap value\n //\n $bitmap = unpack('C*', substr($data, $offset, $x['length']));\n $offset += $x['length'];\n\n //\n // I'm not sure if there's a better way of doing this, but PHP doesn't\n // have a 'B' flag for unpack()\n //\n $bitstr = '';\n foreach ($bitmap as $r) {\n \n $bitstr .= sprintf('%08b', $r);\n }\n\n $blen = strlen($bitstr);\n for ($i=0; $i<$blen; $i++) {\n\n if ($bitstr[$i] == '1') {\n \n $type = $x['window'] * 256 + $i;\n\n if (isset(Net_DNS2_Lookups::$rr_types_by_id[$type])) {\n\n $output[] = Net_DNS2_Lookups::$rr_types_by_id[$type];\n } else {\n\n $output[] = 'TYPE' . $type;\n }\n }\n }\n }\n\n return $output;\n }", "static private function getBits($entier){\n $bits = array();\n for ($i=0; $i<8; $i++){\n $bits[$i] = $entier & (128 >> $i) ? 1 : 0;\n }\n return $bits;\n }", "protected function _getBase32LookupTable()\n {\n return array(\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n '=' // padding char\n );\n }", "protected function _getBase32LookupTable()\n {\n return array(\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n '=', // padding char\n );\n }", "protected static function _getBase32LookupTable()\n {\n return array(\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n );\n }", "public static function arrayToBitMap(array $data)\n {\n if (count($data) == 0) {\n return null;\n }\n\n $current_window = 0;\n\n //\n // go through each RR\n //\n $max = 0;\n $bm = array();\n\n foreach ($data as $rr) {\n \n $rr = strtoupper($rr);\n\n //\n // get the type id for the RR\n //\n $type = @Net_DNS2_Lookups::$rr_types_by_name[$rr];\n if (isset($type)) {\n\n //\n // skip meta types or qtypes\n // \n if ( (isset(Net_DNS2_Lookups::$rr_qtypes_by_id[$type]))\n || (isset(Net_DNS2_Lookups::$rr_metatypes_by_id[$type]))\n ) {\n continue;\n }\n\n } else {\n\n //\n // if it's not found, then it must be defined as TYPE<id>, per\n // RFC3845 section 2.2, if it's not, we ignore it.\n //\n list($name, $type) = explode('TYPE', $rr);\n if (!isset($type)) {\n\n continue;\n }\n }\n\n //\n // build the current window\n //\n $current_window = (int)($type / 256);\n \n $val = $type - $current_window * 256.0;\n if ($val > $max) {\n $max = $val;\n }\n\n $bm[$current_window][$val] = 1;\n $bm[$current_window]['length'] = ceil(($max + 1) / 8);\n }\n\n $output = '';\n\n foreach ($bm as $window => $bitdata) {\n\n $bitstr = '';\n\n for ($i=0; $i<$bm[$window]['length'] * 8; $i++) {\n if (isset($bm[$window][$i])) {\n $bitstr .= '1';\n } else {\n $bitstr .= '0';\n }\n }\n\n $output .= pack('CC', $window, $bm[$window]['length']);\n $output .= pack('H*', self::bigBaseConvert($bitstr));\n }\n\n return $output;\n }", "public function getBits();", "private static function _get_base32_lookup_table()\n {\n return array(\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n '=' // padding char\n );\n }", "function browseAndStoreBitValues($bits)\n {\n $values = [];\n\n foreach (str_split($bits) as $index => $bit) {\n if ($bit) {\n $values[] = $index + 1;\n }\n }\n\n return $values;\n }", "private static function getBase32LookupTable()\n\t{\n\t\treturn array(\n\t\t\t'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n\t\t\t'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n\t\t\t'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n\t\t\t'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31,\n\t\t\t'='\n\t\t);\n\t}", "public function getBits(): int;", "protected function map():array {return df_map_r(function(int $v):array {return [\"sha$v\", \"SHA-$v\"];}, [1, 256, 512]);}", "private function doGetOrdinalsBin()\n {\n /** @var string $bitset */\n $bitset = $this->bitset;\n $ordinals = [];\n $byteLen = \\strlen($bitset);\n for ($bytePos = 0; $bytePos < $byteLen; ++$bytePos) {\n if ($bitset[$bytePos] === \"\\0\") {\n // fast skip null byte\n continue;\n }\n\n $ord = \\ord($bitset[$bytePos]);\n for ($bitPos = 0; $bitPos < 8; ++$bitPos) {\n if ($ord & (1 << $bitPos)) {\n $ordinals[] = $bytePos * 8 + $bitPos;\n }\n }\n }\n return $ordinals;\n }", "function _generateMinMax($bits)\n {\n $bytes = $bits >> 3;\n $min = str_repeat(chr(0), $bytes);\n $max = str_repeat(chr(0xFF), $bytes);\n $msb = $bits & 7;\n if ($msb) {\n $min = chr(1 << ($msb - 1)) . $min;\n $max = chr((1 << $msb) - 1) . $max;\n } else {\n $min[0] = chr(0x80);\n }\n\n return array(\n 'min' => new BigInteger($min, 256),\n 'max' => new BigInteger($max, 256)\n );\n }", "public static function buildBinaryLookupTable(\n\t\t$maxBitCount)\n\t{\n\t\t$table = [];\n\t\tfor ($bitPosition = 0; $bitPosition < $maxBitCount; ++$bitPosition) {\n\t\t\t$bitValue = bcpow('2', (string) $bitPosition, 0);\n\t\t\t$table[] = $bitValue;\n\t\t}\n\n\t\treturn $table;\n\t}", "function acucTo8Bit( $arrayPasscode )\r\n{\r\n\t$returnArrayCode = array();\r\n\t\r\n\t$bit6Idx = 0;\r\n\t$bit8Idx = 0;\r\n\t$byte6Idx = 0;\r\n\t$byte8Idx = 0;\r\n\t\r\n\t$valueByte = 0;\r\n\t$currentBit = 0;\r\n\t\r\n\twhile( true )\r\n\t{\r\n\t\t$currentBit = ( $arrayPasscode[ $byte6Idx ] >> $bit6Idx ) & 0x01;\r\n\t\t$currentBit <<= $bit8Idx;\r\n\t\t$bit6Idx++;\r\n\t\t$bit8Idx++;\r\n\t\t$valueByte |= $currentBit;\r\n\t\t\r\n\t\tif($bit8Idx == 8)\r\n\t\t{\r\n\t\t\t$returnArrayCode[ $byte8Idx ] = $valueByte;\r\n\t\t\t$byte8Idx++;\r\n\t\t\tif( $byte8Idx == 21 )\r\n\t\t\t\treturn $returnArrayCode;\r\n\t\t\t$bit8Idx = 0;\r\n\t\t\t$valueByte = 0;\r\n\t\t}\r\n\t\tif($bit6Idx == 6)\r\n\t\t{\r\n\t\t\t$bit6Idx = 0;\r\n\t\t\t$byte6Idx++;\r\n\t\t}\r\n\t}\r\n}", "static function _utf2AsciiMap(): array {\n $map = [];\n foreach (\\hbc\\core\\StrX::charsArray() as $to => $from) {\n foreach ($from as $f) {\n $map[$f] = $to;\n }\n }\n\n return $map;\n }", "public function testBitArray()\n {\n $array = new BitArray(19);\n for ($i = 0; $i < 19; $i++) {\n $this->assertEquals(0, $array[$i]);\n if ($i == 0 || ($i > 7 && $i < 18)) {\n $array[$i] = 1;\n } else {\n $array[$i] = 0;\n }\n }\n\n for ($i = 0; $i < 19; $i++) {\n if ($i == 0 || ($i > 7 && $i < 18)) {\n $this->assertEquals(1, $array[$i]);\n } else {\n $this->assertEquals(0, $array[$i]);\n }\n }\n\n //\tdouble-check the internal representation \n $vals = unpack(\"C*\", $array->getData());\n $this->assertEquals(1, $vals[1]);\n $this->assertEquals(255, $vals[2]);\n $this->assertEquals(3, $vals[3]);\n\n\n //\texercise the BitStreamReader and BitStreamWriter a bit\n $writer = new BitStreamWriter();\n foreach ($array as $bit) {\n $writer->writeBit($bit);\n }\n\n $reader = new BitStreamReader($writer->getData());\n foreach ($array as $bit) {\n $this->assertEquals($bit, $reader->readBit());\n }\n }", "private static function bitStringTo2DArray( $digit ){\n \t$d = array();\n \t$len = strlen($digit);\n \tfor($i=0; $i<$len; $i++) $d[$i] = $digit[$i];\n \treturn(array($d));\n }", "function translate($binary){\n $exploded = str_split($binary);\n $output_array = array();\n $offset = 0;\n \n foreach($exploded as $digit){\n if(!isset($output_array[0])){\n $output_array[] = array($digit, 1);\n } else {\n if($digit == $output_array[$offset][0]){\n $output_array[$offset][1]++;\n } else {\n $output_array[] = array($digit, 1);\n $offset++;\n }\n }\n }\n $final_array = array();\n foreach($output_array as $block){\n $number2 = '';\n $value = $block[0];\n $number = $block[1];\n if($value == '1'){\n $value = '0';\n } else {\n $value = '00';\n }\n for($i = 1; $i <= $number; $i++){\n $number2 .= '0';\n }\n $final_array[] = $value;\n $final_array[] = $number2;\n }\n $output = implode(' ', $final_array);\n \n return $output;\n}", "function toBinary($n1)\n {\n $n = $n1;\n $binaryNum = array();\n\n $i = 0;\n while ($n > 0) {\n\n $binaryNum[$i] = $n % 2;\n $n = (int) ($n / 2);\n $i++;\n }\n echo \"Binary representation of \" . $n1 . \" is : \";\n\n for ($j = $i - 1; $j >= 0; $j--) {\n echo $binaryNum[$j];\n }\n }", "function barr(&$R,$n,$m=\"\")\n\t\t{\n\t\treturn $this->Zarr($R,\"int16\",$n,$m);\n\t\t}", "public function getDefaultDecodeArray($bitsPerComponent = null) {}", "function mirrorBits($a) {\n return bindec(strrev(decbin($a)));\n}", "public function readBits() {}", "function generateBit($freq = array(), $codes = array()){\n\t\t$bit = \"\";\t\t//inisialisasi bit\n\n\t for($i = 0; $i < strlen($this->textInside); $i++)\t\t//melakukan perulangan sebanyak text \n\t $bit.=$codes[array_search($this->textInside[$i], array_keys($freq))]; //mencari char ke-i dalam freq dan menambahkannya ke dalam bit\n\n\t return $bit;\t\t//mengembalikan nilai bit\n\t}", "public function setValueBitColumns()\n {\n // Get BIT columns\n $columns = $this->Model->bitColumns;\n foreach ($columns as $column) {\n $this->Request[$column] = (isset($this->Request[$column])) ? 1 : 0;\n }\n }", "private function binarize($value, $flag = null)\n {\n if (!isset($this->map[$value])) {\n $this->map[$value] = 1 << count($this->map);\n $this->binarized[$this->map[$value]] = null === $flag ? $value : $flag;\n }\n\n return $this->map[$value];\n }", "static private function placeBitInDatamatrix(&$datamatrix, &$assigned, $bit, $row, $col, $totalRows, $totalCols){\n if ($row < 0) {\n $row += $totalRows;\n $col += 4 - (($totalRows+4)%8);\n }\n if ($col < 0) {\n $col += $totalCols;\n $row += 4 - (($totalCols+4)%8);\n }\n if (!isset($assigned[$row][$col]) || $assigned[$row][$col] != 1) {\n $datamatrix[$row][$col] = $bit;\n $assigned[$row][$col] = 1;\n }\n }", "private function doGetIteratorBin()\n {\n /** @var string $bitset */\n $bitset = $this->bitset;\n $byteLen = \\strlen($bitset);\n for ($bytePos = 0; $bytePos < $byteLen; ++$bytePos) {\n if ($bitset[$bytePos] === \"\\0\") {\n // fast skip null byte\n continue;\n }\n\n $ord = \\ord($bitset[$bytePos]);\n for ($bitPos = 0; $bitPos < 8; ++$bitPos) {\n if ($ord & (1 << $bitPos)) {\n $ordinal = $bytePos * 8 + $bitPos;\n yield $ordinal => ($this->enumeration)::byOrdinal($ordinal);\n }\n }\n }\n }", "function toBin($str){\n $str = (string)$str;\n $l = strlen($str);\n $result = '';\n while($l--){\n $result = str_pad(decbin(ord($str[$l])),8,\"0\",STR_PAD_LEFT).$result;\n }\n return $result;\n }", "function init_L($IP_M){\n $L = array();\n for($i=0; $i<32; $i++){\n $L[$i] = $IP_M[$i];\n }\n\n return $L;\n }", "public function addBitMap($fieldName, $generationMode = Faker::RANDOM_VALUE, $minOrFix = null, $max = null)\n {\n $this->columns[$fieldName] = array(\n \"type\" => Faker::TYPE_BITMAP,\n \"random\" => $generationMode == Faker::RANDOM_VALUE ? true : false,\n \"fixValue\" => $generationMode == Faker::RANDOM_VALUE ? null : $minOrFix,\n \"min\" => $generationMode == Faker::RANDOM_VALUE ? $minOrFix : null,\n \"max\" => $generationMode == Faker::RANDOM_VALUE ? $max : null,\n );\n return $this;\n }", "function buildArrayOfIntegers($arr){\n\t\t\t$arrizzle = array();\n\t\t\tfor ($i = 0; $i < count($arr); $i++){\n\t\t\t\t$arrizzle[] = $i;\n\t\t\t}\n\t\t\treturn $arrizzle;\n\t\t}", "public function getFlags() : array\n {\n $arrFlags = [];\n foreach (self::FLAGS as $strFlag => $intBitValue) {\n if ($this->_checkFlag($strFlag)) {\n $arrFlags[] = self::OUTPUT[$strFlag];\n }\n }\n return $arrFlags;\n }", "public abstract function toMap(): array;", "function flippingBits($n)\n{\n return $n ^ 0xFFFFFFFF;\n}", "public function rangeToArray($range) {\n $ip_range = $range;\n $ip_arr = explode('/', $ip_range);\n\n $bin = '';\n for ($i = 1; $i <= 32; $i++) {\n $bin .= $ip_arr[1] >= $i ? '1' : '0';\n }\n $ip_arr[1] = bindec($bin);\n\n $ip = ip2long($ip_arr[0]);\n $nm = ip2long($ip_arr[1]);\n $nw = ($ip & $nm);\n $bc = $nw | (~$nm);\n\n\n\n for ($zm = 1; ($nw + $zm) <= ($bc - 1); $zm++) {\n $array[$zm] = long2ip($nw + $zm);\n }\n return $array;\n }", "function bit_expansion($R, $E){\n $EXP_R = array();\n\n for($i=0; $i<48; $i++){\n $EXP_R[$i] = $R[$E[$i]-1];\n }\n\n return $EXP_R;\n }", "public function bitsAllSet($data = ''): array\n\t{\n\t\treturn $this->_bits('$bitsAllSet', $data, __METHOD__);\n\t}", "abstract protected function report_to_array_mapping();", "private function maper(){\n\n\t\t$map = [];\n\n\t\tforeach($this::$tables as $table ){\n\n\t\t\t$tmp = explode(\"_\",$table);\n\n\t\t\tfor($i=0;$i<count($tmp);$i++){\n\n\t\t\t\t$tmp2 = array_slice($tmp,0,$i+1);\n\n\t\t\t\teval ('if(@ $map[\"'.implode('\"][\"',$tmp2).'\"]) true; else $map[\"'.implode('\"][\"',$tmp2).'\"]=[];');\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $map;\n\n\t}", "public function getmaps(){\n //Some maps to test\n $map0=array(\n array(\"#\",\"#\",\"#\",\"#\"));\n\n $map1=array(\n array(\"#\"),\n array(\"#\"),\n array(\"#\"),\n array(\"#\"),\n array(\"#\"));\n\n $map2=array(\n array(\"#\",\"#\"),\n array(\"#\",\"#\"));\n\n $map3=array(\n array(\"#\",\"#\",\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\",\"#\",\"#\"));\n\n $map4=array(\n array(\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\"));\n\n $map5=array(\n array(\"#\",\"#\",\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\",\"#\",\"#\"),\n array(\"#\",\"#\",\"#\",\"#\",\"#\"));\n\n return array($map0, $map1, $map2, $map3, $map4, $map5);\n }", "private static function scan1($bites) {\n if ($bites == 0) {\n return self::HASH_LENGTH - self::HASH_K;\n }\n\n $offset = floor(log($bites, 2));\n $offset = self::HASH_LENGTH - self::HASH_K - $offset;\n\n return $offset;\n }", "function calculateLuckyNumbers(){\n $luckyNumbers = array();\n $bits = 62;\n for($i=0; $i<$bits; $i++) {\n for($j=0; $j<$i; $j++) {\n $luckyNumbers[] = pow(2, $i) + pow(2, $j);\n }\n }\n return $luckyNumbers;\n}", "private function doGetOrdinalsInt()\n {\n /** @var int $bitset */\n $bitset = $this->bitset;\n $ordinals = [];\n $count = $this->enumerationCount;\n for ($ordinal = 0; $ordinal < $count; ++$ordinal) {\n if ($bitset & (1 << $ordinal)) {\n $ordinals[] = $ordinal;\n }\n }\n return $ordinals;\n }", "private function bits($colorMean)\n\t{\n\t\t$bits = array();\n\t\t \n\t\tforeach($colorMean[1] as $color){$bits[]= ($color>=$colorMean[0])?1:0;}\n\n\t\treturn $bits;\n\n\t}", "function generateFlag($bit){\n\t\t$flag = 8-strlen($bit)%8 == 8 ? 0 : 8-strlen($bit)%8;\t\t//menghitung jumlah padding bit\n\t\t$finalbit = $bit;\t\t\t\t//menginisialisasi bit akhir\n\n\t\tfor($i=0;$i<$flag;$i++)\t\t\t//melakukan perulangan sebanyak padding bit\n\t\t $finalbit.=\"0\";\t\t\t\t//menambahkan 0 di akhir final bit\n\t\t\n\t\t$finalbit.=sprintf(\"%08d\",decbin($flag));\t\t//menambahkan flag bit ke final bit\n\n\t\treturn $finalbit; \t\t\t\t//mengembalikan final bit\n\t}", "function Get_admin_system_emails_tmpl_bits()\r\n {\r\n $tpls=Get_admin_system_emails_tmpl_names();\r\n $tpls=array_values(preg_grep(\"/^your_[a-z_]+/\",$tpls,PREG_GREP_INVERT));\r\n $result=array_flip($tpls);\r\n $counter=0;\r\n foreach($result as $key => $value)\r\n {\r\n $result[$key]=(0x1 << $counter);\r\n $counter++;\r\n }\r\n return $result;\r\n }", "protected function bitmap2bytemap($bitmap,$width,$height) \r\n { \r\n $bytemap=array(); \r\n for ($j=0;$j<$height;++$j) \r\n { \r\n for ($i=0;$i<$width/8;++$i) \r\n { \r\n $bitstring=\"\"; \r\n for ($k=0;$k<8;++$k) \r\n if (isset($bitmap[$j][$i*8+$k])) \r\n $bitstring.=$bitmap[$j][$i*8+$k]; \r\n else \r\n $bitstring.=\"1\"; \r\n $bytemap[$j][]=bindec($bitstring); \r\n } \r\n } \r\n return $bytemap; \r\n }", "function bin2int($value)\n\t{\n\t\t$x = 1;\n\t\t$tmp = 0;\n\t\tfor ($i = 0; $i < strlen($value);$i++)\n\t\t{\n\t\t\t$tmp = $tmp + ($x * ord($value{$i}));\n\t\t\t$x = $x *256;\n\t\t\n\t\t}\n\t\treturn($tmp);\n\t}", "protected function getMap()\n {\n return [\n 'F' => [\n 'RECORD_IDENTITY' => 'FFLF',\n 'DATA_MAP' => [\n 'UPDATE_MARKER' => 1,\n 'RECORD_TYPE' => 1,\n 'ORIGIN_CODE' => 4,\n 'DESTINATION_CODE' => 4,\n 'ROUTE_CODE' => 5,\n 'STATUS_CODE' => 3,\n 'USAGE_CODE' => 1,\n 'DIRECTION' => 1,\n 'END_DATE' => 8,\n 'START_DATE' => 8,\n 'TOC' => 3,\n 'CROSS_LONDON_IND' => 1,\n 'NS_DISC_IND' => 1,\n 'PUBLICATON_IND' => 1,\n 'FLOW_ID' => 7\n ]\n ],\n 'T' => [\n 'RECORD_IDENTITY' => 'FFLT',\n 'DATA_MAP' => [\n 'UPDATE_MARKER' => 1,\n 'RECORD_TYPE' => 1,\n 'FLOW_ID' => 7,\n 'TICKET_CODE' => 3,\n 'FARE' => 8,\n 'RESTRICTION_CODE' => 2\n ]\n ],\n ];\n }", "protected function _getLangCodesMapping()\n {\n $oLang = \\OxidEsales\\Eshop\\Core\\Registry::getLang();\n $aLanguages = $oLang->getLanguageArray();\n $aRetArray = array();\n foreach ($aLanguages as $aLanguage) {\n $aRetArray[$aLanguage->oxid] = $aLanguage->id;\n }\n return $aRetArray;\n }", "public function getBits()\n {\n return $this->bits;\n }", "protected function getValidMasks()\n {\n return array_reduce(array_keys($this->lookupConstants), function ($validMasks, $key) {\n return $validMasks |= $key;\n }, 0);\n }", "public static function getBitmaskFlags($bitmask,$flags = array()) \r\n {\r\n $flags_set = array();\r\n foreach($flags as $i => $flag) {\r\n $bit = pow(2,$i);\r\n if($bitmask & $bit) $flags_set[] = $flag; \r\n } \r\n return $flags_set; \r\n }", "static function binary($number)\n {\n $binary=0;\n $i=1;\n //convert into binary\n while($number>0)\n {\n $binary=$binary+(((int)($number%2))*$i);\n $i=$i*10;\n $number=((int)($number)/2);\n\n }\n //prints $number in binary form\n echo \"The binary form is:\\n\";\n echo $binary.\"\\n\";\n echo \"After swapping nibbles we get integer:\\n\";\n self::decimal($binary);\n }", "private function memScramble(array &$data)\r\n {\r\n for ($i = 0; $i < count($data); $i++) {\r\n $data[$i] ^= 237;\r\n }\r\n for ($i = 0; ($i + 2) < count($data); $i += 3) {\r\n $tmp = $data[$i];\r\n $data[$i] = $data[$i + 2];\r\n $data[$i + 2] = $tmp;\r\n }\r\n }", "public function getTestBinIdsData()\n {\n $expectedBinCustom = version_compare(phpversion('mongo'), '1.2.11', '<') ? -128 : \\MongoBinData::CUSTOM;\n\n return array(\n array('bin', 0),\n array('bin_func', \\MongoBinData::FUNC),\n array('bin_bytearray', \\MongoBinData::BYTE_ARRAY),\n array('bin_uuid', \\MongoBinData::UUID),\n array('bin_md5', \\MongoBinData::MD5),\n array('bin_custom', $expectedBinCustom),\n );\n }", "function enumerate(){\n $res=array();\n // lista de los macs del laboratorio\n for($i=134;$i<=148;$i++) array_push($res,sprintf(\"l%03d\",$i));\n $this->myLogger->trace(\"mac list: \".json_encode($res));\n return $res;\n }", "function gen_subnet_mask_long($bits) {\n\t$sm = 0;\n\tfor ($i = 0; $i < $bits; $i++) {\n\t\t$sm >>= 1;\n\t\t$sm |= 0x80000000;\n\t}\n\treturn $sm;\n}", "protected function _getCharCodesTable() {}", "protected function _getCharCodesTable() {}", "public function getFibo($n){\n\t\t$result = array();\n\t\t$result[0]=1;\n\t\t$result[1]=1;\n\n\t\tfor ($i=2; $i <$n ; $i++) { \n\t\t\t$result[$i]= $result[$i-1] + $result[$i-2];\n\t\t}\n\n\t\treturn $result;\n\t}", "public function __toString()\n {\n $out = \"\";\n\n $fullInts = (int)floor($this->size / $this->intSize);\n for($i=0; $i<$fullInts; $i++) {\n $out .= sprintf(\"%032s\", decbin(isset($this->data[$i]) ? $this->data[$i] : 0));\n }\n\n $remainder = $this->size % $this->intSize;\n for($j=0; $j<$remainder; $j++) {\n $mask = 1 << ($this->intSize - 1 - $j);\n $out .= $mask & $this->data[$i] ? \"1\" : \"0\";\n }\n\n return $out;\n }", "function make_permutation() {\r\n\t\t//\r\n\t\t$permutation = array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,\r\n\t\t\t\t\t\t\t -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,\r\n\t\t\t\t\t\t\t -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,\r\n\t\t\t\t\t\t\t -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1);\r\n\t\t//\r\n\t\tfor ( $i = 0; $i < 64; $i++ ) {\r\n\t\t\t$idx = 0;\r\n\t\t\twhile ( $idx != -1 ) {\r\n\t\t\t\t$j = rand(0,64);\r\n\t\t\t\tif ( $j == 64 ) $j--;\r\n\t\t\t\t$idx = $permutation[$j];\r\n\t\t\t\tif ( $idx == -1 ) $permutation[$j] = $i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t//\r\n\t\t$permstr = \"\";\r\n\t\tfor ( $i = 0; $i < 64; $i++ ) {\r\n\t\t\t $j = $permutation[$i];\r\n\t\t\t if ( $i > 0 ) {\r\n\t\t\t\t$permstr .= ',';\r\n\t\t\t\tif ( !($i % 16) ) {\r\n\t\t\t\t\t$permstr .= \"\\n\\t\\t\\t\\t\";\r\n\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t $permstr .= $j;\r\n\t\t}\r\n\t\t\r\n\t\treturn($permstr);\r\n\t}", "function acucDecodeBitShuffle( $arrayCode, $usedKey)\r\n{\r\n\tglobal $acucSelectIndexTable;\r\n\t\r\n\t$arrayOutputBuffer = array();\r\n\tfor( $idx = 0; $idx < 21; $idx++ )\r\n\t{\r\n\t\t$arrayOutputBuffer[] = 0;\r\n\t}\r\n\t\r\n\tif( $usedKey == 0 )\r\n\t{\r\n\t\t$charOffset = 13;\r\n\t\t$charCount = 19;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$charOffset = 2;\r\n\t\t$charCount = 20;\r\n\t}\r\n\t\r\n\t$arrayBuffer = array_merge( array_slice( $arrayCode, 0, $charOffset), array_slice( $arrayCode, $charOffset + 1, 20 - $charOffset) );\r\n\t\r\n\t$tableNumber = ( $arrayCode[ $charOffset ] << 2 ) &0x0c;\r\n\t$indexTable = $acucSelectIndexTable[ $tableNumber >> 2 ];\r\n\t\r\n\tfor( $idx = 0; $idx < $charCount; $idx++ )\r\n\t{\r\n\t\tfor($tIdx = 0; $tIdx < 8; $tIdx++)\r\n\t\t{\r\n\t\t\t$outputOffset = $indexTable[ $tIdx ] + $idx;\r\n\t\t\t$outputOffset %= $charCount;\r\n\t\t\t$valueByte = $arrayBuffer[$outputOffset];\r\n\t\t\t$valueByte = ($valueByte >> $tIdx ) & 0x01;\r\n\t\t\t$valueByte <<= $tIdx;\r\n\t\t\t$arrayOutputBuffer[$idx] |= $valueByte;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$arrayReturnCode = array_merge( array_slice( $arrayOutputBuffer, 0, $charOffset),\r\n\t\t\t\t\t\t\t\t\t\tarray_slice( $arrayCode, $charOffset, 1),\r\n\t\t\t\t\t\t\t\t\t\tarray_slice( $arrayOutputBuffer, $charOffset, 20-$charOffset));\r\n\t$arrayReturnCode = array_merge( $arrayReturnCode, array_slice($arrayCode, count($arrayReturnCode)));\r\n\treturn $arrayReturnCode;\r\n}", "protected function getMap(): array\n\t{\n\t\treturn array(\n\t\t\t'CODE', 'TITLE', 'TYPE', 'TPL_ID', 'DOMAIN_ID', 'LANG',\n\t\t\t'LANDING_ID_INDEX', 'LANDING_ID_404', 'LANDING_ID_503'\n\t\t);\n\t}", "function acucDecodeBitCode( $arrayCode )\r\n{\r\n\t$arrayReturnCode = $arrayCode;\r\n\t$codeMethod = $arrayCode[1] & 0x0f;\r\n\t\r\n\tif( $codeMethod > 12 )\r\n\t{\r\n\t\t$arrayReturnCode = acucBitShift( $arrayReturnCode, ( 0 - $codeMethod ) * 3 );\r\n\t\t$arrayReturnCode = acucBitReverse( $arrayReturnCode );\r\n\t\t$arrayReturnCode = acucBitArrangeReverse( $arrayReturnCode );\r\n\t}\r\n\telseif( $codeMethod > 8 )\r\n\t{\r\n\t\t$arrayReturnCode = acucBitShift( $arrayReturnCode, $codeMethod * 5 );\r\n\t\t$arrayReturnCode = acucBitArrangeReverse( $arrayReturnCode );\r\n\t}\r\n\telseif( $codeMethod > 4 )\r\n\t{\r\n\t\t$arrayReturnCode = acucBitReverse( $arrayReturnCode );\r\n\t\t$arrayReturnCode = acucBitShift( $arrayReturnCode, $codeMethod * 5 );\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$arrayReturnCode = acucBitArrangeReverse( $arrayReturnCode );\r\n\t\t$arrayReturnCode = acucBitShift( $arrayReturnCode, ( 0 - $codeMethod ) * 3 );\r\n\t}\r\n\t\r\n\treturn $arrayReturnCode;\r\n}", "static function toBinary($int, $bit)\n\t{\n\t\tif(!$bit){\n\t\t\t$bit = self::is64bit() ? 64: 32;\n\t\t}\n\t\t$str = decbin($int);\n\t\treturn str_pad($str, $bit, 0, STR_PAD_LEFT);\n\t}", "function base32Index($p) {\r\n\tglobal $base32;\r\n\tfor ($i = 0; $i < 32; $i++) {\r\n\t\t\r\n\t\t//echo $base32[$i];\r\n\t\tif ($p == $base32[$i]) {\r\n\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\treturn $i;\r\n\t}", "public static function getRepairBits($cid){\n //repair state from mySql for a specific vehicle\n $r = getRepairs($cid);\n $ret = ($r & 0xF000) >> 12;\n //echo $ret;\n return 0; //$ret;\n }", "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),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array('=this.USER_ID' => 'ref.ID'),\n\t\t\t),\n\t\t\t'GROUP_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'GROUP' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Socialnetwork\\WorkgroupTable',\n\t\t\t\t'reference' => array('=this.GROUP_ID' => 'ref.ID'),\n\t\t\t),\n\t\t\t'ROLE' => array(\n\t\t\t\t'data_type' => 'enum',\n\t\t\t\t'values' => array(self::ROLE_OWNER, self::ROLE_MODERATOR, self::ROLE_USER, self::ROLE_BAN, self::ROLE_REQUEST),\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t\t'DATE_UPDATE' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t\t'INITIATED_BY_TYPE' => array(\n\t\t\t\t'data_type' => 'enum',\n\t\t\t\t'values' => array(self::INITIATED_BY_USER, self::INITIATED_BY_GROUP),\n\t\t\t),\n\t\t\t'INITIATED_BY_USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'INITIATED_BY_USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array('=this.INITIATED_BY_USER_ID' => 'ref.ID'),\n\t\t\t),\n\t\t\t'MESSAGE' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t)\n\t\t);\n\t}", "abstract protected function _getCharCodesTable();", "function sequenceKey()\n {\n return array(false, false, false);\n }", "function bitpfriemler() // $arr = 0;\n {\n /*if (gettype($arr) == \"array\")\n\treturn $this->import_array($arr);*/\n unset($this->arr);\n return 1;\n }", "public function getLookupTable() {}", "function bin2bstr($input)\r\n\t{\r\n\t\tif (!is_string($input)) return null; // Sanity check\r\n\t\t// Pack into a string\r\n\t\t$input = str_split($input, 2);\r\n\t\t$str = '';\r\n\t\tforeach ($input as $v){\r\n\t\t\t$str .= base_convert($v, 2, 16);\r\n\t\t}\r\n\t\t$str = pack('H*', $str);\r\n\t\treturn $str;\r\n\t}", "function colorMap(): array\n{\n return [\n 'black' => 'white',\n 'red' => 'white',\n 'green' => 'black',\n 'yellow' => 'black',\n 'blue' => 'white',\n 'magenta' => 'white',\n 'cyan' => 'black',\n 'white' => 'black',\n 'default' => 'white',\n ];\n}", "function aarr(&$R,$nn,$n,$m=\"\")\n\t\t{\n\t\treturn $this->Zarr($R,\"int8\",$n,$m);\t\t\t\n\t\t}", "function char_translate($u1)\n{ \n $conv = array(0,0xffff,0,0xffff); \n //echo \"len=\".mb_strlen($u1).\" , \".bin2hex($u1).\" , \".mb_decode_numericentity($u1,$conv).\"<br>\";\n switch (mb_strlen($u1))\n {\n case 1:\n $mask = 0x7f;\n break;\n case 2:\n $mask = 0x1f3f; /* U+80 - U+7ff : 110x-xxxx-10xx-xxxx */\n break;\n case 3:\n $mask = 0x0f3f3f; /* U+800 - U+ffff : 1110-xxxx-10xx-xxxx-10xx-xxxx */\n break;\n case 4:\n $mask = 0x073f3f3f; /* U+10000 - U+1fffff : 1111-0xxx-10xx-xxxx-10xx-xxxx-10xx-xxxx */\n break;\n }\n $a = intval(bin2hex($u1),16);\n $n = $a & $mask;\n $val = intval($n); \n //var_dump($a);\n //var_dump($mask);\n //var_dump($n);\n return $val;\n}", "public function lookupTable() {\n if ($this->_m_lookupTable !== null)\n return $this->_m_lookupTable;\n $this->_m_lookupTable = [\"\\x00\\x00\", \"\\x00\\x01\", \"\\x00\\x02\", \"\\x00\\x03\", \"\\x2E\\x01\", \"\\x3E\\x01\", \"\\x01\\x01\", \"\\x1E\\x01\", \"\\xFF\\xFF\", \"\\x0E\\x01\", \"\\x31\\x00\", \"\\x11\\x12\", \"\\x01\\x07\", \"\\x33\\x32\", \"\\x12\\x39\", \"\\xED\\x10\", \"\\x01\\x27\", \"\\x23\\x22\", \"\\x01\\x37\", \"\\x07\\x06\", \"\\x01\\x17\", \"\\x01\\x23\", \"\\x00\\xFF\", \"\\x00\\x2F\", \"\\x07\\x0E\", \"\\xFD\\x3C\", \"\\x01\\x35\", \"\\x01\\x15\", \"\\x01\\x02\", \"\\x00\\x07\", \"\\x00\\x3E\", \"\\x05\\xD5\", \"\\x02\\x01\", \"\\x06\\x07\", \"\\x07\\x08\", \"\\x30\\x01\", \"\\x01\\x33\", \"\\x00\\x10\", \"\\x17\\x16\", \"\\x37\\x3E\", \"\\x36\\x37\"];\n return $this->_m_lookupTable;\n }", "public function get_arr_maps() {\r\n $arr = $this->app->model('article_indexs')->getList('*');\r\n $tmp = array();\r\n \r\n foreach( (array)$arr as $row ) {\r\n $tmp[] = array(\r\n 'url' => app::get('site')->router()->gen_url(array('app'=>'content', 'ctl'=>'site_article', 'act'=>'index', 'arg0'=>$row['article_id'], 'full'=>true) ),\r\n );\r\n }\r\n \r\n return $tmp;\r\n }", "function decbinx($d,$n)\r\n\t{\r\n\t\t$bin = decbin($d);\r\n\t\t$sbin = strlen($bin);\r\n\t\tfor($j = 0; $j < $n - $sbin; $j++)\r\n \t\t\t$bin = \"0$bin\";\r\n\t\treturn $bin;\r\n\t}", "function Varr(&$R,$n,$m=\"\")\n\t\t{\n\t\treturn $this->Zarr($R,\"uint8\",$n,$m);\n\t\t}", "protected function _getInverseLangCodesMapping()\n {\n $oLang = \\OxidEsales\\Eshop\\Core\\Registry::getLang();\n $aLanguages = $oLang->getLanguageArray();\n $aRetArray = array();\n foreach ($aLanguages as $aLanguage) {\n $aRetArray[$aLanguage->id] = $aLanguage->oxid;\n }\n return $aRetArray;\n }", "function build_bitwise_swap($profilefieldid, $loc1, $loc2)\n{\n\n\tglobal $vbulletin;\n\n\t$loc1value = pow(2, $loc1 - 1);\n\t$loc2value = pow(2, $loc2 - 1);\n\n\t// Zero loc1 in temp field\n\t$vbulletin->db->query_write(\"\n\t\tUPDATE \" . TABLE_PREFIX . \"userfield\n\t\tSET temp = temp - $loc1value\n\t\tWHERE temp & $loc1value\n\t\");\n\t// Copy loc2 to loc1\n\t$vbulletin->db->query_write(\"\n\t\tUPDATE \" . TABLE_PREFIX . \"userfield\n\t\tSET temp = temp + $loc1value\n\t\tWHERE temp & $loc2value\n\t\");\n\t// Zero loc2 in temp field\n\t$vbulletin->db->query_write(\"\n\t\tUPDATE \" . TABLE_PREFIX . \"userfield\n\t\tSET temp = temp - $loc2value\n\t\tWHERE temp & $loc2value\n\t\");\n\t// Copy loc1 from perm field to loc2 temp field\n\t$vbulletin->db->query_write(\"\n\t\tUPDATE \" . TABLE_PREFIX . \"userfield\n\t\tSET temp = temp + $loc2value\n\t\tWHERE field$profilefieldid & $loc1value\n\t\");\n\n}", "public function calculateAllPossibilities()\n {\n $allPossibilities = array();\n for ($i = 0; $i < 128; ++$i) {\n $this->omocodiaLevel = $i;\n $allPossibilities[] = $this->calculate();\n }\n\n return $allPossibilities;\n }", "private function doGetBinaryBitsetLeInt()\n {\n $bin = \\pack(\\PHP_INT_SIZE === 8 ? 'P' : 'V', $this->bitset);\n return \\substr($bin, 0, (int)\\ceil($this->enumerationCount / 8));\n }", "protected function binary()\n {\n $binary = parent::binary();\n\n unset($binary[0]);\n $binary = array_values($binary);\n\n if ('phpdbg' === PHP_SAPI) {\n return array_merge([PHP_BINARY, '-qrr'], $binary);\n }\n\n $binary[0] = __DIR__.'/../../../../../'.$binary[0];\n\n return array_merge([PHP_BINARY], $binary);\n }", "public function encodeData(): array\n {\n return [\n hex2bin(Helper::removePrefix($this->publicKey, MinterPrefix::PUBLIC_KEY)),\n $this->coin,\n MinterConverter::convertToPip($this->stake)\n ];\n }", "function farr(&$R,$n,$m=\"\")\n\t\t{\n\t\treturn $this->Zarr($R,\"uint32\",$n,$m);\n\t\t}", "Function largearray_and($a, $b) {\r\n $indexes = min(count($a), count($b));\r\n $c = array();\r\n for ($i=0; $i<$indexes; $i++) {\r\n array_push($c, $a[$i] & $b[$i]);\r\n }\r\n return $c;\r\n}", "public function getCharKeys()\n {\n return array_fill_keys(array_values($this->bidiordarr), true);\n }", "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}", "function genBin($int){\n $bin = decbin($int);\n // Verify if zero exists in the string\n if ( strpos($bin, '0') ) {\n // Variables\n $lenght = strlen($bin); // Count the string size\n $count = 0; // Save the quantity of zeros\n $bigger = 0; // Saves the biggest gap\n\n // Search for BinaryGaps\n for ($i=0; $i < $lenght; $i++) { \n // Prevines when there is no zeros between ones\n if ($bin[$i] == \"1\") {\n // Ensures that only the biggest gap will remain\n if ($bigger < $count) {\n $bigger = $count;\n }\n $count = 0;\n } else {\n $count++;\n }\n }\n }\n // Returns the result\n return PHP_EOL . \"BINARY: \" . $bin . PHP_EOL . \"BIGGER BINARYGAP: \" . $bigger . PHP_EOL;\n}", "function nSmToBinIp($sn) {\n\n $snb = \"\";\n\n for($i=1;$i<=32;$i++) {\n\n if($i<=$sn) {\n $snb.=\"1\";\n }\n else {\n $snb.=\"0\";\n }\n\n if($i%8==0 && $i<32){\n $snb.=\".\";\n }\n }\n\n return $snb;\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 generateMap() {\n\t\tfor($y = 0; $y < static::MAP_Y; $y++) {\n\t\t\tfor($x = 0; $x < static::MAP_X; $x++) {\n\t\t\t\t$this->map[$y][$x] = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}" ]
[ "0.67167443", "0.6581688", "0.63034594", "0.6287741", "0.6230139", "0.6201217", "0.62010044", "0.61963487", "0.6123385", "0.60620147", "0.59772325", "0.5957866", "0.5913658", "0.5845789", "0.58134586", "0.5808012", "0.5790181", "0.57126105", "0.56362396", "0.55776066", "0.5505235", "0.5490327", "0.545953", "0.5371338", "0.5330924", "0.5262804", "0.52481043", "0.5199637", "0.51796603", "0.5178367", "0.5167765", "0.513949", "0.51265377", "0.51135594", "0.5079814", "0.5074712", "0.50743043", "0.50578475", "0.50287247", "0.50214386", "0.5009963", "0.5004135", "0.49976054", "0.49926972", "0.4992308", "0.49882445", "0.49825752", "0.49782738", "0.49636415", "0.49603277", "0.49588448", "0.4941067", "0.4932997", "0.49323705", "0.4927276", "0.49232548", "0.49200284", "0.49196348", "0.49011624", "0.4877932", "0.48773238", "0.48743385", "0.4867081", "0.4867081", "0.4857668", "0.48559266", "0.4855824", "0.4853638", "0.4840938", "0.4833404", "0.4801925", "0.4796129", "0.47893426", "0.47889885", "0.47880128", "0.4785895", "0.4767654", "0.47650528", "0.47555998", "0.47520196", "0.47474933", "0.4741205", "0.47353646", "0.47206536", "0.47197318", "0.47169805", "0.471554", "0.47108543", "0.4710054", "0.470919", "0.4703804", "0.47017053", "0.46999398", "0.46981058", "0.46937832", "0.46815953", "0.46804032", "0.46735248", "0.46693078", "0.4658227" ]
0.55249393
20
Map character frequency as array. Returns array like this: array( )
private static function frequencyMap($data) { $occurences = array(); while (isset($data[0])) { // Count occurences for the first char and add to frequency map $occurences[base64_encode($data[0])] = substr_count($data, $data[0]); $data = str_replace($data[0], '', $data); } // Sort the resulting array asort($occurences); // Return the array in descending order return array_reverse($occurences); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function frequencyOfCharactersArray(string $text)\n {\n $text = mb_strtoupper($text);\n $unique = [];\n\n $lines_arr = preg_split('/\\r\\n/', $text);\n $num_newlines = count($lines_arr) - 1;\n if ($num_newlines) {\n $unique['paragraph'] = $num_newlines;\n }\n\n $text = str_replace(\"\\r\\n\", \"\", $text);\n\n for ($i = 0; $i < mb_strlen($text); $i++) {\n $char = mb_substr($text, $i, 1);\n if (!array_key_exists($char, $unique)) {\n $unique[$char] = 0;\n }\n $unique[$char]++;\n }\n\n arsort($unique);\n\n $array = [];\n foreach ($unique as $character => $number) {\n $percentage = round($number / array_sum($unique) * 100, 1);\n $character = str_replace(\" \", 'space', $character);\n $array[] = [\n 'character' => $character,\n 'number' => $number,\n 'percentage' => $percentage,\n ];\n }\n\n return $array;\n }", "public function getfrequency() {\n return['1' => 'Frequency 1', '2' => 'Frequency 2', '3' => 'Frequency 3', '4' => 'Frequency 4'];\n }", "private function arr2charCountArray($arr) {\n\t\treturn array_count_values($arr);\n\t}", "function getTextFrequency(){\n\t\t$freq = array(); \t\t// inisialisasi frequensi\n\t\t$this->firstBit = \"\";\t// inisialisasi bit awal\n\n\t\tfor ($i = 0; $i < strlen($this->textInside); $i++) { //melakukan perulangan untuk setiap char dalam text\n\t \n\t $letter = $this->textInside[$i]; //mengambil char ke-i dalam text\n\t $this->firstBit .= sprintf(\"%08d\",decbin(ord($letter)));\t\t//menambahkan binary char ke-i dan disimpan ke firstbit\n\t \n\t if (array_key_exists($letter, $freq)) { //mengecek apakah char ke-i sudah ada dalam array frekuensi atau tidak\n\t $freq[$letter]++;\t\t//menambahkan jumlah char \n\t } else {\n\t $freq[$letter] = 1;\t\t//menginisialisasi jumlah char\n\t }\n\t }\n\n\t return $freq;\t\t//mengembalikan nilai frekuensi dalam array\n\t}", "function sherlockAndAnagrams($s) {\n $stringSize=strlen($s);\n $data=[];\nfor($i=0;$i<$stringSize;$i++){\n\n for($j=$i;$j<$stringSize;$j++){\n for($t=$i;$t<=$j;$t++){\n $data[$t][]=countchars($s[$t]);\n }\n\n\n }\n\n\n}\necho '<pre>';\nprint_r($data);\n\n}", "public function frequencyOfCharacters(string $text)\n {\n $array = $this->frequencyOfCharactersArray($text);\n $result = '<table>';\n $result .= '<tr><td>Character</td><td>Frequency</td><td>Percentage</td></tr>';\n foreach ($array as $item) {\n $result .= '<tr><td>' . $item['character'] . '</td><td>' . $item['number'] . '</td><td>' . $item['percentage'] . '</td></tr>';\n }\n $result .= '</table>';\n\n return $result;\n }", "function getCharacterCounts(string $name0, string $name1): array\n {\n $names = getCombinedNames($name0, $name1);\n $letters = [];\n\n for ($i = 0; $i < strlen($names); $i++) {\n $letters[$names[$i]] = returnCharacterCount($names[$i], $names);\n }\n\n return $letters;\n }", "function get_word_counts_array($string) {\n $array_of_words = preg_split('/[ ,_.]+/', $string);\n\n $unique_words = get_unique_words_array($array_of_words);\n\n $return_array = generate_empty_counts_array($unique_words);\n\n $len = count($return_array);\n\n foreach ($array_of_words as $word) {\n for ($i = 0 ; $i < $len ; $i++ ) {\n\n if (strcmp($return_array[$i][0], $word) == 0) {\n $return_array[$i][1] += 1;\n }\n }\n }\n return $return_array;\n}", "public function alphabetFrequency($str, $alphabet = NULL) {\n\t\t$alph_freq_arr = array();\n\t\t$char_freq_arr = $this->str2charCountArray(strtolower($str));\n\n\t\tif (!$alphabet) {\n\t\t\t$alphabet = range('a' , 'z');\n\t\t}\n\n\t\tforeach ($alphabet as $letter) {\n\t\t\t$alph_freq_arr[$letter] = (isset($char_freq_arr[$letter]))\n\t\t\t\t\t\t\t\t\t ? $char_freq_arr[$letter]\n\t\t\t\t\t\t\t\t\t : 0;\n\t\t}\n\n\t\treturn $alph_freq_arr;\n\t}", "private function str2charCountArray($str) {\n\t\treturn array_count_values($this->str2charArray($str));\n\t}", "function frequentLetters($string)\n{\n $hash1 = [];\n $frequentLetters = [];\n for ($index = 0; $index < strlen($string); $index++) {\n $char = $string[$index];\n if (!array_key_exists($char, $hash1)) {\n $hash1[$char] = 0;\n }\n $hash1[$char] += 1;\n if ($hash1[$char] > 2 && !in_array($char, $frequentLetters)) {\n $frequentLetters[] = $char;\n }\n }\n // print_r($hash1);\n return $frequentLetters;\n}", "public function tFrequencies()\n {\n return json_encode($this->frequencies);\n }", "public static function frequencies(array $data): array\n\t{\n\t\t$frequencies = array_count_values($data);\n\t\tarsort($frequencies);\n\t\treturn $frequencies;\n\t}", "public static function getTextWidthArray()\n {\n $ret = [\n '100' => '100%',\n '90' => '90%',\n '80' => '80%',\n '70' => '70%',\n '60' => '60%',\n '50' => '50%',\n '40' => '40%',\n '30' => '30%',\n '20' => '20%',\n ];\n\n return $ret;\n }", "public function frequencyTable($tokens)\n {\n $frequencyTable = [];\n foreach ($tokens as $token) {\n if (!isset($frequencyTable[$token])) {\n $frequencyTable[$token] = 1;\n } else {\n $frequencyTable[$token]++;\n }\n }\n\n return $frequencyTable;\n }", "function testCapsFrequencyList321(){\r\n\r\n\t$c = new GenerateWordCloud();\r\n\t$words = array();\r\n\tarray_push($words, 'MOST');\r\n\tarray_push($words, 'most');\t\r\n\tarray_push($words, 'mOSt');\r\n\tarray_push($words, 'aveRage');\r\n\tarray_push($words, 'averAGE');\r\n\tarray_push($words, 'leasT');\r\n\t\r\n\t$frequency_list = $c->wordFreq($words);\r\n\t$this->assertEquals(3, $frequency_list['most']);\r\n\t$this->assertEquals(2, $frequency_list['average']);\r\n\t$this->assertEquals(1, $frequency_list['least']);\r\n\t$this->assertEquals(3, count($frequency_list));\r\n\t}", "public function typeCounts() : array\n {\n $counts = [\n self::CATEGORICAL => 0,\n self::CONTINUOUS => 0,\n self::RESOURCE => 0,\n ];\n\n return array_replace($counts, array_count_values($this->types()));\n }", "static function _utf2AsciiMap(): array {\n $map = [];\n foreach (\\hbc\\core\\StrX::charsArray() as $to => $from) {\n foreach ($from as $f) {\n $map[$f] = $to;\n }\n }\n\n return $map;\n }", "public static function frequency(array $values): array\n {\n $frequencies = array();\n foreach ($values as $value) {\n if (!isset($frequencies[$value])) {\n $frequencies[$value] = 1;\n } else {\n $frequencies[$value]++;\n }\n }\n return $frequencies;\n }", "public function toArray()\n {\n $array = parent::toArray();\n\n foreach ($array as $k => &$v) {\n $v['_count'] = $k;\n }\n\n return $array;\n }", "public function getCharClassRatios($str) {\n\n\t\t$out = array();\n\n\t\t// character counts\n\t\t$gr_cnt = $this->nonSpaceCharCount($str); // character count: M\n\t\t// character frequencies array\n\t\t$chf_arr = $this->str2charCountArray($str);\n\n\t\tforeach ($this->classes as $class => $chars) {\n\t\t\t$subset = array_intersect_key($chf_arr, array_flip($chars));\n\t\t\t$out[$class] = ($gr_cnt != 0)\n\t\t\t\t\t\t ? array_sum($subset)/$gr_cnt\n\t\t\t\t\t\t : 0;\n\t\t}\n\n\t\treturn $out;\n\t}", "private function getLetterArray() {\n $array = range('A', 'Z');\n $letters = $array;\n foreach ($array as $first) {\n foreach ($array as $second) {\n $letters[] = $first . $second;\n }\n }\n return $letters;\n }", "function getOcurrencesLetters($book) {\n $count = array();\n $strlen = strlen($book); // O(1)\n for ($i = 0; $i <= $strlen; $i++) {\n $char = substr($book, $i, 1);\n if ($char) {\n if (!isset($count[$char])) {\n $count[$char] = 0;\n }\n $count[$char] += 1;\n }\n }\n return $count;\n}", "public function countGroupedByFirstLetter()\n {\n $series = array();\n foreach ($this->getRepository()->countGroupedByFirstLetter() as $serie) {\n // Force non alpha to #\n if (!preg_match('/[A-Z]/', $serie['first_letter'])) {\n $serie['first_letter'] = '#';\n }\n if (!array_key_exists($serie['first_letter'], $series)) {\n $series[$serie['first_letter']] = 0;\n }\n $series[$serie['first_letter']] += $serie['nb_serie'];\n }\n\n return $series;\n }", "function word_count($filePath) {\r\n\t$file= fopen(\"$filePath\", \"r\");\r\n\t$word =array('A'=>0 ,'a'=>0,'B'=>0,'b'=>0,'C'=>0,'c'=>0,'D'=>0,'d'=>0,'E'=>0,'e'=>0,'F'=>0,'f'=>0,'G'=>0,'g'=>0,'H'=>0,'h'=>0,'I'=>0,'i'=>0,'J'=>0,'j'=>0,'K' =>0,'k'=>0 ,'L'=>0 ,'l' =>0,'M'=>0 ,'m'=>0 ,'N'=>0 ,'n' =>0,'O' =>0,'o' =>0,'P' =>0,'p'=>0,'Q' =>0,'q'=>0,'R'=>0 ,'r'=>0 ,'S'=>0 ,'s'=>0 ,'T'=>0 ,'t'=>0 ,'u' =>0,'u'=>0 ,'V'=>0,'v'=>0 ,'W'=>0 ,'w'=>0 ,'X'=>0 ,'x'=>0,'Y'=>0 ,'y'=>0 ,'Z'=>0,'z'=>0 ); \r\n\twhile(!feof($file)) {\r\n\t\t\r\n\t\t$str = fgetc($file);\r\n\t\tif ($str==\"\\n\" || $str===\" \" || $str==\",\" || $str==\".\" || $str==\"0\") {\r\n\t\t\r\n\t\t}else $word[\"$str\"]= $word[$str]+1;\r\n\t}\r\n\t \r\n\tfclose($file);\r\n\treturn $word ;\r\n \t\r\n}", "protected static function charsArray(): array\n {\n static $charsArray;\n\n if (isset($charsArray)) {\n return $charsArray;\n }\n\n return $charsArray = [\n '0' => ['°', '₀', '۰', '0'],\n '1' => ['¹', '₁', '۱', '1'],\n '2' => ['²', '₂', '۲', '2'],\n '3' => ['³', '₃', '۳', '3'],\n '4' => ['⁴', '₄', '۴', '٤', '4'],\n '5' => ['⁵', '₅', '۵', '٥', '5'],\n '6' => ['⁶', '₆', '۶', '٦', '6'],\n '7' => ['⁷', '₇', '۷', '7'],\n '8' => ['⁸', '₈', '۸', '8'],\n '9' => ['⁹', '₉', '۹', '9'],\n 'a' => [\n 'à',\n 'á',\n 'ả',\n 'ã',\n 'ạ',\n 'ă',\n 'ắ',\n 'ằ',\n 'ẳ',\n 'ẵ',\n 'ặ',\n 'â',\n 'ấ',\n 'ầ',\n 'ẩ',\n 'ẫ',\n 'ậ',\n 'ā',\n 'ą',\n 'å',\n 'α',\n 'ά',\n 'ἀ',\n 'ἁ',\n 'ἂ',\n 'ἃ',\n 'ἄ',\n 'ἅ',\n 'ἆ',\n 'ἇ',\n 'ᾀ',\n 'ᾁ',\n 'ᾂ',\n 'ᾃ',\n 'ᾄ',\n 'ᾅ',\n 'ᾆ',\n 'ᾇ',\n 'ὰ',\n 'ά',\n 'ᾰ',\n 'ᾱ',\n 'ᾲ',\n 'ᾳ',\n 'ᾴ',\n 'ᾶ',\n 'ᾷ',\n 'а',\n 'أ',\n 'အ',\n 'ာ',\n 'ါ',\n 'ǻ',\n 'ǎ',\n 'ª',\n 'ა',\n 'अ',\n 'ا',\n 'a',\n 'ä',\n ],\n 'b' => ['б', 'β', 'ب', 'ဗ', 'ბ', 'b'],\n 'c' => ['ç', 'ć', 'č', 'ĉ', 'ċ', 'c'],\n 'd' => ['ď', 'ð', 'đ', 'ƌ', 'ȡ', 'ɖ', 'ɗ', 'ᵭ', 'ᶁ', 'ᶑ', 'д', 'δ', 'د', 'ض', 'ဍ', 'ဒ', 'დ', 'd'],\n 'e' => [\n 'é',\n 'è',\n 'ẻ',\n 'ẽ',\n 'ẹ',\n 'ê',\n 'ế',\n 'ề',\n 'ể',\n 'ễ',\n 'ệ',\n 'ë',\n 'ē',\n 'ę',\n 'ě',\n 'ĕ',\n 'ė',\n 'ε',\n 'έ',\n 'ἐ',\n 'ἑ',\n 'ἒ',\n 'ἓ',\n 'ἔ',\n 'ἕ',\n 'ὲ',\n 'έ',\n 'е',\n 'ё',\n 'э',\n 'є',\n 'ə',\n 'ဧ',\n 'ေ',\n 'ဲ',\n 'ე',\n 'ए',\n 'إ',\n 'ئ',\n 'e',\n ],\n 'f' => ['ф', 'φ', 'ف', 'ƒ', 'ფ', 'f'],\n 'g' => ['ĝ', 'ğ', 'ġ', 'ģ', 'г', 'ґ', 'γ', 'ဂ', 'გ', 'گ', 'g'],\n 'h' => ['ĥ', 'ħ', 'η', 'ή', 'ح', 'ه', 'ဟ', 'ှ', 'ჰ', 'h'],\n 'i' => [\n 'í',\n 'ì',\n 'ỉ',\n 'ĩ',\n 'ị',\n 'î',\n 'ï',\n 'ī',\n 'ĭ',\n 'į',\n 'ı',\n 'ι',\n 'ί',\n 'ϊ',\n 'ΐ',\n 'ἰ',\n 'ἱ',\n 'ἲ',\n 'ἳ',\n 'ἴ',\n 'ἵ',\n 'ἶ',\n 'ἷ',\n 'ὶ',\n 'ί',\n 'ῐ',\n 'ῑ',\n 'ῒ',\n 'ΐ',\n 'ῖ',\n 'ῗ',\n 'і',\n 'ї',\n 'и',\n 'ဣ',\n 'ိ',\n 'ီ',\n 'ည်',\n 'ǐ',\n 'ი',\n 'इ',\n 'ی',\n 'i',\n ],\n 'j' => ['ĵ', 'ј', 'Ј', 'ჯ', 'ج', 'j'],\n 'k' => ['ķ', 'ĸ', 'к', 'κ', 'Ķ', 'ق', 'ك', 'က', 'კ', 'ქ', 'ک', 'k'],\n 'l' => ['ł', 'ľ', 'ĺ', 'ļ', 'ŀ', 'л', 'λ', 'ل', 'လ', 'ლ', 'l'],\n 'm' => ['м', 'μ', 'م', 'မ', 'მ', 'm'],\n 'n' => ['ñ', 'ń', 'ň', 'ņ', 'ʼn', 'ŋ', 'ν', 'н', 'ن', 'န', 'ნ', 'n'],\n 'o' => [\n 'ó',\n 'ò',\n 'ỏ',\n 'õ',\n 'ọ',\n 'ô',\n 'ố',\n 'ồ',\n 'ổ',\n 'ỗ',\n 'ộ',\n 'ơ',\n 'ớ',\n 'ờ',\n 'ở',\n 'ỡ',\n 'ợ',\n 'ø',\n 'ō',\n 'ő',\n 'ŏ',\n 'ο',\n 'ὀ',\n 'ὁ',\n 'ὂ',\n 'ὃ',\n 'ὄ',\n 'ὅ',\n 'ὸ',\n 'ό',\n 'о',\n 'و',\n 'θ',\n 'ို',\n 'ǒ',\n 'ǿ',\n 'º',\n 'ო',\n 'ओ',\n 'o',\n 'ö',\n ],\n 'p' => ['п', 'π', 'ပ', 'პ', 'پ', 'p'],\n 'q' => ['ყ', 'q'],\n 'r' => ['ŕ', 'ř', 'ŗ', 'р', 'ρ', 'ر', 'რ', 'r'],\n 's' => ['ś', 'š', 'ş', 'с', 'σ', 'ș', 'ς', 'س', 'ص', 'စ', 'ſ', 'ს', 's'],\n 't' => ['ť', 'ţ', 'т', 'τ', 'ț', 'ت', 'ط', 'ဋ', 'တ', 'ŧ', 'თ', 'ტ', 't'],\n 'u' => [\n 'ú',\n 'ù',\n 'ủ',\n 'ũ',\n 'ụ',\n 'ư',\n 'ứ',\n 'ừ',\n 'ử',\n 'ữ',\n 'ự',\n 'û',\n 'ū',\n 'ů',\n 'ű',\n 'ŭ',\n 'ų',\n 'µ',\n 'у',\n 'ဉ',\n 'ု',\n 'ူ',\n 'ǔ',\n 'ǖ',\n 'ǘ',\n 'ǚ',\n 'ǜ',\n 'უ',\n 'उ',\n 'u',\n 'ў',\n 'ü',\n ],\n 'v' => ['в', 'ვ', 'ϐ', 'v'],\n 'w' => ['ŵ', 'ω', 'ώ', 'ဝ', 'ွ', 'w'],\n 'x' => ['χ', 'ξ', 'x'],\n 'y' => ['ý', 'ỳ', 'ỷ', 'ỹ', 'ỵ', 'ÿ', 'ŷ', 'й', 'ы', 'υ', 'ϋ', 'ύ', 'ΰ', 'ي', 'ယ', 'y'],\n 'z' => ['ź', 'ž', 'ż', 'з', 'ζ', 'ز', 'ဇ', 'ზ', 'z'],\n 'aa' => ['ع', 'आ', 'آ'],\n 'ae' => ['æ', 'ǽ'],\n 'ai' => ['ऐ'],\n 'ch' => ['ч', 'ჩ', 'ჭ', 'چ'],\n 'dj' => ['ђ', 'đ'],\n 'dz' => ['џ', 'ძ'],\n 'ei' => ['ऍ'],\n 'gh' => ['غ', 'ღ'],\n 'ii' => ['ई'],\n 'ij' => ['ij'],\n 'kh' => ['х', 'خ', 'ხ'],\n 'lj' => ['љ'],\n 'nj' => ['њ'],\n 'oe' => ['ö', 'œ', 'ؤ'],\n 'oi' => ['ऑ'],\n 'oii' => ['ऒ'],\n 'ps' => ['ψ'],\n 'sh' => ['ш', 'შ', 'ش'],\n 'shch' => ['щ'],\n 'ss' => ['ß'],\n 'sx' => ['ŝ'],\n 'th' => ['þ', 'ϑ', 'ث', 'ذ', 'ظ'],\n 'ts' => ['ц', 'ც', 'წ'],\n 'ue' => ['ü'],\n 'uu' => ['ऊ'],\n 'ya' => ['я'],\n 'yu' => ['ю'],\n 'zh' => ['ж', 'ჟ', 'ژ'],\n '(c)' => ['©'],\n 'A' => [\n 'Á',\n 'À',\n 'Ả',\n 'Ã',\n 'Ạ',\n 'Ă',\n 'Ắ',\n 'Ằ',\n 'Ẳ',\n 'Ẵ',\n 'Ặ',\n 'Â',\n 'Ấ',\n 'Ầ',\n 'Ẩ',\n 'Ẫ',\n 'Ậ',\n 'Å',\n 'Ā',\n 'Ą',\n 'Α',\n 'Ά',\n 'Ἀ',\n 'Ἁ',\n 'Ἂ',\n 'Ἃ',\n 'Ἄ',\n 'Ἅ',\n 'Ἆ',\n 'Ἇ',\n 'ᾈ',\n 'ᾉ',\n 'ᾊ',\n 'ᾋ',\n 'ᾌ',\n 'ᾍ',\n 'ᾎ',\n 'ᾏ',\n 'Ᾰ',\n 'Ᾱ',\n 'Ὰ',\n 'Ά',\n 'ᾼ',\n 'А',\n 'Ǻ',\n 'Ǎ',\n 'A',\n 'Ä',\n ],\n 'B' => ['Б', 'Β', 'ब', 'B'],\n 'C' => ['Ç', 'Ć', 'Č', 'Ĉ', 'Ċ', 'C'],\n 'D' => ['Ď', 'Ð', 'Đ', 'Ɖ', 'Ɗ', 'Ƌ', 'ᴅ', 'ᴆ', 'Д', 'Δ', 'D'],\n 'E' => [\n 'É',\n 'È',\n 'Ẻ',\n 'Ẽ',\n 'Ẹ',\n 'Ê',\n 'Ế',\n 'Ề',\n 'Ể',\n 'Ễ',\n 'Ệ',\n 'Ë',\n 'Ē',\n 'Ę',\n 'Ě',\n 'Ĕ',\n 'Ė',\n 'Ε',\n 'Έ',\n 'Ἐ',\n 'Ἑ',\n 'Ἒ',\n 'Ἓ',\n 'Ἔ',\n 'Ἕ',\n 'Έ',\n 'Ὲ',\n 'Е',\n 'Ё',\n 'Э',\n 'Є',\n 'Ə',\n 'E',\n ],\n 'F' => ['Ф', 'Φ', 'F'],\n 'G' => ['Ğ', 'Ġ', 'Ģ', 'Г', 'Ґ', 'Γ', 'G'],\n 'H' => ['Η', 'Ή', 'Ħ', 'H'],\n 'I' => [\n 'Í',\n 'Ì',\n 'Ỉ',\n 'Ĩ',\n 'Ị',\n 'Î',\n 'Ï',\n 'Ī',\n 'Ĭ',\n 'Į',\n 'İ',\n 'Ι',\n 'Ί',\n 'Ϊ',\n 'Ἰ',\n 'Ἱ',\n 'Ἳ',\n 'Ἴ',\n 'Ἵ',\n 'Ἶ',\n 'Ἷ',\n 'Ῐ',\n 'Ῑ',\n 'Ὶ',\n 'Ί',\n 'И',\n 'І',\n 'Ї',\n 'Ǐ',\n 'ϒ',\n 'I',\n ],\n 'J' => ['J'],\n 'K' => ['К', 'Κ', 'K'],\n 'L' => ['Ĺ', 'Ł', 'Л', 'Λ', 'Ļ', 'Ľ', 'Ŀ', 'ल', 'L'],\n 'M' => ['М', 'Μ', 'M'],\n 'N' => ['Ń', 'Ñ', 'Ň', 'Ņ', 'Ŋ', 'Н', 'Ν', 'N'],\n 'O' => [\n 'Ó',\n 'Ò',\n 'Ỏ',\n 'Õ',\n 'Ọ',\n 'Ô',\n 'Ố',\n 'Ồ',\n 'Ổ',\n 'Ỗ',\n 'Ộ',\n 'Ơ',\n 'Ớ',\n 'Ờ',\n 'Ở',\n 'Ỡ',\n 'Ợ',\n 'Ø',\n 'Ō',\n 'Ő',\n 'Ŏ',\n 'Ο',\n 'Ό',\n 'Ὀ',\n 'Ὁ',\n 'Ὂ',\n 'Ὃ',\n 'Ὄ',\n 'Ὅ',\n 'Ὸ',\n 'Ό',\n 'О',\n 'Θ',\n 'Ө',\n 'Ǒ',\n 'Ǿ',\n 'O',\n 'Ö',\n ],\n 'P' => ['П', 'Π', 'P'],\n 'Q' => ['Q'],\n 'R' => ['Ř', 'Ŕ', 'Р', 'Ρ', 'Ŗ', 'R'],\n 'S' => ['Ş', 'Ŝ', 'Ș', 'Š', 'Ś', 'С', 'Σ', 'S'],\n 'T' => ['Ť', 'Ţ', 'Ŧ', 'Ț', 'Т', 'Τ', 'T'],\n 'U' => [\n 'Ú',\n 'Ù',\n 'Ủ',\n 'Ũ',\n 'Ụ',\n 'Ư',\n 'Ứ',\n 'Ừ',\n 'Ử',\n 'Ữ',\n 'Ự',\n 'Û',\n 'Ū',\n 'Ů',\n 'Ű',\n 'Ŭ',\n 'Ų',\n 'У',\n 'Ǔ',\n 'Ǖ',\n 'Ǘ',\n 'Ǚ',\n 'Ǜ',\n 'U',\n 'Ў',\n 'Ü',\n ],\n 'V' => ['В', 'V'],\n 'W' => ['Ω', 'Ώ', 'Ŵ', 'W'],\n 'X' => ['Χ', 'Ξ', 'X'],\n 'Y' => ['Ý', 'Ỳ', 'Ỷ', 'Ỹ', 'Ỵ', 'Ÿ', 'Ῠ', 'Ῡ', 'Ὺ', 'Ύ', 'Ы', 'Й', 'Υ', 'Ϋ', 'Ŷ', 'Y'],\n 'Z' => ['Ź', 'Ž', 'Ż', 'З', 'Ζ', 'Z'],\n 'AE' => ['Æ', 'Ǽ'],\n 'Ch' => ['Ч'],\n 'Dj' => ['Ђ'],\n 'Dz' => ['Џ'],\n 'Gx' => ['Ĝ'],\n 'Hx' => ['Ĥ'],\n 'Ij' => ['IJ'],\n 'Jx' => ['Ĵ'],\n 'Kh' => ['Х'],\n 'Lj' => ['Љ'],\n 'Nj' => ['Њ'],\n 'Oe' => ['Œ'],\n 'Ps' => ['Ψ'],\n 'Sh' => ['Ш'],\n 'Shch' => ['Щ'],\n 'Ss' => ['ẞ'],\n 'Th' => ['Þ'],\n 'Ts' => ['Ц'],\n 'Ya' => ['Я'],\n 'Yu' => ['Ю'],\n 'Zh' => ['Ж'],\n ' ' => [\n \"\\xC2\\xA0\",\n \"\\xE2\\x80\\x80\",\n \"\\xE2\\x80\\x81\",\n \"\\xE2\\x80\\x82\",\n \"\\xE2\\x80\\x83\",\n \"\\xE2\\x80\\x84\",\n \"\\xE2\\x80\\x85\",\n \"\\xE2\\x80\\x86\",\n \"\\xE2\\x80\\x87\",\n \"\\xE2\\x80\\x88\",\n \"\\xE2\\x80\\x89\",\n \"\\xE2\\x80\\x8A\",\n \"\\xE2\\x80\\xAF\",\n \"\\xE2\\x81\\x9F\",\n \"\\xE3\\x80\\x80\",\n \"\\xEF\\xBE\\xA0\",\n ],\n ];\n }", "public final function getTopCharsAndOccurrences(string $content) : array\n {\n $collArray = str_split($content);\n $top = [];\n foreach ($collArray as $char) {\n if (!isset($top[$char])) {\n $top[$char] = 0;\n }\n $top[$char]++;\n }\n arsort($top);\n return $top;\n }", "public function getPublicationFrequency()\n {\n return $this->getFieldArray('310', ['a', 'b']);\n }", "function getTextArray($text)\n{\n\t$numWords = str_word_count($text, 0, '1234567890');\n\tif($numWords > 1) { $wordsArray = explode(' ', $text); } else { $wordsArray = array($text); $word = $text; }\n\treturn(array('words'=>$wordsArray, 'wordcount'=>$numWords, 'word'=>$word));\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 abstract function get_counts();", "function mb_count_chars($input) {\r\n\t\t$l = mb_strlen($input);\r\n\t\t$unique = array();\r\n\t\tfor($i = 0; $i < $l; $i++) {\r\n\t\t\t$char = mb_substr($input, $i, 1);\r\n\t\t\tif(!array_key_exists($char, $unique))\r\n\t\t\t\t$unique[$char] = 0;\r\n\t\t\t$unique[$char]++;\r\n\t\t}\r\n\t\treturn $unique;\r\n\t}", "function distribution($array)\n{\n $y = array_count_values($array);\n ksort($y);\n return $y;\n}", "function buildFontIndex() {\n // get list of available fonts for imagemagick\n $o = shell_exec(\"convert -list font\");\n $ph = array(\"\\n Font: \",\"\\n family: \",\"\\n style: \",\"\\n stretch: \",\"\\n weight: \",\"\\n glyphs: \");\n $to = array(\"\\n\",\",\",\",\",\",\",\",\",\",\");\n $l = str_replace($ph,$to,$o);\n\n $flist = explode(\"\\n\",$l);\n $flist2 = array();\n foreach ($flist as $f) {\n array_push($flist2, explode(\",\",$f));\n }\n $fonts = array();\n foreach ($flist2 as $f2) {\n $fonts[$f2[1]][$f2[2]][$f2[4]] = $f2[0];\n }\n // if the above can be optimized - be my guest :)\n return $fonts;\n }", "function rankWiseResult($crwaler,$word){\r\n\t$rank = array();\r\n foreach($crwaler as $key => $value){\r\n foreach($value as $name => $count){\r\n if(strtolower($name) == strtolower($word)){\r\n $rank[$key] = $count;\r\n break;\r\n }\r\n \r\n }\r\n\t}\r\n\tarsort($rank);\r\n\treturn $rank;\r\n}", "public function getCount() {\n $result = array();\n\n $result['normal'] = (int)$this->db->count('SELECT COUNT(DISTINCT mapname) FROM playertimes WHERE mapname NOT IN ('.$this->ignored.') AND mapname NOT LIKE \"prokz%\" AND mapname NOT LIKE \"kzpro%\"');\n $result['prokz'] = (int)$this->db->count('SELECT COUNT(DISTINCT mapname) FROM playertimes WHERE mapname NOT IN ('.$this->ignored.') AND (mapname LIKE \"prokz%\" OR mapname LIKE \"kzpro%\")');\n\n return $result;\n }", "abstract protected function report_to_array_mapping();", "function countWords($sentence)\n {\n $wordsArr = explode(' ', $sentence);\n $vals = array_count_values($wordsArr);\n\n echo \"<pre>\";\n print_r($vals);\n echo \"</pre>\";\n foreach ($vals as $key => $value)\n {\n echo \"<b>\" . $key . \"</b> occurs \" . $value . \" times in this sentence <br/>\";\n }\n }", "public function symbols() : array;", "public function getDocCharFeatures($str) {\n\n\t\t$out = array();\n\n\t\tif ($this->classes) {\n\t\t\t// character class ratios\n\t\t\t$out = array_merge($out, $this->getCharClassRatios($str));\n\t\t\t// space-based features\n\t\t\t$out = array_merge($out, $this->getSpaceFeatures($str));\n\t\t\t// puncturation-based features\n\t\t\t$out = array_merge($out, $this->getPunctFeatures($str));\n\t\t\t// alphabet-based features\n\t\t\t$out = array_merge($out, $this->getAlphabetFeatures($str));\n\t\t}\n\t\telse {\n\t\t\t// printable character count\n\t\t\t$gr_cnt = $this->nonSpaceCharCount($str);\n\t\t\t// white space count\n\t\t\t$ws_cnt = $this->spaceCharCount($str);\n\t\t\t// character frequency array\n\t\t\t$chf_arr = $this->str2charCountArray($str);\n\t\t\tksort($chf_arr);\n\n\t\t\t$out['ws'] = ($gr_cnt != 0) ? $ws_cnt/$gr_cnt : 0;\n\t\t\tforeach ($chf_arr as $ch => $num) {\n\t\t\t\t$out['R:' . $ch] = ($gr_cnt != 0) ? $num/$gr_cnt : 0;\n\t\t\t}\n\t\t}\n\n\t\treturn $out;\n\t}", "public function chars()\n {\n // init\n $chars = array();\n $l = $this->length();\n\n for ($i = 0; $i < $l; $i++) {\n $chars[] = $this->at($i)->str;\n }\n\n return $chars;\n }", "function answersArray($strInput)\t{\n\t\t$strLine=explode(chr(10),$strInput);\n\t\tforeach($strLine as $intKey => $strLineValue)\t{\n\t\t\t$strValue = explode('|',$strLineValue);\n\t\t\t$arrOutput[$intKey+1]=trim($strValue[0]);\n\t\t}\n\t\treturn $arrOutput;\n\t}", "function arr_description_words($text)\n{\n // return str_word_count_utf8($text,1);\n $array_text_words = str_word_count($text, 1);\n\n return $array_text_words;\n\n}", "function testFrequencyList321(){\r\n\r\n\t$c = new GenerateWordCloud();\r\n\t$words = array();\r\n\tarray_push($words, 'most');\r\n\tarray_push($words, 'most');\t\r\n\tarray_push($words, 'most');\r\n\tarray_push($words, 'average');\r\n\tarray_push($words, 'average');\r\n\tarray_push($words, 'least');\r\n\t\r\n\t$frequency_list = $c->wordFreq($words);\r\n\t$this->assertEquals(3, $frequency_list['most']);\r\n\t$this->assertEquals(2, $frequency_list['average']);\r\n\t$this->assertEquals(1, $frequency_list['least']);\r\n\t$this->assertEquals(3, count($frequency_list));\r\n\t}", "public function getCharsByCharCodes($charCodes, $encoding = 'UTF-8', $asArray = true) {}", "public function getCharsByCharCodes($charCodes, $encoding = 'UTF-8', $asArray = true) {}", "private function generateAlphabet(){\n $letters = array();\n $letter = 'A';\n while ($letter !== 'AAA') {\n $letters[] = $letter++;\n }\n return $letters;\n }", "public function getCharsByCharCodes($charCodes, $encoding = 'UTF-8', $asArray = true) {}", "public function characters()\n {\n return [\n $this->character1,\n $this->character2,\n $this->character3,\n ];\n }", "public static function labelsPlainArray()\n\t{\n\t\t$rows = DB::table('labels')->where(\"lang\", \"EN\")->orderBy(\"key\")->get(); // DV0001\n\t\tforeach($rows as $row) {\n\t\t\t$output[] = $row->key;\n\t\t}\n\t\treturn $output;\n\t}", "public function getSpaceFeatures($str) {\n\n\t\t$out = array();\n\n\t\t// character counts\n\t\t$gr_cnt = $this->nonSpaceCharCount($str); // character count: M\n\t\t$ws_cnt = $this->spaceCharCount($str); // white space count\n\t\t// character frequencies array\n\t\t$chf_arr = $this->str2charCountArray($str);\n\n\t\t// white space ratio to M\n\t\t$out['ws'] = ($gr_cnt != 0) ? $ws_cnt/$gr_cnt: 0;\n\n\t\t// space to white space ratio\n\t\t$out['s2w'] = (isset($chf_arr[' ']) && $ws_cnt != 0)\n\t\t\t\t\t? $chf_arr[' ']/$ws_cnt\n\t\t\t\t\t: 0;\n\n\t\t// Space ratios to M\n\t\tforeach ($this->spaces as $type => $ch) {\n\t\t\t$out[$type] = (isset($chf_arr[$ch]) && $gr_cnt != 0)\n\t\t\t\t\t\t? $chf_arr[$ch]/$gr_cnt\n\t\t\t\t\t\t: 0;\n\t\t}\n\n\t\treturn $out;\n\t}", "protected function map():array {return df_map_r(function(int $v):array {return [\"sha$v\", \"SHA-$v\"];}, [1, 256, 512]);}", "function get_counts() {\n\t$artists = @file(\"/var/lib/musica/artists.count\");\n\t$albums = @file(\"/var/lib/musica/albums.count\");\n\t$songs = @file(\"/var/lib/musica/songs.count\");\n\t$counts = array(rtrim($artists[0]), rtrim($albums[0]), rtrim($songs[0]));\n\treturn $counts;\n}", "public function rankings_array() {\n \treturn ['C+30/5 (5)',\n \t\t\t'C+30/4 (10)',\n \t\t\t'C+30/3 (15)',\n \t\t\t'C+30/2 (20)',\n \t\t\t'C+30/1 (25)',\n \t\t\t'C+30 (30)',\n \t\t\t'C+15/5 (35)',\n \t\t\t'C+15/4 (40)',\n \t\t\t'C+15/3 (45)',\n \t\t\t'C+15/2 (50)',\n \t\t\t'C+15/1 (55)',\n \t\t\t'C+15 (60)',\n \t\t\t'B+4/6 (65)',\n \t\t\t'B+2/6 (70)',\n \t\t\t'B0 (75)',\n \t\t\t'B-2/6 (80)',\n \t\t\t'B-4/6 (85)',\n \t\t\t'B-15 (90)',\n \t\t\t'B-15/1 (95)',\n \t\t\t'B-15/2 (100)',\n \t\t\t'B-15/4 (105)',\n \t\t\t'A nationaal (110)',\n \t\t\t'A internationaal (115)'];\n }", "private function process_frequency_table()\n {\n arsort($this->table);\n $count = count($this->table);\n $diffcount = (($this->max_count - $this->min_count) != 0)? ($this->max_count - $this->min_count): 1;\n $diffsize = (($this->max_font_size - $this->min_font_size) != 0)? ($this->max_font_size - $this->min_font_size): 1;\n $slope = $diffsize / $diffcount;\n $yintercept = $this->max_font_size - ($slope * $this->max_count); \n \n // Cut the table so we have only $this->words_limit\n $this->table = array_slice($this->table, 0, $this->words_limit);\n \n foreach($this->table as $key => $val) \n {\n $font_size = (int)($slope * $this->table[$key]->count + $yintercept);\n\n // Set min/max val for font size\n if($font_size < $this->min_font_size) \n {\n $font_size = $this->min_font_size;\n } \n elseif($font_size > $this->max_font_size) \n {\n $font_size = $this->max_font_size;\n }\n \n $this->table[$key]->size = $font_size;\n $this->table[$key]->angle = 0;\n \n // Randomly decide if word should be vertical\n if(rand(1, 10) <= $this->vertical_freq) \n $this->table[$key]->angle = 90;\n \n $this->table[$key]->box = imagettfbbox($this->table[$key]->size * $this->padding_size, $this->table[$key]->angle - $this->padding_angle, $this->font, $key);\n }\n }", "function encode($input)\n{\n if ($input == '') {\n return '';\n }\n\n $data = [];\n $lastInsertIndex = 0;\n $result = '';\n\n for ($i = 0; $i < strlen($input); $i++) {\n if ($i === 0) {\n $data[$i] = [$input[$i] => 1];\n continue;\n }\n\n if ($input[$i] === $input[$i-1]) {\n $data[$lastInsertIndex][$input[$lastInsertIndex]]++;\n continue;\n } else {\n $data[$i] = [$input[$i] => 1];\n $lastInsertIndex = $i;\n continue;\n }\n }\n\n foreach($data as $k=>$v) {\n foreach($v as $letter=>$count) {\n if ($count > 1) {\n $result .= $count . $letter;\n } else {\n $result .= $letter;\n }\n }\n }\n return $result;\n}", "function mapWord(&$word_map, $word, $offset, $f)\r\n{\r\n if (isset($word_map[$word])) {\r\n if (isset($word_map[$word][$f])){\r\n $term_count = $word_map[$word]['term_count']+1;\r\n $word_map[$word]['term_count'] = $term_count;\r\n array_push($word_map[$word][$f], $offset);\r\n } else {\r\n $doc_count = $word_map[$word]['doc_count']+1;\r\n $word_map[$word]['doc_count'] = $doc_count;\r\n $word_map[$word][$f] = array();\r\n $term_count = $word_map[$word]['term_count']+1;\r\n $word_map[$word]['term_count'] = $term_count;\r\n array_push($word_map[$word][$f],$offset);\r\n }\r\n }\r\n else {\r\n $word_map[$word] = array();\r\n $word_map[$word]['doc_count'] = 1;\r\n $word_map[$word]['term_count'] = 1;\r\n $word_map[$word][$f] = array();\r\n array_push($word_map[$word][$f], $offset);\r\n }\r\n}", "protected function arrayBigLetters(): array\n {\n return ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',\n 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U',\n 'V', 'W', 'X', 'Y', 'Z'];\n }", "function cards_values(array $hand):array {\n return array_map(function ($el) {return strval($el[0]);}, $hand);\n}", "function getLettersArray()\n{\n return [\n 'a' => true,\n 'b' => true,\n 'c' => true,\n 'd' => true,\n 'e' => true,\n 'f' => true,\n 'g' => true,\n 'h' => true,\n 'i' => true,\n 'j' => true,\n 'k' => true,\n 'l' => true,\n 'm' => true,\n 'n' => true,\n 'o' => true,\n 'p' => true,\n 'q' => true,\n 'r' => true,\n 's' => true,\n 't' => true,\n 'u' => true,\n 'v' => true,\n 'w' => true,\n 'x' => true,\n 'y' => true,\n 'z' => true,\n ];\n}", "public static function stats(): array;", "public function getCategoriesByInitialLetter() {\n\t\tglobal $db;\n\t\t$res = $db->query(\"SELECT category, used FROM `categories` ORDER BY category\");\n\n\t\t$initials = [];\n\t\tforeach ($res as $r) {\n\t\t\t$firstChar = mb_substr($r->category, 0, 1);\n\t\t\tif(is_numeric($firstChar)) $firstChar = \"#\";\n\t\t\t$initials[$firstChar][] = [$r->category, $r->used];\n\t\t}\n\n\t\treturn $initials;\n\t}", "protected function _getFormattedCount ($count=0) {\r\n\t\t\r\n\t\treturn array(\r\n\t\t\t0 => array(\r\n\t\t\t\t0 => array(\r\n\t\t\t\t\t'count' => $count\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t}", "public function getFontSizes(): array {\n $sizes = [];\n for ($i = 6; $i <= 80; $i++) {\n $sizes[] = $i . 'px';\n }\n\n $sizes = apply_filter($sizes, 'font_sizes');\n return $sizes;\n }", "protected function arraySmallLetters(): array\n {\n return ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',\n 'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u',\n 'v', 'w', 'x', 'y', 'z'];\n }", "public static function get_op_hzArray () {\n $arr = array(\n 'weekly' => '每周',\n 'interval' => '隔周',\n 'temp' => '临时');\n\n return $arr;\n }", "public static function arrayValuesToCounts($array)\n {\n $newArray = [];\n foreach ($array as $key => $row) {\n $newArray[$key] = count($row);\n }\n\n return $newArray;\n }", "function cards_suits(array $hand):array {\n return array_map(function ($el) {return strval($el[1]);}, $hand);\n}", "public function getCharKeys()\n {\n return array_fill_keys(array_values($this->bidiordarr), true);\n }", "function string_to_alphabet_map($string) {\n $res_map = array(\"a\" => \"a\", \"b\" => \"b\", \"c\" => \"c\", \"d\" => \"d\", \"e\" => \"e\", \"f\" => \"f\",\n \"g\" => \"g\", \"h\" => \"h\", \"i\" => \"i\", \"j\" => \"j\", \"k\" => \"k\", \"l\" => \"l\",\n \"m\" => \"m\", \"n\" => \"n\", \"o\" => \"o\", \"p\" => \"p\", \"q\" => \"q\", \"r\" => \"r\",\n \"s\" => \"s\", \"t\" => \"t\", \"u\" => \"u\", \"v\" => \"v\", \"w\" => \"w\", \"x\" => \"x\",\n \"y\" => \"y\", \"z\" => \"z\");\n $keys = array_keys($res_map);\n for ($i=0; $i<26; $i++) {\n if ($string[$i] != null)\n $res_map[$keys[$i]] = ($string[$i]);\n else\n $res_map[$keys[$i]] = \"*\";\n }\n return $res_map;\n }", "public function getFontFamilys(): array {\n $fonts = [];\n\n $fontStackFile = Path::resolve(\n 'ULICMS_ROOT/node_modules/system-font-stacks/index.json'\n );\n\n $fontIndex = json_decode(file_get_contents($fontStackFile) ?: '', true);\n\n foreach ($fontIndex as $index => $fontStack) {\n $name = $fontStack[0];\n\n if (str_starts_with($name, '-')) {\n $name = $index;\n }\n\n $fonts[$name] = implode(', ', $fontStack);\n }\n\n $fonts = apply_filter($fonts, 'fonts_filter');\n\n uksort($fonts, 'strnatcasecmp');\n\n return $fonts;\n }", "function init_map_groupes(): array\r\n{\r\n $col_depart = 0;\r\n $line_depart = 0;\r\n $num_groupe = 0;\r\n\r\n while ($line_depart !== 9) {\r\n while ($col_depart !== 9) {\r\n for ($y = $line_depart; $y < $line_depart + 3; $y++) {\r\n for ($x = $col_depart; $x < $col_depart + 3; $x++) {\r\n $map[$y][$x] = $num_groupe;\r\n }\r\n }\r\n $col_depart = $col_depart + 3;\r\n $num_groupe++;\r\n }\r\n $col_depart = 0;\r\n $line_depart = $line_depart + 3;\r\n }\r\n\r\n return $map;\r\n}", "function transform (array $old): array\n{\n $transformed = [];\n\n foreach ($old as $points => $letters) {\n foreach ($letters as $letter) {\n $transformed[$letter] = $points;\n }\n }\n return array_change_key_case($transformed);\n}", "public function getWidths(array $chars) {}", "function countWordFreq() {\n \ttry {\n\t foreach ($this->artists as $name => $artist) {\n\t foreach ($artist->songs as $title => $song) {\n\t $wordCount = $song->getWordCount();\n\t // if (Settings->DEBUG) echo \"Got this word count from song: \", json_encode($wordCount);\n\t $this->mergeWordCount($wordCount);\n\t }\n\t }\n \t} catch (Exception $e) {\n \t\tthrow $e; //@codeCoverageIgnore\n \t}\n }", "protected function _getFacets()\n {\n $facets = parent::_getFacets();\n $result = array();\n foreach ($facets as $value => $count) {\n $key = 0; // false by default\n if ($value === 'true' || $value === 'T' || $value === '1' || $value === 1 || $value === true) {\n $key = 1;\n }\n\n $result[$key] = $count;\n }\n\n return $result;\n }", "public function getFrequency()\n {\n return $this->get(self::_FREQUENCY);\n }", "public function getFrequency()\n {\n return $this->get(self::_FREQUENCY);\n }", "public static function getFrequencyOptions()\n {\n $translatedOptions = array();\n foreach (self::$frequencyOptions as $key => $value) {\n $translatedOptions[$key] = Craft::t($value);\n }\n\n return $translatedOptions;\n }", "function getCategories() {\r\n\t\t$categories = $this->find('all');\r\n\t\t$result = array();\r\n\t\tforeach ($categories as $category) {\r\n\t\t\t$result[$category['NbCategory']['id']] = array(\r\n\t\t\t\t'probability' => $category['NbCategory']['probability'],\r\n\t\t\t\t'word_count' => $category['NbCategory']['word_count']\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function occurrences_func($str, $array) {\r\n\tif (!valid_string($str)) {\r\n\t\treturn;\r\n\t} else if (!valid_array($array)) {\r\n\t\treturn 0;\r\n\t}\r\n\t// case insensitive\r\n\t$str_lower = strtolower($str);\r\n\r\n\t$occurrences = 0;\t\r\n\t// for each item in array\r\n\tforeach ($array as $item) {\r\n\t\t$item = strtolower($item);\r\n\t\t$occurrences += substr_count($str_lower, $item);\r\n\t}\r\n\treturn $occurrences;\r\n}", "public function dataByteCounts()\n {\n return [\n 'count_style_attribute' => [\n '<div style=\"12345\"></div><', 5,\n ],\n\n // Adding <head> tag because of bug (see https://github.com/ampproject/amp-toolbox-php/issues/28).\n 'multibyte_chars_are_counted_in_bytes_not_chars' => [\n '<head></head><div style=\"Iñtërnâtiônàlizætiøn\"></div>', 27,\n ],\n ];\n }", "function getArray($word) {\r\n $hangman = str_split($word);\r\n for( $i = 0; $i < strlen($word); $i++){\r\n $hangman[$i] = array($hangman[$i], false);\r\n }\r\n return $hangman;\r\n}", "function charCounter($c, array $grid): int {\n $total = 0;\n $h = count($grid);\n $w = count($grid[array_keys($grid)[0]]);\n $y0 = min(array_keys($grid));\n $x0 = min(array_keys($grid[array_keys($grid)[0]]));\n for ($y = $y0; $y < $y0 + $h; $y++) {\n for ($x = $x0; $x < $x0 + $w; $x++) {\n if ($grid[$y][$x] === $c) {\n $total++;\n }\n }\n }\n return $total;\n }", "function getAlc(){\r\n return array(\"saki\", \"vodka\", \"rum\", \"whiskey\", \"tequila\", \"gin\");\r\n }", "public function probabilities($text)\n {\n $that = $this;\n $probabilities = [];\n\n if ($that->totalDocuments > 0) {\n $tokens = ($that->tokenizer)($text);\n $frequencyTable = $that->frequencyTable($tokens);\n\n // for this text\n // iterate thru our categories to find the one with max probability\n foreach ($that->categories as $category => $value) {\n $categoryProbability = $that->docCount[$category] / $that->totalDocuments;\n $logProbability = log($categoryProbability);\n foreach ($frequencyTable as $token => $frequencyInText) {\n $tokenProbability = $that->tokenProbability($token, $category);\n\n // determine the log of the P( w | c ) for this word\n $logProbability += $frequencyInText * log($tokenProbability);\n }\n\n $probabilities[$category] = $logProbability;\n }\n }\n\n return $probabilities;\n }", "function getStatistic() {\n\t\t$ret = array();\n\t\tforeach ($this->data as $entry) {\n\t\t\tif (array_key_exists($entry['entryType'], $ret)) {\n\t\t\t\t$ret[$entry['entryType']]++;\n\t\t\t} else {\n\t\t\t\t$ret[$entry['entryType']] = 1;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "private static function base32LookupTable() : array\n {\n return [\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n '=' // padding char\n ];\n }", "public function getRegisteredChars() {}", "public function toArray()\n {\n return [\n 5 => 5,\n 10 => 10,\n 15 => 15,\n 20 => 20,\n 25 => 25\n ];\n }", "public function getKeywordArray()\n {\n $keywords = array();\n foreach ($this->keywords as $keyword) {\n /** @var $keyword TypeKeyword */\n $keywords[] = mb_strtolower($keyword->getKeyword(), 'utf-8');\n }\n\n return $keywords;\n }", "public static function profile($motifs) {\n $pf = [[],[],[],[]];\n $bases = ['A','C','G','T'];\n $counts = [0,0,0,0];\n $k = strlen($motifs[0]);\n $num_motifs = sizeof($motifs);\n for ($j = 0; $j < $k; $j++) {\n // calculate counts on first column iteration\n for ($i = 0; $i < $num_motifs; $i++) {\n $counts[array_search($motifs[$i][$j], $bases)]++;\n }\n // insert frequencies on second column iteration\n for ($i = 0; $i < sizeof($counts); $i++) {\n array_push($pf[$i], $counts[$i] / $num_motifs);\n }\n $counts = [0,0,0,0];\n }\n return $pf;\n }", "public static function most_frequent_Word($arr){\n $arr_freq = array_count_values($arr);\n\n // arranging the new $arr_freq in decreasing\n // order of occurrences\n arsort($arr_freq);\n\n // $new_arr containing the keys of sorted array\n $new_arr = array_keys($arr_freq);\n\n // Second most frequent element\n return $new_arr[0];\n }", "public function getNumGlyphs() {}", "public function getNumGlyphs() {}", "public function toArray()\n {\n $choose = array(\n 'Open Sans' => 'Open Sans',\n 'Arial' => 'Arial',\n 'Helvetica' => 'Helvetica',\n 'Comic Sans MS' => 'Comic Sans MS',\n 'Calibri' => 'Calibri',\n 'Roboto' => 'Roboto',\n 'Courier' => 'Courier',\n 'Symbola' => 'Symbola',\n 'Times New Roman' => 'Times New Roman',\n );\n return $choose;\n }", "function printMap(&$word_map)\r\n{\r\n ksort($word_map);\r\n if ($word_map != null) {\r\n foreach ($word_map as $word => $value) {\r\n $line = $word . \":\" ;\r\n $data = \"\";\r\n foreach ($word_map[$word] as $page => $occurance) {\r\n if (is_array($occurance)) {\r\n $data = $data.\"(\".$page;\r\n foreach ($occurance as $occ) {\r\n $data = $data.\",\".$occ;\r\n }\r\n $data = $data.\"),\";\r\n }\r\n }\r\n $line = $line.$word_map[$word]['doc_count'].\":\"\r\n .$word_map[$word]['term_count'].\":\"\r\n .rtrim($data, \",\").\"\\n\";\r\n print $line;\r\n }\r\n }\r\n}", "public function get_count_variables() {\r\n\t\treturn array( $this->where, $this->values );\r\n\t}", "public function getFrequency($id)\n {\n $stmt = $this->con->prepare(\"SELECT id_freq , fk_disciplina, aulas, faltas FROM tbl_frequencia WHERE fk_usuario = ?\");\n $stmt->bind_param(\"i\", $id);\n $stmt->execute();\n $stmt->bind_result($id, $idDiscipline, $aulas, $faltas);\n $frequencies = array();\n\n while ($stmt->fetch()) {\n $frequency = array();\n $frequency['id'] = $id;\n $frequency['idDisciplina'] = $idDiscipline;\n $frequency['aulas'] = $aulas;\n $frequency['faltas'] = $faltas;\n array_push($frequencies, $frequency);\n }\n\n $stmt->close();\n return $frequencies;\n }", "public function countPossibilities()\n {\n $count = 0;\n foreach($this->dictionary as $charGroup) {\n if($count === 0) {\n $count = count($charGroup);\n } else {\n $count = $count * count($charGroup);\n }\n }\n return $count;\n }" ]
[ "0.7261822", "0.64978516", "0.6474168", "0.6468677", "0.6303435", "0.6242022", "0.6201956", "0.60705554", "0.60369927", "0.59643245", "0.5952663", "0.5821382", "0.58143157", "0.56799394", "0.56423604", "0.53942055", "0.5292736", "0.5289216", "0.52879566", "0.5278701", "0.5266793", "0.5255908", "0.52521586", "0.52323776", "0.52039796", "0.51918006", "0.5172418", "0.5167979", "0.5125748", "0.50261194", "0.5025054", "0.50222605", "0.49979606", "0.49977416", "0.49865884", "0.49714884", "0.49485204", "0.49428245", "0.4938128", "0.49220768", "0.49157554", "0.49057338", "0.49034616", "0.48880777", "0.48775402", "0.4876107", "0.4874486", "0.48741403", "0.48526433", "0.48502657", "0.48412493", "0.48370242", "0.4831467", "0.48184738", "0.47953552", "0.4783517", "0.47752315", "0.4771697", "0.47664663", "0.47641087", "0.47577456", "0.475233", "0.4741091", "0.47379673", "0.4737193", "0.47365183", "0.47356427", "0.4723177", "0.47162616", "0.47007", "0.46959633", "0.46703756", "0.4656579", "0.46487787", "0.46315572", "0.4628369", "0.4615661", "0.4615661", "0.46056446", "0.4604097", "0.46003678", "0.45963338", "0.45957166", "0.45868906", "0.45837086", "0.45778647", "0.45746937", "0.4572564", "0.4566517", "0.4566115", "0.45641232", "0.45579317", "0.4556947", "0.45538306", "0.45538306", "0.4553441", "0.45498928", "0.4532606", "0.45325753", "0.45160064" ]
0.7272989
0
Run the database seeds.
public function run() { //定义数据填充数据 $path = database_path(); $data = split_sql($path . '/sql/admin_user_insert.sql'); //执行数据迁移 $user = new User(); execute_sql($user, $data, 'admin_user'); }
{ "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
API ajax ajLogin method API
public function ajLogin() { $this->autoRender = false; $this->response->type('application/json'); if (!$this->request->is("ajax")) { $this->responseData['error'] = array('code' => 600, 'msseage' =>$this->convertErrorMessage(600)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } if (!$this->requestData) { $this->responseData['error'] = array('code' => 601, 'msseage' =>$this->convertErrorMessage(601)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } $query = $this->Users->find()->where([ 'Users.mail1' => $this->requestData['mail1'], 'Users.is_added' => 1, 'Users.is_deleted'=> 0 ]); if ($query->count() === 0) { $this->responseData['error'] = array('code' => 602, 'msseage' =>$this->convertErrorMessage(602)); } else if ($query->count() > 1) { $this->responseData['error'] = array('code' => 900, 'msseage' =>$this->convertErrorMessage(900)); } else { $UsersData = $query->toArray(); if(!password_verify($this->requestData['password'], $UsersData[0]->password)) { $this->responseData['error'] = array('code' => 602, 'msseage' =>$this->convertErrorMessage(602)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } $lastLogin = is_null($UsersData[0]->last_login_at) ? null : $UsersData[0]->last_login_at->i18nFormat('YYYY年MM月dd日 HH:mm:ss', 'Asia/Tokyo'); $this->request->session()->write([ 'loginUser.id' => $UsersData[0]->id, 'loginUser.name' => $UsersData[0]->last_name. ' '.$UsersData[0]->first_name, 'loginUser.mail1' => $UsersData[0]->mail1, 'loginUser.last_login_at' => $lastLogin, 'loginUser.auth' => $UsersData[0]->auth ]); $UsersData[0]->last_login_at = date('Y-m-d H:i:s'); if (!$this->Users->save($UsersData[0])) { $this->responseData['error'] = array('code' => 801, 'msseage' =>$this->convertErrorMessage(801)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } $this->responseData['success'] = 0; } $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postAjaxLogin(){\n\t\ttry{\n\t\t\tif (!isset($_POST))\n\t\t\t\tthrow new Exception('Request error');\n\n\t\t\t$id = \\Input::get('id', false);\n\t\t\t$passwd = \\Input::get('password', false);\n\n\t\t\tif (!$id || !$password)\n\t\t\t\tthrow new Exception('Parameter error');\n\n\t\t\t$m = \\Member::where('uid', '=', md5($id))->where('social', '=', 'rebeauty')->get();\n\n\t\t\tif ($m==null)\n\t\t\t\tthrow new Exception('Not founded');\n\n\t\t\tif (!\\Hash::check($passwd, $m->password))\n\t\t\t\tthrow new Exception('帳號或密碼錯誤');\n\n\t\t\t// register user into Auth that is a global variable\n\t\t\t\\Auth::login($m);\n\t\t\treturn \\Redirect::route('frontend.index');\n\t\t}catch(Exception $e){\n\t\t\treturn Response::json(array('status'=>'error', 'message'=>$e->getMessage(), '_token'=>csrf_token()));\n\t\t}\n\t}", "private function _login(){\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n try {\r\n\r\n\r\n $username = $_POST['username'];\r\n $password = $_POST['password'];\r\n\r\n $path = ROOT.'/site/config/auth.txt';\r\n $adapter = new AuthAdapter($path,\r\n 'MRZPN',\r\n $username,\r\n $password);\r\n\r\n //$result = $adapter->authenticate($username, $password);\r\n\r\n $auth = new AuthenticationService();\r\n $result = $auth->authenticate($adapter);\r\n\r\n\r\n if(!$result->isValid()){\r\n $result->error = \"Incorrect username and password combination!\";\r\n /*\r\n foreach ($result->getMessages() as $message) {\r\n $result->error = \"$message\\n\";\r\n }\r\n */\r\n } else {\r\n $response = 200;\r\n $result->url = WEBROOT;\r\n }\r\n\r\n\r\n\r\n } catch (Exception $e) {\r\n $result->error = $e->getMessage();\r\n }\r\n\r\n }\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n }", "function ajax_login() {\n\n\t\t\tcheck_ajax_referer( 'ajax-login-nonce', 'security' );\n\t\t\n\t\t\tself::auth_user_login($_POST['username'], $_POST['password'], __( 'Acceso', 'project045' ) );\n\t\t\n\t\t\tdie();\n\t\t}", "function submit_login() {\n $email = $this->input->post('username');\n $password = $this->input->post('password');\n \n //Validating login\n $login_status = 'invalid';\n $login_status = $this->mod_users->auth_user($email, $password);\n\n //Replying ajax request with validation response\n echo json_encode($login_status);\n }", "public function ajaxLogin()\n {\n if(isset($_POST)){\n\n $email = $_POST['email'];\n $senha = md5($_POST['senha']);\n\n //Busca o usuario\n $busca = $this->usuario->num_rows([\"email\" => $email, \"senha\" => $senha]);\n\n if($busca == 1){\n\n $usuario = $this->usuario->get([\"email\" => $email, \"senha\" => $senha]);\n\n\n $_SESSION['SOS-USUARIO']['NOME'] = $usuario[0]->nome;\n $_SESSION['SOS-USUARIO']['EMAIL'] = $usuario[0]->email;\n\n $dados = array(\n \"tipo\" => true,\n \"mensagem\" => \"Usuário logado com sucesso, aguarde\"\n );\n\n }else{\n\n $dados = array(\n \"tipo\" => false,\n \"mensagem\" => \"Usuário não encontrado!\"\n );\n\n }\n\n }else{\n\n $dados = array(\n \"tipo\" => false,\n \"mensagem\" => \"Dados não enviado\"\n );\n\n }\n\n echo json_encode($dados);\n\n }", "public function ajaxLogin(){\n\n if(isset($_POST)){\n\n $email = $_POST['email'];\n $senha = md5($_POST['senha']);\n\n $dadosUsuario = $this->objUsuario->get([\"email\" => $email, \"senha\" => $senha]);\n $buscaUsuario = $dadosUsuario->fetch(\\PDO::FETCH_OBJ);\n $qtdeUsuario = $dadosUsuario->rowCount();\n\n if($qtdeUsuario == 1){\n\n $_SESSION['usuario']['nome'] = $buscaUsuario->nome;\n $_SESSION['usuario']['email'] = $buscaUsuario->email;\n $_SESSION['usuario']['senha'] = $buscaUsuario->senha;\n\n $dados = [\n \"tipo\" => true,\n \"mensagem\" => \"Logado com sucesso, aguarde...\"\n ];\n\n }else{\n $dados = [\n \"tipo\" => false,\n \"mensagem\" => \"Usuário não encontrado no sistema\"\n ];\n }\n\n }else{\n $dados = [\n \"tipo\" => false,\n \"mensagem\" => \"Dados não enviado\"\n ];\n }\n\n echo json_encode($dados);\n }", "public function login(){\n\n $this->checkOptionsAndEnableCors();\n\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n $user = $this->repository->findByEmailAndPassword($email, $password);\n\n if($user){\n echo json_encode($user);\n } else {\n http_response_code(401);\n }\n }", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "public function ajaxLoginPost() {\n $errorList = [];\n \n //dump($_POST);exit;\n // Je récupère les données\n $email = isset($_POST['email']) ? $_POST['email'] : '';\n $password = isset($_POST['password']) ? $_POST['password'] : '';\n \n // Je traite les données si besoin\n $email = trim($email);\n $password = trim($password);\n \n // Je valide les données => je cherche les erreurs\n if (empty($email)) {\n $errorList[] = 'Email vide';\n }\n else if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) {\n $errorList[] = 'Email incorrect';\n }\n if (empty($password)) {\n $errorList[] = 'Mot de passe vide';\n }\n if (strlen($password) < 8) {\n $errorList[] = 'Le mot de passe doit faire au moins 8 caractères';\n }\n \n // Si tout est ok (aucune erreur)\n if (empty($errorList)) {\n // On va cherche le user pour l'email fourni\n $userModel = UserModel::findByEmail($email);\n // dump($userModel);exit;\n \n // Si l'email existe\n if ($userModel !== false) {\n // Alors, on va tester le password\n if (password_verify($password, $userModel->getPassword())) {\n // Je connecte l'utilisateur, peut importe comme cela est fait\n User::connect($userModel);\n \n // Affichage d'un JSON \"ok\"\n self::sendJson([\n 'code' => 1,\n 'redirect' => $this->router->generate('main_home'),\n 'errorList' => $errorList\n ]);\n }\n else {\n $errorList[] = 'Identifiants/mot de passe non reconnus';\n }\n }\n // Sinon\n else {\n $errorList[] = 'Email non reconnu';\n }\n }\n \n // Si on arrive ici, c'est que c'est pas \"ok\"\n // Donc, on affiche un JSON avec les erreurs\n // Affichage d'un JSON \"ok\"\n self::sendJson([\n 'code' => 2,\n 'errorList' => $errorList\n ]);\n }", "public function ajaxAction() {\n $result = $this->_auth->authenticate($this->_adapter);\n if ($result->isValid()) {\n $this->_auth->getStorage()->write(array(\"identity\" => $result->getIdentity(), \"user\" => new Josh_Auth_User($this->_type, $result->getMessages())));\n\n $ident = $this->_auth->getIdentity();\n\n $loggedIn = $this->view->partial('partials/userLoggedIn.phtml', array('userObj' => $ident['user']));\n $alert = $this->view->partial('partials/alert.phtml', array('alert' => 'Successful Login', 'alertClass' => 'alert-success'));\n\n $html = array(\"#userButton\" => $loggedIn, \"alert\" => $alert);\n $this->jsonResponse('success', 200, $html);\n } else {\n $errorMessage = $result->getMessages();\n $alert = $this->view->partial('partials/alert.phtml', array('alert' => $errorMessage['error'], 'alertClass' => 'alert-error'));\n\n $html = array(\"alert\" => $alert);\n $this->jsonResponse('error', 401, $html, $errorMessage['error']);\n }\n }", "public function login(){\n if (!isset($_GET['response']) && $_SERVER['REQUEST_METHOD'] === 'POST') {\n $email = $_POST[\"email\"];\n $password = trim($_POST[\"password\"]);\n }\n //if data comes from loginFrom, it is in requests body\n else if (isset($_GET['response'])) {\n $json_str = file_get_contents('php://input');\n $requestBody = json_decode($json_str, true);\n $email = $requestBody[\"email\"];\n $password = trim($requestBody[\"password\"]);\n }\n $msg = \"\";\n if(isset($email)){\n $realPassword = UserDao::getPassByEmail($email);\n if($realPassword == null){\n $msg .= \"Невалиден email\";\n $this->triggerError($msg, 'login.tpl');\n }\n else{\n if(password_verify($password, $realPassword)) {\n $user = UserDao::getByEmail($email);\n $_SESSION[\"user\"]= $user;\n //if request comes from loginForm we must return that login is successful\n if (isset($_GET['response']) && $_GET['response']==\"json\") {\n $response = array();\n $response[\"success\"]= \"true\";\n echo json_encode($response);\n die();\n }\n if($user->getIsAdmin() != null){\n $_SESSION[\"user\"]= $user;\n include_once URI . \"view/adminPanel.php\";\n }\n else {\n header(\"Location: \".BASE_PATH);\n }\n }\n else {\n if (isset($_GET['response']) && $_GET['response']==\"json\") {\n $response = array();\n $response[\"success\"]= \"false\";\n echo json_encode($response);\n die();\n }\n $msg .= \"Грешен email или парола\";\n $this->triggerError($msg, 'login.tpl');\n }\n }\n }\n else {\n $GLOBALS[\"smarty\"]->assign('msg', $msg);\n $GLOBALS[\"smarty\"]->assign('isLoggedIn', isset($_SESSION[\"user\"]));\n $GLOBALS[\"smarty\"]->display('login.tpl');\n }\n }", "public function authLogin() {\n\t\tif($this->input->post()) {\n\t\t\t$user = $this->input->post('username');\n\t\t\t$pass = $this->input->post('upassword');\n\t\t\t$login = $this->m_user->checkLogin($user, $pass);\n\t\t\tif($login) {\n\t\t\t\t$output = array('success' => true, 'login' => $login);\n\t\t\t\t$this->session->set_userdata('u_login', $login);\n\t\t\t\t$this->session->set_userdata('u_name', $login->username);\n\t\t\t\t$this->session->set_userdata('u_level', $login->level);\n\t\t\t\treturn $this->m_user->json($output);\n\t\t\t} else {\n\t\t\t\t$output = array('success' => false, 'login' => null);\n\t\t\t\treturn $this->m_user->json($output);\n\t\t\t}\n\t\t}\n\t}", "function login()\n {\n $data = $this->input->post();\n $username = $data['user'];\n $password = $data['pass'];\n\n $login = $this->dynamicModel->loginUser($username,$password);\n header('Content-Type: application/json');\n echo json_encode($login);\n }", "public function login(){\n\t\t//$this->output->enable_profiler(TRUE);\n\n\t\tif (($emailId = $this->input->get_post('emailId')) && ($password = $this->input->get_post('password'))) {\n \n $data = array(\n 'email' => $emailId,\n 'password' => $password\n );\n \n $ret = $this->Lootel_model->login($data);\n \n if($ret){\n\t\t\t\n\t\t\t\t$response = array(\"status\"=>true,\"message\"=>\"Success\",$ret);\n\t\t\t}else{\n\t\t\t\t$response = array(\"status\"=>false,\"message\"=>\"Record not found\");\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$response = array(\"status\"=>false,\"message\"=>\"Required parameter not found\");\n\t\t}\n\t\techo json_encode($response);\n\t\n }", "function login() {\n /**\n * This array will hold the errors we found\n */\n $errors = [];\n\n /**\n * Check whether a POST request was made\n * If a POST request was made, we can authorize and authenticate the user\n */\n if($_POST) {\n /**\n * Decode the received data to associative array\n */\n $data = json_decode($_POST[\"data\"], true);\n\n /**\n * Check whether user name and password were inputed\n */\n if(!$data[\"userName\"]) {\n $errors[] = \"Моля, въведете потребителско име.\";\n }\n\n if(!$data[\"password\"]) {\n $errors[] = \"Моля, въведете парола.\";\n }\n\n /** \n * If the user name and password were inputed we can validate them\n */\n if($data[\"userName\"] && $data[\"password\"]) {\n $user = new User($data[\"userName\"], $data[\"password\"]);\n $isValid = $user->isValid();\n\n /**\n * If the inputed user name and password were valid, we can store the to the session\n */\n if($isValid[\"success\"]){\n $_SESSION[\"userName\"] = $user->getUsername();\n $_SESSION[\"password\"] = $user->getPassword();\n } else {\n $errors[] = $isValid[\"error\"];\n }\n }\n \n $response;\n\n if($errors) {\n $response = [\"success\" => false, \"data\" => $errors];\n } else {\n $response = [\"success\" => true];\n }\n\n /**\n * Return response to the user\n */\n echo json_encode($response);\n } else {\n echo json_encode(array(\"succes\" => false, \"error\" => \"Не е изпратена правилна заявка\"));\n }\n }", "public function login()\n {\n $p=$this->input->post();\n\n $email=$p['user_email'];\n $password=$p['user_password'];\n\n $rs=$this->um->login($email,$password);\n\n $msg=array();\n\n if($rs!='')\n {\n $id=$rs->user_id;\n\n $msg['alert']='success';\n $msg['link_to']='home-page';\n $msg['user_id']=$id;\n }\n else\n {\n $msg['alert']='';\n $msg['notify']='Incorrect email and password';\n }\n\n echo json_encode($msg);\n }", "public function loginAction()\n {\n Lb_Points_Helper_Data::debug_log(\"Login :\".$_POST['txtCardNumber'], true);\n $txtCardNumber = $_POST['txtCardNumber'];\n $result = Lb_Points_Helper_Data::verifyUser($txtCardNumber);\n echo json_encode($result);\n die;\n //echo \"You have logged in successfully.\";\n }", "public function login();", "public function login();", "function ajax_login(){\r\n check_ajax_referer( 'ajax-login-nonce', 'security' );\r\n // Nonce is checked, get the POST data and sign user on\r\n \t// Call auth_user_login\r\n\tauth_user_login($_POST['email'], $_POST['password'], 'Login'); \r\n\t\r\n die();\r\n}", "function doLogin() {\n\t\t$username = $this->input->post('username');\n\t\t$password = $this->input->post('password');\n\n\t\tif ($this->user->validate($username, $password)) {\n\t\t\t$this->user->startSession();\n\t\t\t$data = array(\n\t\t\t\t'success' => true\n\t\t\t);\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => 'Usuario ou senha incorretos.'\n\t\t\t);\n\t\t}\n\n\t\techo json_encode($data);\n\t}", "public function login(){\n $response = array();\n\n //Recieving post input of email, password from ajax request\n $email = $_POST[\"username\"];\n $password = $_POST[\"password\"];\n $response['submitted_data'] = $_POST;\n\n //Validating login\n $login_status = $this->validate_login($email, $password);\n $response['login_status'] = $login_status;\n if ($login_status == 'success') {\n $this->load->view('admin/admin');\n //Replying ajax request with validation response\n print \"<script type=\\\"text/javascript\\\">alert('Welcome To Dashboard');</script>\";\n }else{\n $this->load->view('admin/sign-in',array('error'=>''));\n $this->load->view('admin/footer-admin');\n print \"<script type=\\\"text/javascript\\\">alert('Incorrect Credentials');</script>\";\n }\n }", "public function api_login_as_guider(){\n \t\n \t$username = $this->input->post('username');\n $password = md5($this->input->post('password'));\n\n $user_id = $this->login_model->api_login_as_guider($username,$password);\n\n if($user_id){\n\t\t $json_data['res'] = $user_id;\n\t\t echo json_encode($json_data);\n\t\t }else{\n\t\t $json_data['res'] = '0';\n\t\t echo json_encode($json_data);\n\t\t }\n\n }", "public function login() {\r\n $email = filter_input(INPUT_POST, \"email\");\r\n $password = filter_input(INPUT_POST, \"p\");\r\n\r\n if (isset($email, $password) && $email !== false && $password !== false) {\r\n\r\n if ($this->auth->login($email, $password)) {\r\n echo json_encode(\"ok\");\r\n return true;\r\n }\r\n }\r\n echo json_encode(\"zle prihlasovacie udaje\");\r\n return false;\r\n }", "public function actionLogin() {\n $this->layout = 'column2';\n\n $user_login = $this->user_login;\n\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'login-form') {\n echo CActiveForm::validate($user_login);\n Yii::app()->end();\n }\n\n\n if (isset($_POST['LoginForm'])) {\n $user_login->attributes = $_POST['LoginForm'];\n\n if ($user_login->validate() && $user_login->login() === \"done\") {\n echo \"done\";\n } else {\n if ($user_login->login() === 3) {\n echo \"Invalid username or password\";\n } else if ($user_login->login() === 7) {\n echo \"Your account has been deactivated.\";\n }\n }\n }\n }", "public function AdminLogin(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $username = $_POST['email'];\n $password = $_POST['password'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($username) && !empty($password)){\n $res->admin_login($username, $password, $conn);\n $this->dbClose();\n }\n else{\t\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Fill Both Fields !!\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "function ajax_login()\n{\n // check_ajax_referer( 'ajax-login-nonce', 'security' );\n\n $nonce = getallheaders()['X-Wp-Nonce'];\n if ( !wp_verify_nonce($nonce, 'wp_json') )\n exit('Sorry!');\n\n // Nonce is checked, get the POST data and sign user on\n $info = [];\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = true;\n $user_signon = wp_signon($info, false);\n\n if ( is_wp_error($user_signon) ) {\n echo json_encode(array(\n 'loggedin' => false,\n 'username' => 'Guest',\n 'message' => __('Wrong username or password.'),\n 'role' => ['title' => 'Guest', 'bitMask' => 7] #TODO: 判断是用户还是管理员\n ));\n } else {\n echo json_encode([\n 'username' => $user_signon->user_nicename,\n 'display_name' => $user_signon->display_name,\n 'loggined' => true,\n 'role' => ['title' => 'user', 'bitMask' => 6], #TODO: 判断是用户还是管理员\n 'nonce' => init_js_object()\n ]);\n// echo json_encode(array('loggedin' => true, 'message' => __('Login successful, redirecting...')));\n }\n\n\n die();\n}", "function do_login() {\r\n $this->form_validation->set_rules('username', 'إسم المستخدم', 'required|trim|xss_clean');\r\n $this->form_validation->set_rules('password', 'كلمة المرور', 'required|trim|xss_clean');\r\n if ($this->form_validation->run() == FALSE) {\r\n $errorMsg = validation_errors();\r\n echo json_encode(array('status' => 'false', 'msg' => $errorMsg));\r\n } else {\r\n $data['username'] = $this->input->post('username');\r\n $data['password'] = $this->auth->addSalt($this->input->post('password'));\r\n $info = $this->user_model->do_login($data);\r\n if ($info) {\r\n $this->auth->fill_session($info);\r\n echo json_encode(array('status' => 'true', 'msg' => 'تم تسجيل الدخول بنجاح'));\r\n } else {\r\n echo json_encode(array('status' => 'false', 'msg' => 'خطأ في إسم المستخدم أو كلمة المرور'));\r\n }\r\n }\r\n }", "function login()\n {\n \t \t$data = file_get_contents('php://input');\n \t\t$this->logservice->log($this->module_name, \"DEBUG\",\"EVENT\",$this->IP,\"$data \");\n\t\t$busData = json_decode($data ,true);\n\t\t//查找该用户名与密码\n\t\t$criteria = array();\n\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"],\"Password\" => $busData[\"password\"]);\n\t\t$userDat = $this->User->read($criteria);\n\t\tif (!empty($userDat)) {\n\t\t\t\t\n\t\t\t//更新用户的状态\n\t\t\t$data_in = array('Status' => 1);\n \t\t$upd_criteria['and'] = array('User_Id' => $userDat[0]['User_Id']);\n \t\t$result = $this->User->update($data_in, $upd_criteria);\n\t \tif($result !== false)\n\t \t{\n\t\t\t\t$rspData[\"userID\"] =$userDat[0][\"User_Id\"];\n\t\t\t\t$rspData[\"state\"] = \"OK\";\n\t\t\t\t$rspData[\"erroInfo\"] = \"登陆成功ID为\".$userDat[0][\"User_Id\"];\n\n\t\t\t\t$rspInfo = json_encode($rspData);\n\t\t\t\techo $rspInfo;\n\t\t }\n\n\t\t}\n }", "public function actionLogin()\n {\n $model = new LoginKeanggotaanForm();\n\n return $this->renderAjax('login', ['model' => $model,]);\n }", "private function login(){\n \n }", "private function user_login() {\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_POST['password']) && !isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email and password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['password'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t\t\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)) {\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$sql = \"SELECT user_name, user_email, user_phone_no, user_pic, user_address, remember_token\n\t\t\t\t\t\t\t\t\tFROM table_user\n\t\t\t\t\t\t\t\t\tWHERE user_email = '$email'\n\t\t\t\t\t\t\t\t\tAND user_password = '\".$hashed_password.\"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($stmt->rowCount()=='0') {\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n $this->response($this->json($error), 200);\n }\n\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Sucessfully Login!\", \"data\" => json_encode($results) );\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Fields are required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n\t\t\t$this->response($this->json($error), 200);\n\t\t}", "public function api_login_as_tourist(){\n\n \t$username = $this->input->post('username');\n $password = md5($this->input->post('password'));\n\n $user_id = $this->login_model->api_login_as_tourist($username,$password);\n\n if($user_id){\n\t\t $json_data['res'] = $user_id;\n\t\t echo json_encode($json_data);\n\t\t }else{\n\t\t $json_data['res'] = '0';\n\t\t echo json_encode($json_data);\n\t\t }\n }", "public function login()\n\t{\n\t\t$input = $this->input->post();\n\n\t\t$username = $this->db->escape_str($input['USR']);\n\t\t$password = $this->db->escape_str($input['PSW']);\n\n\t\t$result = array();\n\n\t\tif(isset($username) && isset($password)){\n\n\t\t\t$this->db->select('id, count(*) as total');\n\t\t\t$query = $this->db->get_where(' tb_user',array('username' => $username,'password' => $password), 1 );\n\n\t\t\t$data = $query->result_array();\n\n\t\t\t$total = $data[0]['total'];\n\t\t\t$user_id = $data[0]['id'];\n\n\t\t\tif( $total > 0 ){\n\n\t\t\t\t$this->session->set_userdata(array('is_login' => true));\n\t\t\t\t$this->session->set_userdata(array('user_id' => $user_id));\n\t\t\t\t$this->session->set_userdata(array('user_name' => $username ));\n\t\t\t\t$result['rs'] = true;//array('rs' => true);\n\n\t\t\t}else{\n\t\t\t\t$result = array('rs' => false, 'msg' => \"Login incorrect !\");\n\t\t\t}\n\n\t\t}else{\n\t\t\t$result = array('rs' => false, 'msg' => \"Wrong Solution Login\");\n\t\t}\n\n\t\techo json_encode($result);\n\t}", "function doLoginAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $user = new User(\n $this->request->getPost('username')\n , $this->request->getPost('password')\n );\n\n if ($user->isRegisted()) {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_200]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_200\n , HttpStatus::SC_DESC[HttpStatus::SC_200]\n , HttpStatus::CT_TEXT_PLAIN\n );\n } else {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_401]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_401\n , HttpStatus::SC_DESC[HttpStatus::SC_401]\n , HttpStatus::CT_TEXT_PLAIN\n );\n }\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "public function getLogin();", "public function getLogin();", "public function getLogin();", "function admin_login(){\n\t$admin_email=$_REQUEST['admin_email'];\n\t$admin_pass=$_REQUEST['admin_pass'];\n\tif(!empty($admin_email) && !empty($admin_pass)){\n\t\t\t$records_user = $this -> conn -> get_table_field_doubles('pg_track_admin', 'admin_email', $admin_email, 'admin_password', md5($admin_pass));\n\t\tif(!empty($records_user)){\n\t\t\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Login Successfully\");\n\t\t}else{\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid login id and password\");\n\t\t}\n\t}else{\n\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\",'admin_email'=>$admin_email,'admin_pass'=>$_REQUEST['admin_pass']);\n\t}\n\techo $this -> json($post);\n}", "function admin_login() {\n\t\t$admin_email = $_REQUEST['admin_email'];\n\t\t$admin_pass = $_REQUEST['admin_pass'];\n\t\tif (!empty($admin_email) && !empty($admin_pass)) {\n\t\t\t$records_user = $this -> conn -> get_table_field_doubles('pg_track_admin', 'admin_email', $admin_email, 'admin_password', md5($admin_pass));\n\t\t\tif (!empty($records_user)) {\n\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Login Successfully\");\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid login id and password\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'admin_email' => $admin_email, 'admin_pass' => $_REQUEST['admin_pass']);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "public function val_teach_login(){\n\t\t$this->form_validation->set_rules('teach_username', 'Usename', 'trim|callback_validate_teach');\n\t\t$this->form_validation->set_rules('teach_password', 'Password', 'trim');\n\n\n\t\t$this->form_validation->set_message('validate_teach', 'Invalid Username or Password');\n\n\n\t\tif ($this->form_validation->run()) {\n\t\t\t\n\t\t\t$id = $this->teach_lgn->get_sess_teach_id();\n\n\t\t\t$this->session->set_userdata('teach_id', $id[0]['teacher_id']);\n\n\t\t\techo json_encode(array('status' => true));\n\n\t\t}\n\t\telse{\n\n\t\t\techo json_encode(array('status' => false));\n\t\t}\n\t}", "function login() { }", "public function login()\n {\n $response = $this->response();\n $config = [\n ['field' => 'username', 'label' => '', 'rules' => 'trim|required|min_length[4]|max_length[100]|valid_email'],\n ['field' => 'password', 'label' => '', 'rules' => 'trim|required|min_length[8]|max_length[50]'],\n ['field' => 'keepmeconnected', 'label' => '', 'rules' => 'trim|integer'],\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 $redirect = false;\n $username = $this->input->post('username');\n $password = $this->input->post('password');\n $keepmeconnected = $this->input->post('keepmeconnected');\n\n $oaut2auth = $this->oauth_server->user_credentials(true);\n if ($oaut2auth->getStatusCode() == 200 && $this->oauth_web->login($username, $password, $oaut2auth->getParameters(), $keepmeconnected == true)) {\n $response = array_merge($response, $oaut2auth->getParameters());\n // if success\n $response[\"msg\"] = \"Successful\";\n $response[\"status\"] = true;\n $response[\"redirect\"] = site_url();\n } else {\n $response[\"errors\"][\"username\"] = $this->lang->line(\"bad_user_pass_combinaison\");\n }\n $this->output->set_output(json_encode($response));\n }", "private function json_login()\n {\n $msg = \"Invalid Request. Email and Password Required\";\n $status = 400;\n $token = null;\n $input = json_decode(file_get_contents(\"php://input\"));\n\n if ($input) {\n\n if (isset($input->email) && isset($input->password)) {\n $query = \"SELECT userID, username, email, password FROM Users WHERE email LIKE :email\";\n $params = [\"email\" => $input->email];\n $res = json_decode($this->recordset->getJSONRecordSet($query, $params), true);\n $password = ($res['count']) ? $res['data'][0]['password'] : null;\n if (password_verify($input->password, $password)) {\n $msg = \"User Authorised. Welcome \" . $res['data'][0]['email'];\n $status = 200;\n\n $token = array();\n $token['email'] = $input->email;\n $token['email'] = $res['data'][0]['email'];\n $token['userID'] = $res['data'][0]['userID'];\n $token['username'] = $res['data'][0]['username'];\n $token['iat'] = time();\n $token['exp'] = time() + (60 + 60);\n\n $jwtkey = JWTKEY;\n $token = \\Firebase\\JWT\\JWT::encode($token, $jwtkey);\n\n } else {\n $msg = \"Email or Password is Invalid\";\n $status = 401;\n }\n }\n }\n\n return json_encode(array(\"status\" => $status, \"message\" => $msg, \"token\" => $token));\n }", "public function singkronisasi_login(){\n $url = env(\"KLOLA_BASE_URL\").\"/api/auth/login\";\n $header = array();\n $param_body = [\n \"email\"=> env(\"KLOLA_LOGIN_USER\"),\n \"password\"=> env(\"KLOLA_LOGIN_PASSWORD\")\n ];\n $result_curl = Utils::curl_post($url, $header, $param_body);\n\n if($result_curl[\"code\"] == 200) {\n $deSerialise = json_decode($result_curl[\"result\"], true);\n if(array_key_exists(\"access_token\", $deSerialise)) {\n Session::set(\"klola_access_token\", $deSerialise[\"access_token\"]);\n }\n\n return [\n \"status\" => true,\n \"result\" => $deSerialise\n ];\n }\n\n return [\n \"status\" => false\n ];\n }", "public function login() {\r\n\r\n $this->load->library('form_validation');\r\n\r\n $this->form_validation->set_rules('password', 'Password', 'required');\r\n $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|callback_get_user['. $this->input->post('password') .']');\r\n\r\n if( $this->form_validation->run() === false ) {\r\n $response = array('status' => 'error', 'message' => 'Email or password incorrect.');\r\n } else {\r\n $response = array('status' => 'success', 'redirect' => '/account/feed');\r\n }\r\n\r\n echo json_encode( $response );\r\n exit;\r\n\r\n }", "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "protected function LoginAuthentification()\n {\n \n $tokenHeader = apache_request_headers();\n\n //isset Determina si una variable esta definida y no es NULL\n\n if(isset($tokenHeader['token']))\n { \n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm); \n //var_dump($datosUsers);\n if(isset($datosUsers->nombre) and isset($datosUsers->password))\n { \n $user = Model_users::find('all', array\n (\n 'where' => array\n (\n array('nombre'=>$datosUsers->nombre),\n array('password'=>$datosUsers->password)\n )\n ));\n if(!empty($user))\n {\n foreach ($user as $key => $value)\n {\n $id = $user[$key]->id;\n $username = $user[$key]->nombre;\n $password = $user[$key]->password;\n }\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n\n if($username == $datosUsers->nombre and $password == $datosUsers->password)\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n } \n \n }", "function ajaxs_login(){\n\tif ( !is_user_logged_in() ) {\n\t\t$creds = array();\n\t\t$creds['user_login'] = $_POST['usr_email'];\n\t\t$creds['user_password'] = $_POST['usr_pass'];\n\t\t$creds['remember'] = true; \n\t\tif (filter_var($creds['user_login'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t$usr = get_user_by( 'email', $creds['user_login'] );\n\t\t\t$creds['user_login'] = $usr->user_login;\t\n\t\t}\t\n\t\t$user = wp_signon( $creds, false );\n\t\t\n\t\tif ( is_wp_error($user) ){\n\t\t\techo 'error';\n\t\t}\n\t\telse{\n\t\t\techo $user->ID;\n\t\t}\n\t}\n\tdie();\n}", "public function validateLoginAction(){\n\t\t \n\t\t $isValid = ! User::loginExists($_GET['login']);\n\t\t \n\t\t header('Content-Type: application/json');\n\t\t echo json_encode($isValid);\n\t }", "public function paml_ajax_login() {\n\t\tglobal $paml_options;\n\t\t// Check our nonce and make sure it's correct.\n if(is_user_logged_in()){\n echo json_encode( array(\n 'loggedin' => false,\n 'message' => __( 'You are already logged in', 'pressapps' ),\n ) );\n die();\n }\n\t\tcheck_ajax_referer( 'ajax-form-nonce', 'security' );\n\n\t\t// Get our form data.\n\t\t$data = array();\n\n\t\t// Check that we are submitting the login form\n\t\tif ( isset( $_REQUEST['login'] ) ) {\n \n\t\t\t$data['user_login'] = sanitize_user( $_REQUEST['username'] );\n\t\t\t$data['user_password'] = sanitize_text_field( $_REQUEST['password'] );\n\t\t\t$data['remember'] = (sanitize_text_field( $_REQUEST['rememberme'] )=='TRUE')?TRUE:FALSE;\n\t\t\t$user_login = wp_signon( $data, false );\n\n\t\t\t// Check the results of our login and provide the needed feedback\n\t\t\tif ( is_wp_error( $user_login ) ) {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'loggedin' => false,\n\t\t\t\t\t'message' => __( 'Wrong Username or Password!', 'pressapps' ),\n\t\t\t\t) );\n\t\t\t} else {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'loggedin' => true,\n\t\t\t\t\t'message' => __( 'Login Successful!', 'pressapps' ),\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\n\t\t// Check if we are submitting the register form\n\t\telseif ( isset( $_REQUEST['register'] ) ) {\n\t\t\t$user_data = array(\n\t\t\t\t'user_login' => sanitize_user( $_REQUEST['username'] ),\n\t\t\t\t'user_email' => sanitize_email( $_REQUEST['email'] ),\n\t\t\t);\n\t\t\t$user_register = $this->paml_register_new_user( $user_data['user_login'], $user_data['user_email'] );\n\n\t\t\t// Check if there were any issues with creating the new user\n\t\t\tif ( is_wp_error( $user_register ) ) {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'registerd' => false,\n\t\t\t\t\t'message' => $user_register->get_error_message(),\n\t\t\t\t) );\n\t\t\t} else {\n if(isset($paml_options['userdefine_password'])){\n $success_message = __( 'Registration complete.', 'pressapps' );\n }else{\n $success_message = __( 'Registration complete. Check your email.', 'pressapps' );\n }\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'registerd' => true,\n\t\t\t\t\t'redirect' => (isset($paml_options['userdefine_password'])?TRUE:FALSE),\n\t\t\t\t\t'message'\t=> $success_message,\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\n\t\t// Check if we are submitting the forgotten pwd form\n\t\telseif ( isset( $_REQUEST['forgotten'] ) ) {\n\n\t\t\t// Check if we are sending an email or username and sanitize it appropriately\n\t\t\tif ( is_email( $_REQUEST['username'] ) ) {\n\t\t\t\t$username = sanitize_email( $_REQUEST['username'] );\n\t\t\t} else {\n\t\t\t\t$username = sanitize_user( $_REQUEST['username'] );\n\t\t\t}\n\n\t\t\t// Send our information\n\t\t\t$user_forgotten = $this->paml_retrieve_password( $username );\n\n\t\t\t// Check if there were any errors when requesting a new password\n\t\t\tif ( is_wp_error( $user_forgotten ) ) {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'reset' \t => false,\n\t\t\t\t\t'message' => $user_forgotten->get_error_message(),\n\t\t\t\t) );\n\t\t\t} else {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'reset' => true,\n\t\t\t\t\t'message' => __( 'Password Reset. Please check your email.', 'pressapps' ),\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\n\t\tdie();\n\t}", "public function Authecticate()\n{\n\t\n\n global $dbObj,$common;\n\t\t\t\n$username = $common->replaceEmpty('username','');\n$userpassword = $common->replaceEmpty('password','');\n\t\t\t\n$result= array();\n \t\t\t \n if($action='login'){\n\t\t\t\t \n $sql_username =\"SELECT * from ras_users where username = '\".$username.\"' and block = '0' \"; \n $rs_username = $dbObj->runQuery($sql_username);\n \n \tif($rows_username = mysql_fetch_assoc($rs_username)){ \n\t\t $dbpassword = $rows_username['password']; \n\t\t\t\t \n\t\tif(JUserHelper::verifyPassword($userpassword, $rows_username['password'], $rows_username['id'])){\n\t\t\t\n\t\t$datelogged = date('Y-m-d H:i:s');\n\t\t$sqlLog = \"INSERT INTO ras_user_visit_log SET userID='\".$rows_username['id'].\"', useFrom = 'Android', dateLogged='\".$datelogged.\"'\";\n\t\t$dbObj->runQuery($sqlLog);\n\t\t\n\t\t $result[]=$rows_username; \n echo json_encode(array('status'=>'1',$result));\n\t\t }\n\t\t \n\t\t else{\n\t\t\t\t$result[] = \"0\";\n\t\t\t\techo json_encode($result); \n\t\t\t\t}\n\t\t\t\t\n}\n else{\n\t\t\t\t$result[] = \"No Record\";\n\t\t\t\techo json_encode($result); \n\t\t\t\t}\n\n} // action close\n\n}", "public function login()\n\t{\n\t\t$account = $_POST['account'];\n\t\t$password = $_POST['password'];\n\t\t$staff = D('Staff');\n\t\t$sql = \"select * from lib_staff where staff_id = '{$account}' and password='{$password}'\";\n\t\t$return = $staff->query($sql);\n\t\tif ($return) {\n\n\t\t\tcookie('staffAccount', $account, 3600 * 24);\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'success',\n\t\t\t\t'msg' => 'Welcome!'\n\t\t\t));\n\t\t\techo $json;\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function login(){\n\n }", "public function login($login) {\n $userName = '';\n $userId=0;\n $password = '';\n $roleId=0;\n\n $stmt = $this->connection -> prepare('SELECT id, name, password FROM users WHERE email = ? AND is_active = 1 LIMIT 1');\n $stmt -> bind_param('s', $login['email']);\n $stmt -> execute();\n $stmt -> store_result();\n $stmt -> bind_result($userId, $userName, $password);\n $stmt -> fetch();\n if($userId > 0){ \n //if(password_verify($login['password'], $password)){\n if(password_verify($login['password'], $password)){\n $this->setSession($userId);\n $this->setSessionDb($userId);\n return json_encode([\"success\" => 1,\n \"user_id\" => $userId,\n \"name\" => $userName,\n \"msg\"=> \"You are now logged in.\"]);\n }\n }\n return json_encode([\"success\"=> 0,\"msg\"=> \"Login failed.\"]);\n }", "public function login() {\n\t\t$this -> load -> model('models_events254/m_clients');\n\t\t$this -> m_clients -> getUser();\n\t\tif ($this -> m_clients -> isUser == 'true') {\n\n\t\t\n\t\t\t/*create session data*/\n\t\t\t$newdata = array('email' => $this -> m_clients -> email, 'logged_in' => TRUE,'id' => $this ->m_clients->id);\n\t\t\t$this -> session -> set_userdata($newdata);\n\n\t\t\tredirect(base_url() . 'C_front/index', 'refresh');\n\t\n\n\t\t} else {\n\t\t\t#use an ajax request and not a whole refresh\n\t\t\t\n\t\t\t$data['message']=\"User Not Found\";\n\t\t\t$data['messageType']=\"error\";\n\t\t\t\n\t\t\t$this->load->view('login',$data);\n\t\t}\n\t}", "function login()\n{\n\n}", "public function actionLogin()\n {\n \\Yii::$app->response->format = Response::FORMAT_JSON;\n\n if(Yii::$app->request->isPost) {\n\n $model = new LoginForm();\n\n\n if ($model->load(Yii::$app->getRequest()->getBodyParams(), '') && $model->login()) {\n\n return ['status'=> 'success', 'access_token' => Yii::$app->user->identity->getAuthKey()];\n } else {\n\n return ['status' => 'error', 'message' => 'Wrong username or password'];;\n }\n\n }\n\n\n return ['status' => 'wrong', 'message' => 'Wrong HTTP method, POST needed'];\n }", "public function action_login() {\n try {\n $i = Input::post();\n $auth = new \\Craftpip\\OAuth\\Auth();\n $auth->logout();\n if (\\Auth::instance()\n ->check()\n ) {\n $response = array(\n 'status' => true,\n 'redirect' => dash_url,\n );\n }\n else {\n $user = $auth->getByUsernameEmail($i['email']);\n if (!$user) {\n throw new \\Craftpip\\Exception('The Email or Username is not registered with us.');\n }\n $auth->setId($user['id']);\n\n $a = $auth->login($i['email'], $i['password']);\n if ($a) {\n $isVerified = $auth->getAttr('verified');\n if (!$isVerified) {\n $auth->logout();\n throw new \\Craftpip\\Exception('Your account is not activated, please head to your Email & activate your Gitftp account.');\n }\n\n $response = array(\n 'status' => true,\n 'redirect' => dash_url,\n );\n }\n else {\n throw new \\Craftpip\\Exception('The username & password did not match.');\n }\n }\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage(),\n );\n }\n\n echo json_encode($response);\n }", "public function UserAuthentication()\n\t{\n\t\t$this->layout = false;\n\n\t\t$username = String::Sanitize(strtolower(Html::Request(\"username\")));\n\t\t$password = String::Sanitize(Html::Request(\"password\"));\n\n\t\tif($username == \"[email protected]\" && $password == \"teste\") {\n\t\t\t$status = \"ok\";\n\t\t}\n\t\telse {\n\t\t\t$status =\"wrong_password\";\n\t\t}\n\n\t\t// Returning array\n\t\t$value = array(\"status\" => $status, \"username_received\" => $username, \"password_received\" => $password);\n\n\t\techo json_encode($value);\n\t}", "public function login(){\n\n }", "function login() {\n $params = $this->objService->get_request_params();\n $isSuccess = $this->objQuery->count('user','email= ? AND password = ?', array($params->email,$params->password));\n echo $isSuccess;\n }", "public function Login(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $username = $_POST['email'];\n $password = $_POST['password'];\n $latitude = $_POST['latitude'];\n $longitude = $_POST['longitude'];\n $source_id = $_POST['source_id'];\n $ip_device = $_POST['ip_device'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($username) && !empty($password)){\n $result_check = $res->check_email_password($username, $password, $conn);\n if($result_check==1){\n $result = $res->check_user($username,$conn);\n if($result>0){\n $res->get_login($username, $password, $latitude, $longitude, $source_id, $ip_device, $conn);\n $this->dbClose();\n }\n else{\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Not Active User !!\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }\n else{\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Either Email or Password is wrong\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n } \n }\n else{\t\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Fill Both Fields !!\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "function userLogin()\n\t{\n\t\t$userName = $_POST['userName'];\n\t\t$password = $_POST['userPassword'];\n\t\t$rememberData = $_POST['rememberData'];\n\n\t\t# Verify if the user currently exists in the Database\n\t\t$result = validateUserCredentials($userName);\n\n\t\tif ($result['status'] == 'COMPLETE')\n\t\t{\n\t\t\t$decryptedPassword = decryptPassword($result['password']);\n\n\t\t\t# Compare the decrypted password with the one provided by the user\n\t\t \tif ($decryptedPassword === $password)\n\t\t \t{\n\t\t \t$response = array(\"status\" => \"COMPLETE\");\n\n\t\t\t # Starting the sesion\n\t\t \tstartSession($result['fName'], $result['lName'], $userName);\n\n\t\t\t # Setting the cookies\n\t\t\t if ($rememberData)\n\t\t\t\t{\n\t\t\t\t\tsetcookie(\"cookieUserName\", $userName);\n\t\t\t \t}\n\t\t\t echo json_encode($response);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie(json_encode(errors(306)));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdie(json_encode($result));\n\t\t}\n\t}", "public function login()\n {\n $credentials = request(['email', 'password']);\n if (!$token = auth()->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n /*echo json_encode(auth()->user());\n echo json_encode($this->respondWithToken($token));*/\n\t $response = array();\n\t if(auth()->user()->privilegios == '1'){\n\t\t \n\t\t\t$response = $this->allAccess($token);\t\t\n\t\t\n\t }else{\n\t\t \n\t\t $response = $this->ConfigurableAccess($token);\n\t\t \n\t }\t \n //return $this->respondWithToken($token);\n return response()->json($response);\n }", "public function doLogin()\n {\n\n //check if all the fields were filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity with the spcific login data\n $userEntity = new User(array('username' => Request::post('username'), 'password' => Request::post('password'), 'email' => null, 'name' => null));\n\n //check if the user exists and get it as entity if exists\n if (!$userEntity = $this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username does not exist!\", \"type\" => \"error\")));\n exit;\n }\n\n //get the user ID from database\n $userEntity->setAttr('access', $this->repository->getAccessByUsername(Request::post('username')));\n\n //check if the login credentials are correct for login\n if (!$this->repository->checkLogin($userEntity, Request::post('password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The user/email is incorrect!\", \"type\" => \"error\")));\n exit;\n }\n\n $userEntity->setAttr('access', $this->repository->getAccessByUsername(Request::post('username')));\n\n //set the session using the user data\n $this->session->setSession($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"You successfully logged in!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function logins_check_user_login()\n\t{\n\t\t$login = array();\n\t\t$result = array();\n\t\t$data = array();\n \n\t\t$login[\"username\"] = clean($this->input->post(\"username\"));\t\n\t\t$login[\"password\"] = clean($this->input->post(\"password\"));\n\t\t$data[\"userdata\"] = $this->session->set_userdata(\"tempdata\", strip_slashes($login));\n\t\t\n\t $data = $this->common->authenticateUserLogin($login);\n\t\tif($data)\n\t\t{\n\t\t\t$result = 'success';\n\t\t\t//$result[\"response\"] = '';\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\t$result = 'error';\n\t\t\t//$result[\"response\"] = 'Authentication failed. No username exists';\n\t\t}\n\t\t\n\t\t//$msg_arr = implode(\"|::|\",$result);\n\t\techo json_encode($result);\n\t\tdie;\n\t}", "public function loginUserAction() {\n\t\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\t\tif ($request->isPost()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// get the json raw data\n\t\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t\t$http_raw_post_data = '';\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t\t}\n\t\t\t\tfclose($handle); \n\t\t\t\t\n\t\t\t\t// convert it to a php array\n\t\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\n\t\t\t\t//echo json_encode($json_data);\n\t\t\t\t\n\t\t\t\tif (is_array($json_data)) {\n\t\t\t\t\t// convert it back to json\n\t\t\t\t\t\n\t\t\t\t\t// write the user back to database\n\t\t\t\t\t$login = Application_Model_User::loginUser($json_data);\n\t\t\t\t\t\n\t\t\t\t\tif($login) {\n\t\t\t\t\t\techo json_encode($login);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\techo 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}", "function login();", "public function actionLogin() {\n $this->assignLangue();\n if (isset($_GET['expiration'])) {\n if ($_GET['expiration'] === Constantes::ISAJAX_TRUE) {\n echo Yii::app()->user->setFlash('info', '<strong>Session expirée: Vous avez été déconnecté </strong>');\n unset($_GET['expiration']);\n }\n }\n $model = new LoginForm;\n\n // if it is ajax validation request\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'login-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n\n // collect user input data\n if (isset($_POST['LoginForm'])) {\n $model->attributes = $_POST['LoginForm'];\n // validate user input and redirect to the previous page if valid\n if ($model->validate() && $model->login()) {\n if (Yii::app()->session['Logged']->fk_fonction == Constantes::FONCTION_LOCATAIRE)\n $this->redirect(array('./ticket/create','id'=> Yii::app()->session['Logged']->id_user));\n else {\n $this->redirect(array('./ticket/admin?var=admin'));\n }\n }\n }\n // display the login form\n $this->render('login', array('model' => $model));\n }", "public function voxy_login_by_user()\n {\n $data = $this->input->post();\n if(!(isset($data['external_user_id']) && $data['external_user_id'])){\n $this->ajax_data_return['msg'] = 'ID người dùng không hợp lệ !';\n return $this->ajax_response();\n }\n\n $api_data = $this->m_voxy_connect->get_a_user_auth_token($data['external_user_id']);\n if($api_data && isset($api_data['error_message'])) {\n $this->ajax_data_return['msg'] = $api_data['error_message'];\n } else {\n $this->ajax_data_return['status'] = TRUE;\n $this->ajax_data_return['msg'] = 'Lấy link vào học Voxy thành công !';\n $this->ajax_data_return['data'] = $api_data;\n }\n\n return $this->ajax_response();\n }", "public function login(){\r\n\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required');\r\n\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|callback_check_database');\r\n\t\tif($this->form_validation->run() == FALSE)\r\n\t\t{\r\n\t\t\t//Field validation failed. User redirected to login page\r\n\t\t\t#$this->load->view('welcome_message');\t\r\n\t\t\t#return false;\r\n\t\t\t$data ['state'] = false;\r\n\t\t\tprint json_encode($data);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//Go to private area\r\n\t\t\t//redirect('users/user_profile', 'refresh');\r\n\t\r\n\t\t\t/* USE CASE FOR ACL SYSTEM*/\r\n// \t\t\t$data = array('data' => array(\r\n// \t\t\t\t\t'acl_view' => $this->users_model->can_do_it('acl_view'),\r\n// \t\t\t\t\t'acl_update_profile' => $this->users_model->can_do_it('acl_update_user'),\r\n// \t\t\t\t\t'acl_view_profile' => $this->users_model->can_do_it('acl_view_user'),\r\n// \t\t\t\t\t'acl_create_project' => $this->users_model->can_do_it('acl_update_designer'),\r\n// \t\t\t\t\t'acl_update_project' => $this->users_model->can_do_it('acl_update_designer'),\r\n// \t\t\t\t\t'acl_update_check' => $this->users_model->can_do_it('acl_update_checker'),\r\n// \t\t\t\t\t'acl_update_acl' => $this->users_model->can_do_it('acl_update_acl')\r\n// \t\t\t));\r\n\r\n\t\t\t$session_data = $this->session->userdata ( 'logged_in' );\r\n\t\t\t$data ['rows'] = $this->users_model->get_by_id($session_data ['users_id']);\r\n\t\t\t$data ['state'] = true;\r\n\t\t\tprint json_encode($data);\r\n\t\t}\r\n\t\t\r\n// \t\tprint_r($_POST[\"email\"]);\r\n\t}", "function ajax_login(){\n check_ajax_referer( 'ajax-login-nonce', 'security' );\n\n // Nonce is checked, get the POST data and sign user on\n $info = array();\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = true;\n\n $user_signon = wp_signon( $info, false );\n if ( is_wp_error($user_signon) ){\n echo json_encode(array('loggedin'=>false, 'message'=>__('nome de usuário ou senha errada.')));\n } else {\n echo json_encode(array('loggedin'=>true, 'message'=>__('OK...')));\n }\n\n die();\n}", "public function login()\n {\n $strUsername = !empty($_POST['username']) ? $_POST['username'] : null;\n $strPassword = !empty($_POST['password']) ? $_POST['password'] : null;\n if( is_null($strUsername) || is_null($strPassword) )\n {\n header('HTTP/1.1 422 Unprocessable Entity');\n return ['error' => \"Both a username and a password are required.\"];\n }\n $oRet = $this->oUserModel->checkLogin($strUsername, $strPassword);\n if( $oRet->HasFailure() )\n {\n header('HTTP/1.1 403 Forbidden');\n $aRet = ['error' => $oRet->GetError()];\n }\n else\n {\n $_SESSION['user_id'] = $oRet->Get();\n $oRet = $this->oUserModel\n ->getUser(['user_id' => $oRet->Get()]);\n if( $oRet->HasFailure() )\n {\n unset($_SESSION['user_id']);\n header('HTTP/1.1 500 Internal Server Error');\n $aRet = ['error' => $oRet->GetError()];\n }\n else\n {\n $aRet = ['success' => true, 'user' => $oRet->Get()[0]];\n }\n }\n return $aRet;\n }", "function action_login(){\n \n if($this->request->method()==='POST'){\n \n $login = arr::get($_POST,'username');\n $password = arr::get($_POST,'password');\n if (Auth::instance()->login($login, $password )){\n $user = Auth::instance()->get_user();\n $this->redirect(Route::get('admin')->uri());\n }else{\n echo 'не залогинен';\n \n \n }\n \n \n \n }\n \n }", "function ajax_login(){\n check_ajax_referer( 'ajax-login-nonce', 'security' );\n\n // Nonce is checked, get the POST data and sign user on\n $info = array();\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = true;\n\n $user_signon = wp_signon( $info, false );\n if ( is_wp_error($user_signon) ){\n echo json_encode(array('loggedin'=>false, 'message'=>__('<p class=\"error\">Wrong username or password.</p>')));\n } else {\n echo json_encode(array('loggedin'=>true, 'message'=>__('Login successful, redirecting...')));\n }\n\n die();\n\t}", "function login_pj(){\n $as=\"pkl_pj_jurusan\";\n $user=$this->input->post('user');\n $pass=$this->input->post('pass');\n if($data=$this->Models->login($as,$user,$pass)){\n $passwd='';\n foreach($data as $key){\n $passwd=$key->password;\n }\n if($passwd!=md5($pass)){\n echo\"false\";\n }else{\n echo json_encode($data);\n }\n }else{echo 'user not found';}\n \n }", "public function login()\n {\n $result = $this->mylib->restlogin($this->input->post('username'), $this->input->post('password'));\n $result['isLogin'] = true;\n $this->session->set_userdata($result);\n redirect('dashboard/index');\n }", "public function loginON($request,$response){\n\n\n /*=================={Fetch data from the link}================*/\n\n\n $user_name0 = $request->getParam('user_name');\n $user_password = $request->getParam('user_password');\n\n\n\n if( !$this->isemty( $user_name0,$user_password )){\n $result = array(\n 'messageEN'=> 'Error!! No text to process',\n 'messageAR'=> 'خطأ!! لايوجد نص لمعالجته ',\n 'Properties'=> 'user_name,user_password',\n 'code'=> 400,\n\n );\n\nreturn $response->withJson( $result,$result['code']);\n }else\n\n $user = $this->getuserdata($user_name0);\n\nif($user === false){\n\n $result = array(\n 'messageEN'=> 'Error!! This user is not found! ',\n 'messageAR'=> 'خطأ!! هذا المستخدم غير موجد ',\n 'Properties'=> 'user_name',\n 'code'=> 404\n\n );\n\nreturn $response->withJson( $result,$result['code']);\n\n\n}else if($this->passwordverify($user_password ,$user) === false){\n\n\n $result = array(\n 'messageEN'=> 'Error !! Password not valid ',\n 'messageAR'=> 'خطأ !! كلمة المرور ليست صالحة ',\n 'Properties'=> 'user_password',\n\n 'code'=> 406,\n\n );\n\nreturn $response->withJson( $result,$result['code']);\n\n\n}else{\n\n\n $result = array(\n 'messageEN'=> 'Operation Success: Access Allowed',\n 'messageAR'=> 'العملية نجاحة :الوصول مسموح',\n 'token'=> $this->getnewToken($user),\n 'code'=> 200,\n\n\n\n );\n\n\n\nreturn $response->withJson( $result,$result['code']);\n\n\n\n}\n\n\n\n\n\n}", "public function login_post()\n {\n if( isset( $_SERVER['CONTENT_TYPE'] ) && strpos( $_SERVER['CONTENT_TYPE'], \"application/json\" ) !== false ){ \n $i = json_decode( trim( file_get_contents( 'php://input' ) ), true );\n }else{\n $i = $this->input->post();\n }\n // print_r($i);\n $u = $i['username']; //Username Posted\n $p = md5($i['password']); //Pasword Posted\n $q = array('usr_loginname' => $u); //For where query condition\n $kunci = $this->config->item('thekey');\n // print_r($this->config->item('thekey')); die();\n $invalidLogin = ['status' => 'Invalid Login']; //Respon if login invalid\n $val = $this->M_user->get_user_full($q); \n if($this->M_user->get_user($q)->num_rows() == 0){\n $this->response($invalidLogin, REST_Controller::HTTP_NOT_FOUND);}\n\t \t$match = $val->usr_password; //Get password for user from database\n if($p == $match){ //Condition if password matched\n \t $token['id'] = $val->usr_id; //From here\n $token['username'] = $u;\n $date = new DateTime();\n $token['iat'] = $date->getTimestamp();\n $token['exp'] = $date->getTimestamp() + 60*60*5; //To here is to generate token\n $output['token'] = JWT::encode($token,$kunci); //This is the output token\n $output['username'] = $val->usr_name;\n $output['id'] = $val->usr_id;\n $output['role'] = $val->rol_name;\n $output['id_dep'] = $val->id_dep;\n $this->set_response($output, REST_Controller::HTTP_OK); //This is the respon if success\n }else{\n $this->set_response($invalidLogin, REST_Controller::HTTP_NOT_FOUND); //This is the respon if failed\n }\n }", "public function loginprofesor_post() //INICIAR SESION = http://localhost/foxweb/Api/login\n {\n $matricula = $this->post('matricula');\n $password = $this->post('password');\n $type = $this->post('type');\n\n $datauser = $this->ApiModel->flogin($matricula, $password, $type);\n\n if ($datauser != false) {\n foreach ($datauser as $data) {\n $matricula = $data['matricula'];\n $nombre = $data['nombre'];\n $apellidos = $data['apellidos'];\n }\n\n $response = ['error' => false, 'status' => parent::HTTP_OK, \"matricula\" => $matricula, \"nombre\" => $nombre, \"apellidos\" => $apellidos];\n\n $this->response($response, parent::HTTP_OK);\n\n } else {\n\n $response = ['error' => true,'status' => parent::HTTP_NOT_FOUND, 'msg' => 'Usuario o Contraseña Invalidos!'];\n\n $this->response($response, parent::HTTP_NOT_FOUND);\n\n }\n }", "function login($usuario, $password) {\r\n$integrator = ZendExt_IoC::getInstance();\r\nreturn $integrator->getInstance()->seguridad->AutenticarUsuarioApi($usuario,$password);\r\n}", "public function userLogin(){\n\t\t\tif (isset($_POST['user_name']) && isset($_POST['password'])){\n\t\t\t\t$response = $this->model->getUser(\"*\", \"user_name = \".\"'\".$_POST['user_name'].\"'\");\n\t\t\t\t$response = $response[0];\n\t\t\t\t$user_rol = null;\n\t\t\t\t//The user is valid\n\t\t\t\tif ($response['password']==$_POST['password']) {\n\t\t\t\t\t//Verify the roles\n\t\t\t\t\t$response_role = $this->model->getRoles(\"user_id = '\".$response['_id'].\"'\");\n\t\t\t\t\tif (count($response_role)>1) {\n\t\t\t\t\t\t//Multipage user\n\t\t\t\t\t\t$user_rol = array();\n\t\t\t\t\t\tforeach ($response_role as $value) {\n\t\t\t\t\t\t\tarray_push($user_rol, $value['role']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (in_array('ADMIN', $user_rol)) { \n\t\t\t\t\t\t\t$_SERVER['PHP_AUTH_USER'] = $_POST['user_name'];\n \t\t\t\t\t$_SERVER['PHP_AUTH_PW'] = $_POST['password'];\n \t\t\t\t\t$_SERVER['AUTH_TYPE'] = \"Basic Auth\"; \n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$user_rol = $response_role[0]['role'];\n\t\t\t\t\t\tif ($user_rol == 'ADMIN') {\n\t\t\t\t\t\t\t$_SERVER['PHP_AUTH_USER'] = $_POST['user_name'];\n \t\t\t\t\t$_SERVER['PHP_AUTH_PW'] = $_POST['password'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->createSession($response['user_name'], $user_rol);\n\t\t\t\t\techo 1;\n\t\t\t\t}\n\t\t\t \n\t\t\t}\n\t\t}", "public function login(){ \n\t$nip=$this->input->post('nip');\n\t$password=$this->input->post('password');\n\t$this->db->select('*');\n\t\t\t$this->db->where('nip', $nip); \n\t\t\t$query = $this->db->get('tbl_user', 1);\n\t\t\t$data=$query->row();\n\t\t\tif($query->num_rows()==1&&$password=$data->password){\n\t\t\t$pesan=\"success\";\n\t\t\t$kode=200;\n\t\t\t$x['message']=$pesan;\n\t\t\t$x['kode']=$kode;\n\t\t\t$x['data']= $query ; \n\t\t\t$x['id_user']= $data->id_user ; \n\t\t\t$x['username']= $data->username ; \n\t\t\t}else{ \n\t\t\t\t$pesan=\"fail\";\n\t\t\t\t$kode=404;\n\t\t\t$x['message']=$pesan;\n\t\t\t$x['kode']=$kode;\n\t\t\t$x['data']= 'null' ; \n\t\t\t}\n\t\techo json_encode($x);\n\t}", "function login() {\n if (isset($_POST[\"email\"]) && isset($_POST[\"password\"])) {\n\n // Put parameters into local variables\n $email = $_POST[\"email\"];\n $password = $_POST[\"password\"];\n\n if ($_POST[\"user\"] == 'landlord') {\n $stmt = $this->db->prepare('SELECT id FROM user_landlord WHERE email=? AND password=?');\n } \n else if ($_POST[\"user\"] == 'tenant') {\n $stmt = $this->db->prepare('SELECT id FROM user_tenant WHERE email=? AND password=?');\n }\n \n $stmt->bind_param(\"ss\", $email, $password);\n $stmt->execute();\n\t $stmt->bind_result($id);\n\t \t \n\t $i = 0;\n\t $id_array = array();\n\t while ($stmt->fetch()) {\n\t array_push($id_array, $id);\n \t}\n \t $stmt->close();\n \t \n \t if (count($id_array) == 1) {\n \t echo '{\"success\":1}';\n \t } else {\n \t echo '{\"success\":0, error_message\":\"Email and/or password is invalid.\"}';\n \t }\n }\n }", "function normalLogin($POSTdata) {\n \n //Init variables\n $uname = null;\n $upass = null;\n $umail = null;\n $uid = null;\n $error = array();\n $data = array();\n $output = array();\n \n /*\n ==========================\n 1° step : get/validate data\n ===========================\n */\n //Get usermail\n if(isset($POSTdata['usermail']))\n $umail = $POSTdata['usermail'];\n else $error[] = 'No usermail';\n\n if($umail)\n if(!Validate::isEmail($umail))\n $error[] = 'Invalid usermail';\n \n //Get password\n if(isset($POSTdata['userpassword']))\n $upass = $POSTdata['userpassword'];\n else $error[] = 'No userpassword';\n \n if($upass)\n if(!Validate::isPasswd($upass))\n $error[] = 'Invalid password';\n \n if(sizeof($error)) {\n $output['success'] = 'invalid fields';\n print json_encode($output);\n exit();\n }\n \n \n /*\n ======================\n 2° step : handle data\n ======================\n */\n $data = Db::q('SELECT * FROM '._DB_PREFIX_.'users WHERE playermail = \"'.mysql_escape_string($umail).'\" AND playerpassword = \"'.md5($upass).'\" LIMIT 1');\n if(!sizeof($data)) {\n $output['success'] = 'invalid user 1';\n print json_encode($output);\n die();\n }\n \n if($data[0]['playernick']) \n $output['success'] = 'success';\n else\n {\n $output['success'] = 'invalid user 2';\n print json_encode($output);\n die();\n }\n \n //Start session\n $_SESSION['playernick'] = $data[0]['playernick'];\n $_SESSION['playerid'] = $data[0]['id'];\n $_SESSION['playermail'] = $umail;\n $_SESSION['ltype'] = 'normal';\n \n //Return data\n print json_encode($output);\n die();\n}", "public function authAction() {\n global $config;\n header('Content-Type: application/json');\n if (isset($_POST[\"username\"])&&$_POST[\"username\"]!=\"\"&&isset($_POST[\"password\"])&&$_POST[\"password\"]!=\"\") {\n $username=preg_replace(\"/[^a-zA-Z0-9_\\-]+/\",\"\",$_POST[\"username\"]);\n foreach ($this->users as $user) {\n if ($username==$user[\"username\"]) {\n if (generatePasswordHash($_POST[\"password\"])==$user[\"password\"]) {\n //Valid Password\n $key = get_jwt_key();\n $now=time();\n $token = array(\n \"iss\" => $config[\"serverName\"],\n \"iat\" => $now,\n \"exp\" => $now+intval($config[\"jwtTokenExpire\"]),\n \"user\"=>$user[\"username\"]\n );\n $jwt = JWT::encode($token, $key);\n echo json_encode(array(\"success\"=>true,\"jwt\"=>$jwt));\n return;\n } else {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"invalid password\"));\n return;\n }\n }\n }\n echo json_encode(array(\"success\"=>false,\"message\"=>\"user not found\"));\n return;\n } else {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"missing username/password fields\"));\n return;\n }\n }", "public function loginAction(){\n// $data = [];\n// if(isset($_POST['login']))\n// {\n// $post = deActiveXss(deActiveSqlEnjection($_POST));\n// if(validStringAndNumber($post['username']))\n// {\n// $data['username'] = $post['username'];\n// }\n// else\n// {\n// $data['username_error'] = 'نام کاربری حاوی حروف و اعداد میباشد ';\n// }\n// if(isset($post['password']) and !empty($post['password']))\n// {\n// if($post['password']<8)\n// {\n// $data['password_error'] = 'رمز عبور باید بیش از 8 کرکتر باشد';\n// }\n// else\n// {\n// $data['password'] = $post['password'];\n// }\n// }\n// else\n// {\n// $data['password_error'] = 'رمز عبور نمیتواند خالی باشد';\n// }\n// //check username and password is currect ---\n// if(empty($data['password_error']) and empty($data['username']))\n// {\n// $exists_user = $user->findby($data['username'],'username');\n// if(!empty($exists_user))\n// {\n// if($exists_user['password'] === md5($data['password'])) // if true user loged in ------\n// {\n// $_SESSION['user'] = $exists_user;\n// header('location'.URL_SITE.'dashboard');\n// exit;\n// }\n// else\n// {\n// $data['password_error'] = 'رمز عبور با نام کاربری مطابقت ندارد';\n// }\n// }\n// else\n// {\n// $data['username_error'] = 'نام کاربری در سیستم ثبت نشده است';\n// }\n// }\n// }\n// $this->render('user.register',$data);\n var_dump($_POST);\n }", "abstract protected function doLogin();", "function requestLogin() {\n $username = $_GET['username'];\n $password = $_GET['password'];\n\n $response = attemptLogin($username, $password);\n \n if ($response['status'] == 'SUCCESS') {\n session_start();\n $_SESSION['firstName'] = $response['response']['firstName'];\n $_SESSION['lastName'] = $response['response']['lastName'];\n $_SESSION['username'] = $username;\n $_SESSION['profilePicture'] = $response['response']['profilePicture'];\n\n if ($_GET['rememberMe'] == 'true') {\n setcookie('username', $username, time() + 3600 * 24 * 30, '/', '', 0);\n }\n\n echo json_encode($response['response']['message']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "public function hacerLogin() {\n $user = json_decode(file_get_contents(\"php://input\"));\n\n if(!isset($user->email) || !isset($user->password)) {\n http_response_code(400);\n exit(json_encode([\"error\" => \"No se han enviado todos los parametros\"]));\n }\n \n //Primero busca si existe el usuario, si existe que obtener el id y la password.\n $peticion = $this->db->prepare(\"SELECT id,idRol,password FROM users WHERE email = ?\");\n $peticion->execute([$user->email]);\n $resultado = $peticion->fetchObject();\n \n if($resultado) {\n \n //Si existe un usuario con ese email comprobamos que la contraseña sea correcta.\n if(password_verify($user->password, $resultado->password)) {\n \n //Preparamos el token.\n $iat = time();\n $exp = $iat + 3600*24*2;\n $token = array(\n \"id\" => $resultado->id,\n \"iat\" => $iat,\n \"exp\" => $exp\n );\n \n //Calculamos el token JWT y lo devolvemos.\n $jwt = JWT::encode($token, CJWT);\n http_response_code(200);\n exit(json_encode($jwt . \"?\" . $resultado->idRol));\n \n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Password incorrecta\"]));\n }\n \n } else {\n http_response_code(404);\n exit(json_encode([\"error\" => \"No existe el usuario\"])); \n }\n }", "function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}", "function auth($username, $password) {\n\n // curl function to backend\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"http://afsaccess2.njit.edu/~es66/login.php\");\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, 'user='.$username.'&password='.$password);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch);\n $decoded_json = json_decode($output);\n if ($decoded_json->{\"login\"} == \"success\") {\n $json[\"login\"] = \"ok\";\n if ($decoded_json->{\"Type\"} == \"1\") {\n $json[\"type\"] = \"instructor\";\n } else {\n $json[\"type\"] = \"student\";\n }\n //$json[\"type\"]=$decoded_json->{\"type\"};\n $json[\"username\"] = $decoded_json->{\"username\"};\n $json[\"firstname\"] = $decoded_json->{\"firstname\"};\n $json[\"lastname\"] = $decoded_json->{\"lastname\"};\n } else {\n $json[\"login\"] = \"bad\";\n }\n curl_close($ch);\n echo json_encode($json);\n}", "function process_login()\n\t{\n\t\t// Get data (POST method)\n\t\t$parameter = file_get_contents(\"php://input\");\n\t\t\n\t\t// Decode data\n\t\t$decode_param = json_decode($parameter);\n\t\t\n\t\t// Validation format parameter\n\t\tif(! isset($decode_param->Username) ||\n\t\t\t! isset($decode_param->Password)\n\t\t){\n\t\t\techo json_encode(array('Status' => 500, 'Message' => 'Your format parameter is wrong')); // 500 = Internal Server Error\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Validation of null value\n\t\tif($decode_param->Username == '' ||\n\t\t\t$decode_param->Password == ''\n\t\t){\n\t\t\techo json_encode(array('Status' => 500, 'Message' => 'Your format parameter must be filled')); // 500 = Internal Server Error\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Set variable\n\t\t$username = $decode_param->Username;\n\t\t$password = $decode_param->Password;\n\t\t\n\t\t// Check to database\n\t\t$result = $this->db->get_where('tbl_user', array('username'=>$username, 'password'=>md5($password)));\n\t\tif($result->num_rows() > 0){\n\t\t\t// Set last login\n\t\t\t// In order to create same value between last login at database and session\n\t\t\t$last_login_time = date('Y-m-d H:i:s', strtotime(\"now\"));\n\t\t\t\n\t\t\t// Insert data last login\n\t\t\t$this->db->where('id', $result->row()->id);\n\t\t\t$this->db->update('tbl_user', array('last_login_time'=>$last_login_time));\n\t\t\t\n\t\t\t// Save session\n\t\t\t$data = array(\n\t\t\t\t'username' => $username,\n\t\t\t\t'name' => $result->row()->name,\n\t\t\t\t'last_login' => $last_login_time\n\t\t\t);\n\t\t\t$this->session->set_userdata($data);\n\t\t\t\n\t\t\t// Return login success\n\t\t\t// 200 = OK\n\t\t\techo json_encode(array('Status' => 200, 'Message' => 'Login Success'));\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\t// Return login failed\n\t\t\t// 500 = Internal Server Error\n\t\t\techo json_encode(array('Status' => 500, 'Message' => 'Login Failed'));\n\t\t}\n\t\t\n\t\t\n\t}", "public function login_post()\n\t{\n\t\t$name = $this->post('username',true);\n $pass = $this->post('password',true);\n\n $user = $this->db->get_where('user',['username' =>$name])->row_array();\n\n if ($user) \n {\n if (password_verify($pass,$user['password'])) \n {\n $this->response([\n 'error' => false,\n 'message' => 'Login successfull',\n 'user' => $user\n ],200);\n }\n else\n {\n $this->response([\n 'error' => true,\n 'message' => 'Password salah'\n ],200);\n }\n }\n else\n {\n $this->response([\n\n 'error'=>true,\n 'message'=>\"Username dan Password salah\"\n ],200);\n }\n\t}", "public function please_login()\n {\n echo json_encode(array(\"status\"=>\"success\", \"msg\"=>\"Naaaa\"));\n die();\n }", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "public function getLogin($data){\n\t\n\t\t$passArray = array();\n\t\t$mod = new userModel();\n\t\t\n\t\t$email = $data['email'];\n\t\t$password = md5($data['password']);\n\t\t\n\t\t$res = $mod->loginCheck($email,$password);\n\t\t\n\t\tif(mysql_num_rows($res) > 0){\n\t\t\twhile($row = mysql_fetch_array($res)){\n\t\t\t\t$passArray['userDetails'] = array(\"id\"=>$row[\"id\"],\"UserName\"=>$row[\"username\"],\"Email\"=>$row[\"email\"]);\n\t\t\t}\n\t\t\t$status = SUCCESS;\n\t\t\t$message = MESSAGE;\n\t\t\t/* Set session and send session token */\n\t\t\t//$_SESSION['token'] =$this->rand_str();\n\t\t\t$_SESSION['id'] = $passArray['userDetails']['id'];\n\t\t\t$_SESSION['username'] = $passArray['userDetails']['UserName'];\n\t\t\t$_SESSION['email'] = $passArray['userDetails']['Email'];\n\t\t\n\t\t\t$passArray['token']=$this->newTokenEncode($passArray['userDetails']['UserName'],$passArray['userDetails']['id']);\n\t\t\t$_SESSION['token'] =$passArray['token'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$status =FAIL;\n\t\t\t$message = ERRORMESSAGE;\n\t\t}\n\t\t\n\t\t$response = array(\n\t\t\t\t\t\t\t\"Status\" => $status,\n\t\t\t\t\t\t\t\"Message\"=> $message,\n\t\t\t\t\t\t\t\"Result\"=>$passArray\n\t\t\t\t\t\t);\n\t\t\n\t\treturn $response;\n\t}", "public function login() {\n $email = $this->input->post('email');\n $pass = $this->input->post('password');\n if (!empty($email) && !empty($pass)) {\n $user = $this->users_model->login($email, $pass);\n if (!$user) {\n return $this->send_error('ERROR');\n }\n $this->event_log();\n return $this->send_response(array(\n 'privatekey' => $user->privatekey,\n 'user_id' => $user->id,\n 'is_coach' => (bool) $this->ion_auth->in_group('coach', $user->id)\n ));\n }\n return $this->send_error('LOGIN_FAIL');\n }", "public function check()\n {\n if ($this->input->is_ajax_request() && $this->input->post()) {\n $this->load->model(\"m_admin_accounts\", \"account\");\n\n $dataReturn = Array(\n 'state' => 0,\n 'msg' => 'Tên đăng nhập hoặc mật khẩu không chính xác !'\n );\n\n $email = $this->input->post(\"admin_email\");\n $pass = $this->gen_string_password($this->input->post(\"admin_password\"));\n $admin_login_info = $this->account->check_login($email, $pass);\n if ($admin_login_info && is_object($admin_login_info)) {\n $admin_login_info->permission_data = $this->get_user_permission_data($admin_login_info->id);\n $admin_login_info->menus_data = $this->get_user_menus_data($admin_login_info->permission_data);\n $this->session->set_userdata(\"USER\", $admin_login_info);\n\n $dataReturn[\"state\"] = 1;\n $dataReturn[\"msg\"] = \"Đăng nhập thành công !\";\n $dataReturn[\"redirect\"] = site_url();\n }\n echo json_encode($dataReturn);\n } else {\n redirect();\n }\n }" ]
[ "0.8169088", "0.8138944", "0.7928753", "0.7886426", "0.78243357", "0.7722704", "0.75982356", "0.7514943", "0.7444538", "0.7437372", "0.74061906", "0.7404757", "0.73881435", "0.73699766", "0.7363178", "0.73576236", "0.7342497", "0.7307969", "0.7307969", "0.7289075", "0.7283128", "0.72659445", "0.72624755", "0.72158605", "0.7206195", "0.71984416", "0.7187228", "0.7165045", "0.71595937", "0.71449554", "0.7131973", "0.7129727", "0.71255076", "0.71119004", "0.70884174", "0.7086392", "0.7086392", "0.7086392", "0.7083611", "0.7077654", "0.7070125", "0.70628136", "0.7044053", "0.7039868", "0.7025118", "0.7020142", "0.7019015", "0.7000255", "0.69882834", "0.69871247", "0.6986449", "0.69815445", "0.6974714", "0.6970978", "0.6951712", "0.6913091", "0.6912595", "0.691219", "0.68986285", "0.6893613", "0.68729526", "0.6848624", "0.68432313", "0.6841259", "0.68403155", "0.68402475", "0.68311995", "0.6828467", "0.6822215", "0.6819676", "0.6800304", "0.67959267", "0.6795813", "0.67925924", "0.679152", "0.6789326", "0.6785038", "0.6780405", "0.6778227", "0.6775749", "0.67743355", "0.6765011", "0.67560494", "0.67551166", "0.67492145", "0.67484355", "0.67473376", "0.6740806", "0.67390174", "0.6738549", "0.673123", "0.67134786", "0.67109996", "0.67066044", "0.670354", "0.6695393", "0.6679684", "0.6677442", "0.66621685", "0.66606104" ]
0.68966454
59
ajPassword mail method API
public function ajPasswordMail() { $this->autoRender = false; $this->response->type('application/json'); if (!$this->request->is("ajax")) { $this->responseData['error'] = array('code' => 600, 'msseage' =>$this->convertErrorMessage(600)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } if (!$this->requestData) { $this->responseData['error'] = array('code' => 601, 'msseage' =>$this->convertErrorMessage(601)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } // mail exist check $query = $this->Users->find()->where([ 'Users.mail1' => $this->requestData['mail1'], 'Users.is_added' => 1, 'Users.is_deleted'=> 0 ]); if ($query->count() === 0) { $this->responseData['error'] = array('code' => 807, 'msseage' =>$this->convertErrorMessage(807)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } $userData = $query->toArray(); $user = $this->Users->get($userData[0]->id, [ 'contain' => [] ]); $user->update_user = $userData[0]->id; $user->update_at = date('Y-m-d H:i:s'); try { if ($this->Users->save($user)) { $this->responseData['success'] = 0; // mail $email = new UserEmail('default'); $email->passwordResetMail($user); } else { $this->responseData['error'] = array('code' => 802, 'msseage' =>$this->convertErrorMessage(802)); } } catch (Exception $e) { $this->responseData['error'] = array('code' => 802, 'msseage' =>$this->convertErrorMessage(802)); } $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateNewPassword($mail);", "function obtain_password() {\n $this -> load -> helper('send_email');\n $user = $this -> basic -> get_where('users', array('user_email' => $this -> input -> post('email'))) -> row();\n $this -> load -> library('form_validation');\n $this -> form_validation -> set_error_delimiters('<p>', '</p>');\n $this -> form_validation -> set_rules('email', t('email'), \"required|trim|valid_email\");\n if ($this -> form_validation -> run()) {\n if ($user != null) {\n $msg = \"<h1>Recuperación de Contraseña</h1> Sent : \" . date('m-d-Y') . \"<br/><br/>\";\n $msg .= \"Remitente: Cenline\" . \"<br/><br/><br/>\";\n $msg .= \"<i>Usted ha solicitado el servicio de recuperación de contraseña de \n Cenline Site. Sus datos de acceso son: </i> <br/> \n Email: \" . $user -> user_email . \"<br/> Contraseña: \" . $user -> user_password . \" \\</a>\";\n\n $contact_send = array('to' => $user -> user_email, 'subject' => 'Recuperación de Contraseña', 'message' => $msg);\n\n send_email($contact_send);\n } else {\n $response['html'] = t('The email user does not exist');\n $response['error'] = 1;\n echo json_encode($response);\n }\n } else {\n $response['html'] = validation_errors();\n $response['error'] = 1;\n echo json_encode($response);\n }\n }", "public function sendMailToChangePassword(string $login, string $email){\n require_once ('modeles/phpmailer/envoi.php');\n //partie personne\n $user = $this->recupUser($email);\n //partie mail\n $mail = new envoi();\n $token = rand(10,9999);\n $this->saveToken($login, $token);\n $link = \"<a href='http://localhost/code/index.php?action=changePassword&key=\".$login.\"&token=\".$token.\"'>Cliquer ici !</a>\";\n\n $body_html = '\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <title>Numtech</title>\n <style type=\"text/css\">\n html,\n body {\n margin: 0 auto !important;\n padding: 0 !important;\n height: 100% !important;\n width: 100% !important;\n }\n \n * {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n }\n \n div[style*=\"margin: 16px 0\"] {\n margin: 0 !important;\n }\n \n table,\n td {\n mso-table-lspace: 0pt !important;\n mso-table-rspace: 0pt !important;\n }\n \n table {\n border-spacing: 0 !important;\n border-collapse: collapse !important;\n table-layout: fixed !important;\n margin: 0 auto !important;\n }\n \n img {\n line-height: 100%;\n outline: none;\n text-decoration: none;\n -ms-interpolation-mode: bicubic;\n border: 0;\n max-width: 100%;\n height: auto;\n vertical-align: middle;\n }\n \n .yshortcuts a {\n border-bottom: none !important;\n }\n \n a[x-apple-data-detectors] {\n color: inherit !important;\n text-decoration: none !important;\n font-size: inherit !important;\n font-family: inherit !important;\n font-weight: inherit !important;\n line-height: inherit !important;\n }\n \n @media screen and (min-width: 600px) {\n .ios-responsive-grid {\n display: -webkit-box !important;\n display: flex !important;\n }\n .ios-responsive-grid__unit {\n float: left;\n }\n }\n </style>\n <style type=\"text/css\">\n li {\n text-indent: -1em;\n }\n </style>\n <style type=\"text/css\">\n .button__td,\n .button__a {\n transition: all 100ms ease;\n }\n \n .button__td:hover,\n .button__a:hover {\n background: #1ab77b !important;\n }\n \n @media screen and (max-width: 599px) {\n .tw-card { padding: 20px !important; }\n .tw-h1 { font-size: 22px !important; }\n .mobile-hidden {\n display: none !important;\n }\n .mobile-d-block {\n display: block !important;\n }\n .mobile-w-full {\n width: 100% !important;\n }\n .mobile-m-h-auto {\n margin: 0 auto !important;\n }\n .mobile-p-0 {\n padding: 0 !important;\n }\n .mobile-p-t-0 {\n padding-top: 0 !important;\n }\n .mobile-img-fluid {\n max-width: 100% !important;\n width: 100% !important;\n height: auto !important;\n }\n }\n </style>\n </head>\n \n <body style=\"background: #ffffff; height: 100% !important; margin: 0 auto !important; padding: 0 !important; width: 100% !important; ;\">\n <div style=\"display: none; font-size: 1px; line-height: 1px; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all;\">\n </div>\n <table cellpadding=\"0\" cellspacing=\"0\" style=\"background: #f2f2f2; border: 0; border-radius: 0; width: 100%;\">\n <tbody><tr>\n <td align=\"center\" class=\"\" style=\"padding: 0 20px;\">\n <table cellpadding=\"0\" cellspacing=\"0\" style=\"background: #f2f2f2; border: 0; border-radius: 0;\">\n <tbody><tr>\n <td align=\"center\" class=\"\" style=\"width: 600px;\">\n <table cellpadding=\"0\" cellspacing=\"0\" dir=\"ltr\" style=\"border: 0; width: 100%;\">\n <tbody>\n <tr>\n <td class=\"\" style=\"padding: 20px 0; text-align: center; ;\">\n <a href=\"https://numtech.fr/\" style=\"text-decoration: none; ;\" target=\"_blank\">\n <img alt=\"Numtech\" class=\" \" src=\"https://www.banquedesterritoires.fr/sites/default/files/2018-11/00291_02_logo%20NUMTECH%20horizontal%20transparent.png\" style=\"border: 0; height: auto; max-width: 100%; vertical-align: middle; ;\" width=\"250\">\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\"0\" cellspacing=\"0\" style=\"background: #ffffff; border: 0; border-radius: 4px; width: 100%;\">\n <tbody>\n <tr>\n <td align=\"center\" class=\"tw-card\" style=\"padding: 20px 50px;\">\n <table cellpadding=\"0\" cellspacing=\"0\" dir=\"ltr\" style=\"border: 0; width: 100%;\">\n <tbody><tr>\n <td class=\"\" style=\"padding: 20px 0; text-align: center; ;\">\n <img alt=\"\" class=\" \" src=\"https://static.twistapp.com/eee278cf8d8222ad8c36e3fdfeeafbf5.png\" style=\"border: 0; height: auto; max-width: 100%; vertical-align: middle; ;\" width=\"337\">\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\"0\" cellspacing=\"0\" dir=\"ltr\" style=\"border: 0; width: 100%;\">\n <tbody>\n <tr>\n <td class=\"\" style=\"text-align: left; color: #474747; font-family: sans-serif;;\">\n <p style=\"mfont-size: 14px; mso-line-height-rule: exactly;\">\n <span style=\"font-weight: bold;;\">\n Changement de mot de passe\n </span>\n </p>\n <p style=\" margin: 0; font-size: 14px; mso-line-height-rule: exactly;\">\n Bonjour '.$user->getNomComplet().' !\n </p>\n <p style=\" margin: 0; font-size: 14px; mso-line-height-rule: exactly;\">\n Vous avez demandé le changement de votre mot de passe pour l\\'outil de Gestion de Licences Numtech.\n </p>\n <p style=\" margin: 0; font-size: 14px; mso-line-height-rule: exactly;\">\n Pour se faire, il suffit de '.$link.' !\n </p>\n <p style=\"margin: 20px 0 20px 0; font-size: 14px; mso-line-height-rule: exactly;\">\n Cordialement,<br><br>\n <span style=\"font-weight: bold;;\">\n Service Automatique Numtech\n </span>\n </p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\"0\" cellspacing=\"0\" dir=\"ltr\" style=\"border: 0; width: 100%;\">\n <tbody><tr>\n <td class=\"\" style=\"padding: 20px 0; text-align: center; color: #8f8f8f; font-family: sans-serif; font-size: 12px; mso-line-height-rule: exactly; line-height: 20px;;\">\n <p style=\"margin: 20px 0;; margin: 0;;\">\n Email automatique envoyé par <a href=\"https://numtech.fr/\" style=\"color: #316fea; text-decoration: none;\" target=\"_blank\">Numtech</a> !\n </p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </body>\n ';\n\n $body = \"NUMTECH\\r\\n pour changer de mot de passe : $link\";\n $destinataires = $email;\n $sujet = \"Changement de mot de passe\";\n $test = $mail->sendMail($destinataires,$sujet,$body_html,$body);\n }", "public function send_password(){\n\t\t$tmpUsername = $_POST[\"txtUsername\"];\n\t\t$tmpEmail = $_POST[\"txtEmail\"];\n\t\t$inRepository = new InterfacePersonRepo;\n\t\t$tmpUser = $inRepository->getRepositoryByUsername($tmpUsername);\n\t\tif(count($tmpUser)>1){\n\t\t\texit();\n\t\t}\n\t\tif($tmpUser[0]->Email == $tmpEmail){\n\t\t\t$fgUser = new Person;\n\t\t\t$fgUser->setUsername($tmpUsername);\n\t\t\t$fgUser->setEmail($tmpEmail);\n\t\t\t$email = $inRepository->sendmailRepository($fgUser);\n\t\t\treturn View::make('alert/authen/alertEmail')->with('Email',$email);\n\t\t}else{\n\t\t\treturn View::make('alert/authen/alertEmail2');\n\t\t}\n\t}", "public function p_emailpassword(){\n\n # if javascript is disabled this checks if user entered email and password to login\n if (!$_POST['email']) {\n Router::redirect(\"/users/emailpassword/error\"); \n }\n # proceed with checking if email exists\n else { \n $q= 'Select user_id \n From users \n WHERE email=\"'.$_POST['email'].'\"';\n \n $user_id= DB::instance(DB_NAME)->select_field($q);\n \n #email doesnt exists\n if(!$user_id){ \n \n Router::redirect(\"/users/emailpassword/error1\"); \n }\n # email exists , email the password that is generated using generate_random_string\n else{\n $password=Utils::generate_random_string(8); \n $new_password=sha1(PASSWORD_SALT.$password);\n $new_modified= Time::now();\n\n $data=Array('modified'=>$new_modified,\n 'password'=>$new_password \n );\n $success= DB::instance(DB_NAME)->update('users',$data,'WHERE user_id=' .$user_id); \n \n \n $to[] = Array(\"name\" => $_POST['email'], \"email\" => $_POST['email']);\n $from = Array(\"name\" => APP_NAME, \"email\" => APP_EMAIL);\n $subject = \"Password reset message from \".APP_NAME; \n \n $body = \"This is the password: \".$password ;\n # Send email\n $sent = Email::send($to, $from, $subject, $body, FALSE, '');\n # IF EMAIL IS SENT and password update is successful proceed to login \n if($sent AND $success)\n Router::redirect('/users/login');\n # else error out, either send email failed or couldnt update database \n else\n Router::redirect('/users/emailpassword/error2');\n }\n } # end of first else \n }", "public function passwordEmail()\n {\n $this->shellshock(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if (($user = app(config('turtle.models.user'))->where('email', request()->input('email'))->first())) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'turtle::emails.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['errors' => ['email' => [trans('auth.failed')]]], 422);\n }\n }", "function sending_forgot_password_email($data, &$content) {\n\t\t// Create content\n\t\t$content = sprintf($this->ci->lang->line('auth_forgot_password_content'), \n\t\t\t$this->ci->config->item('DX_website_name'), \n\t\t\t$data['reset_password_uri'],\n\t\t\t$data['password'],\n\t\t\t$data['key'],\n\t\t\t$this->ci->config->item('DX_webmaster_email'),\n\t\t\t$this->ci->config->item('DX_website_name'));\n\t}", "public function necesitaCambiarPassword();", "function forgotPassword($emailTO) {\n global $user, $pass;\n\n return $params = array(\n 'api_user' => $user,\n 'api_key' => $pass,\n 'to' => $emailTO,\n 'subject' => 'E-Mart: Reset password',\n 'html' => \"<html>\n <head></head>\n <body>\n <p>You have been outbid by another bidder.\n Please click on the link below to bid agiain:<br>\n <span><a href=\\\"www.e-mart.azurewebsites.net\\\">URL</a></span>\n </p>\n </body>\n </html>\",\n 'text' => 'testing body',\n 'from' => '[email protected]'\n );\n}", "public function ForgotPassword($email)\n {\n $link = base_url(\"admin/redefine-password/{$email['user_uuid']}\");\n\n // PHPMailer object\n $mail = $this->phpmailer_lib->load();\n\n // SMTP configuration\n $mail->isSMTP();\n $mail->SMTPAuth = true;\n $mail->Host = getenv('MAIL_HOST');\n $mail->Username = getenv('MAIL_USER');\n $mail->Password = getenv('MAIL_PASS');\n $mail->Port = intval(getenv('MAIL_PORT'));\n\n $mail->setFrom(getenv('MAIL_USER'), \"Sistema - \" . getenv('SIS_NAME'));\n $mail->addReplyTo(getenv('MAIL_USER'), \"Sistema - \" . getenv('SIS_NAME'));\n\n // Add a recipient\n $mail->addAddress($email['user_email'], $email[\"user_name\"]);\n\n // Email subject\n $mail->Subject = 'Redefinir senha';\n\n // Charset\n $mail->CharSet = 'utf-8';\n\n //Language\n $mail->SetLanguage('pt-Br');\n\n\n // Set email format to HTML\n $mail->isHTML(true);\n\n // Email body content\n $mailContent = \"\n <div style=\\\"margin:0;padding:0;background-color:#f0f0f0;\\\">\n <div style=\\\"background-color:#f0f0f0; padding:5px;\\\">\n <div style=\\\"font-size:10px;line-height:10px\\\">&nbsp;</div>\n <table style=\\\"border-collapse:collapse;table-layout:fixed; margin: 20px auto 0;word-wrap:break-word;word-break:break-word;background-color:#ffffff\\\" align=\\\"center\\\">\n <tbody>\n <tr>\n <td style=\\\"padding:0;text-align:left;vertical-align:top;color:#787778;font-size:14px;line-height:21px;font-family:Ubuntu,sans-serif;width:600px\\\">\n <div style=\\\"Margin-left:20px;Margin-right:20px;Margin-top:24px\\\">\n <div style=\\\"line-height:20px;font-size:1px\\\">&nbsp;</div>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <h1 style=\\\"Margin-top:0;Margin-bottom:0;font-style:normal;font-weight:normal;color:#565656;font-size:36px;line-height:43px;text-align:center\\\">\n <strong>Redefinir Senha</strong>\n </h1>\n <p>Olá, <b>{$email['user_name']}!</b>.<br/></p>\n <p style=\\\"background-color: #eeeeee; padding: 15px; position: relative; left: -15px;\\\">\n Para garantir uma boa prática de que você realmente pediu para redefinir a senha acesse o link abaixo, pedimos que todos os usuários confirmem a titularidade do e-mail. Assim evitamos enviar mensagens para alguém que não queira recebê-las. <br>\n Clique no <b>LINK</b> abaixo para <b>REDEFINIR A SENHA</b>.\n </p>\n <br/>\n <a href=\\\"{$link}\\\" style=\\\"font-family:'Arial',sans-serif; font-size: 17px; background-color: #5cb85c; padding: 15px; color: #FFFFFF; text-decoration: none;\\\">REDEFINIR A SENHA</a>\n <br/>\n <br/>\n <p>Este e-mail é enviado pelo sistema, por favor não o responda.<br/>Qualquer dúvida entre em contato pelo e-mail <b>\" . getenv('MAIL_SUPORTE') . \"</b>.</p>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <div style=\\\"line-height:10px;font-size:1px\\\">&nbsp;</div>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <div style=\\\"line-height:10px;font-size:1px\\\">&nbsp;</div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"600\\\" align=\\\"center\\\" bgcolor=\\\"#e0ddd6\\\" border=\\\"0\\\" style=\\\"margin-bottom:20px;\\\">\n <tbody>\n <tr>\n <td width=\\\"15\\\"></td>\n <td>\n <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"600\\\" align=\\\"center\\\" bgcolor=\\\"#666666\\\" border=\\\"0\\\" style=\\\"border-bottom-left-radius:4px;border-bottom-right-radius:4px\\\">\n <tbody>\n <tr>\n <td height=\\\"14\\\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n <td width=\\\"15\\\"></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \";\n\n $mail->Body = $mailContent;\n\n // Send email\n if(!$mail->send()):\n return $mail->ErrorInfo;\n \n else: \n return true;\n\n endif;\n }", "public function getPassword() {}", "function change_userAccount_password($to, $phone) {\n\n\t\t\t\t\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\t\t\t\t$contact_us = base_url().'/contact-us';\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t$ptheme = pt_default_theme();\n\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n\t\t\t\t\n\t\t\t\t$template = array('{to}','{email_temp_img}','{contact_phone}','{contact_email}','{contact_address}','{contact_us_url}','{contact_us}');\n\t\t\t\t$values = array($to,$email_temp_img,$contact_phone,$contact_email,$contact_address,$values, $details[0]->temp_body,$contact_us_url,$contact_us);\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/change_password.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $phone, \"forgotpassword\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($to);\n\t\t\t\t$this->email->subject('Your Tarzango Password has been chanaged Successfully');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t\t\t/*show_error($this->email->print_debugger());\n\t\t\t\t*/\n\t\t}", "function getPassword(){\n\n}", "public function forgetpasswordAction() {\n \n $modelPlugin = $this->modelplugin();\n $dynamicPath = $modelPlugin->dynamicPath();\n $phpprenevt = $this->phpinjectionpreventplugin(); \n $mailplugin = $this->mailplugin();\n $jsonArray = $modelPlugin->jsondynamic();\n $email = $phpprenevt->stringReplace($_POST['eid']);\n $publisheremailarray = array('email' => $email);\n $chkemail = $modelPlugin->getpublisherTable()->selectEmail($publisheremailarray);\n $currentDatetime = strtotime(date(\"Y-m-d h:i:s\"));\n $restpassallow = 0;\n if ($chkemail[0]['forgetpassTimestamp']) {\n $databaseDatetime = strtotime($chkemail[0]['forgetpassTimestamp']);\n $all = $currentDatetime - $databaseDatetime;\n $day = round(($all % 604800) / 86400);\n $hours = round((($all % 604800) % 86400) / 3600);\n $m = round(((($all % 604800) % 86400) % 3600) / 60);\n\n if ($day <= 0) {\n if ($hours <= 0) {\n if ($m <= 15) {\n $restpassallow = 1;\n $contentone['minutes'] = 15 - $m;\n }\n }\n }\n }\n if (count($chkemail) == 0) {\n $contentone['data'] = 0;\n } else if ($restpassallow == 1) {\n $contentone['data'] = 2;\n } else {\n $id = $chkemail[0][\"publisherId\"];\n $pass1 = password_hash($email, PASSWORD_BCRYPT);\n $arraypass = str_replace('/', '', $pass1);\n $buttonclick = $dynamicPath . \"/Gallery/galleryview/resetpassword/\" . $arraypass;\n $mail_link = \"<a href='\" . $buttonclick . \"' style='background-color: #04ad6a; border: medium none; border-radius: 19px; padding: 12px; color: #fff; text-align: center; text-decoration: none; text-transform: uppercase;'>Click here</a>\";\n $subject = \"[Smartfanpage] Set your password\";\n $from = $jsonArray['sendgridaccount']['addfrom'];\n $keyArray = array('mailCatagory' => 'F_MAIL');\n $getMailStructure = $modelPlugin->getconfirmMailTable()->fetchall($keyArray);\n $getmailbodyFromTable = $getMailStructure[0]['mailTemplate'];\n $mailLinkreplace = str_replace(\"|MAILLINK|\", $mail_link, $getmailbodyFromTable);\n $mailBody = str_replace(\"|DYNAMICPATH|\", $dynamicPath, $mailLinkreplace);\n $fogetPasswordMail = $mailplugin->confirmationmail($email, $from, $subject, $mailBody);\n $keyArray = array('publisherId' => $id);\n $dataForForget = array('forgetpassword' => $arraypass, 'forgetpassTimestamp' => date(\"Y-m-d h:i:s\"));\n $contentone1 = $modelPlugin->getpublisherTable()->updateuser($dataForForget, $keyArray);\n $contentone['data'] = $contentone1;\n $user_session->loginId = ($_SESSION['loginId']);\n $user_session = new \\Zend\\Session\\Container('loginId');\n $user_session->getManager()->destroy();\n }\n echo json_encode($contentone);\n exit;\n }", "function sendPassword($pass)\n {\n\n /* Send an e-mail to the user saying that the password has been changed. */\n\n $header = \"From: \" . SENDER_FULL . \"\\r\\n\";\n // $header .= \"To: <\" . $this->email . \">\\r\\n\";\n $header .= \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\r\\n\";\n $header .= \"Errors-To: \" . ADMIN_FULL . \"\\r\\n\";\n $header .= \"Reply-To: \" . ADMIN_FULL . \"\\r\\n\";\n $header .= \"X-Mailer: PHP\";\n\n $userLogin = SessionDataBean::getUserLogin();\n $userName = SessionDataBean::getUserFullName();\n\n $message = \"Uživatel '\" . $userLogin . \"' (\" . $userName . \") změnil vaše heslo\\r\\n\";\n $message .= \"pro přihlašování na stránky předmětů vyučovaných K611.\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Vaše uživatelské jméno: \" . $this->login . \"\\r\\n\";\n $message .= \"Vaše nové heslo zní: \" . $pass . \"\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Pokud máte konto na FD v Praze a v KOSu e-mail ve tvaru <x#####@fd.cvut.cz>,\\r\\n\";\n $message .= \"mohlo by fungovat i vaše primární heslo (to, kterým se přihlašujete na fakultní síť).\\r\\n\";\n $message .= \"Pokud ne, zkuste heslo uvedené výše.\\r\\n\";\n $message .= \"Přihlašování přes SSU bohužel stále ještě není možné.\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Stránky předmětů naleznete na URL\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/msap/ (11MSAP)\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/ma/ (11MA prezenční)\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/mak/ (11MA pro kombinovanou formu)\\r\\n\";\n $message .= \"\\r\\n\";\n\n /* Now send the notification to the student ... */\n if (SEND_MAIL)\n {\n $subject = \"=?utf-8?B?\" . base64_encode('[K611LW] Nové heslo pro přístup') . \"?=\";\n mail($this->email, $subject, $message, $header);\n }\n\n /* ... and send a copy to the administrator. */\n $subject = \"=?utf-8?B?\" . base64_encode('[K611LW] Student <' . $this->email . '> - nové heslo pro přístup') . \"?=\";\n mail(ADMIN_EMAIL, $subject, $message, $header);\n }", "public static function password() {\n if ( !isset($_POST['email']) ) {\n return;\n }\n \n $password = substr(Helper::hash(rand(0,16^32).$_POST['email']),0,12);\n \n $result = Database::checkUser($_POST['email']);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzer!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n return;\n }\n \n $id = $result[0]['id'];\n $passwordold = $result[0]['password'];\n \n $pw = Helper::hash($password.$_POST['email']);\n \n $success = Database::setPassword($id,$passwordold,$pw);\n if ( $success !== false ) {\n self::passwordMail($_POST['email'],$password);\n self::setError('Ein neues Passwort wurde dir zugeschickt!<br>');\n } else {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n }\n }", "private static function passwordMail($mail,$password) {\n $header = 'From: ' . Config::get('mail','sender') . \"\\r\\n\" .\n 'Reply-To: ' . Config::get('mail','sender') . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n \n mail(\n $mail,\n Config::get('mail','password','subject'),\n sprintf(Config::get('mail','password','text'),$password),\n $header\n );\n }", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function olvidoPassword(){\n\t}", "public function setPassword(){\n\t}", "public static function renderPassword();", "public static function getPassword() \n { \n return emailSettings::$password; \n }", "public function getPassword()\n {\n }", "public function getPassword()\n {\n }", "public function getPassword()\n {\n }", "public function getPassword()\n {\n }", "public function getPassword()\n {\n }", "public function getPassword()\n {\n }", "function forgetPwd($email)\n{\n require ('base.php');\n\n $req = $bdd->prepare('SELECT id FROM cooks WHERE email = :email');\n $req->execute(array('email' => $email));\n $resultat = $req->fetch();\n\n if (!empty($resultat)) {\n\n $cle = password_hash(time(), PASSWORD_DEFAULT);\n\n $req = $bdd->prepare('INSERT INTO password (cle, email, date, done) VALUES(:cle, :email, NOW(), :done)');\n $req->execute(array(\n 'cle' => $cle,\n 'email' => $email,\n 'done' => 0))\n or die('Une erreur s\\'est produite');\n\n $to = \"$email\";\n $from = \"[email protected]\";\n ini_set(\"SMTP\", \"smtp.lacartedeschefs.fr\");\n\n $JOUR = date(\"Y-m-d\");\n $HEURE = date(\"H:i\");\n\n $Subject = \"Modifier votre mot de passe\";\n\n $mail_Data = \"\";\n $mail_Data .= \"<html> \\n\";\n $mail_Data .= \"<head> \\n\";\n $mail_Data .= \"<title>Modifier votre mot de passe</title> \\n\";\n $mail_Data .= \"</head> \\n\";\n $mail_Data .= \"<body> \\n\";\n\n $mail_Data .= \"<b>$Subject </b> <br> \\n\";\n $mail_Data .= \"<br> \\n\";\n $mail_Data .= \"Cliquez sur le lien pour changer de mot de passe :<br> \\n\";\n $mail_Data .= \"http://lacartedeschefs.fr/?action=forgetPwd&update&cle=$cle&email=$to<br>\\n\";\n $mail_Data .= \"Si vous n'avez pas fait de demande de changement de mot de passe, ne faites rien.<br> \\n\";\n $mail_Data .= \"</body> \\n\";\n $mail_Data .= \"</HTML> \\n\";\n\n $headers = \"MIME-Version: 1.0 \\n\";\n $headers .= \"Content-type: text/html; charset=iso-8859-1 \\n\";\n $headers .= \"From: $from \\n\";\n $headers .= \"Disposition-Notification-To: $from \\n\";\n $headers .= \"X-Priority: 1 \\n\";\n $headers .= \"X-MSMail-Priority: High \\n\";\n\n $CR_Mail = TRUE;\n $CR_Mail = @mail ($to, $Subject, $mail_Data, $headers);\n\n if ($CR_Mail === FALSE) {\n return 'Une erreur s\\'est produite.';\n }else {\n return 'Si un compte avec cette adresse email existe,<br>\n vous allez recevoir un email contenant un lien de réinitialisation.';\n }\n }else {\n return 'Si un compte avec cette adresse email existe,<br>\n vous allez recevoir un email contenant un lien de réinitialisation.';\n }\n}", "public function getMailPassword() {\n return $this->mailPassword;\n }", "function sendPassRecLink(string $email) {\n\n }", "function get_password($usrid){\r\n\t\r\n}", "function forgotPassword(){\n\t\t\t$this->__dataDecode();\n\t\t\tif(!empty($this->data)){\n\t\t\t$data = $this->data;\n\t\t\t$username = $data['User']['userName'];\n\t\t\t$userDetail = $this->User->find('first',array('conditions'=>array(\"User.username \"=> $username)));\n\t\t\tif($username==null){\n\t\t\t\techo $username;\n\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t$response['response']['message']\t= 'please Enter userName';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\telse{ \n\t\t\t\t$userID = $userDetail['User']['id'];\n\t\t\t\t$data = $this->data;\n\t\t\t\t$email_to = $userDetail['User']['email'];\n\t\t\t\tif($userDetail['User']['username'] == ($username)){\n\t\t\t\t\t$password= $this->createRandomPassword();\n\t\t\t\t\t$new_password=md5($password);\n\t\t\t\t\t$this->User->id = $userID;\n\t\t\t\t\t$this->data['User']['password'] = trim($new_password);\n\t\t\t\t\tunset($this->User->validate['password']);\n \t\t\t\t\tunset($this->User->validate['confirm_password']);\n\t\t\t\t\tif($this->User->save($this->data)){\n\t\t\t\t\t\t//Default Mail component is called, to send mail. We are setting the variables for sending email\n\t\t\t\t\t\t$this->Email->to = $email_to;\n\t\t\t\t\t\t//$this->Email->bcc = array($adminEmail);\n\t\t\t\t\t\t$this->Email->subject = 'Your password here';\n\t\t\t\t\t\t$this->Email->replyTo = EMAIL_REPLY;\n\t\t\t\t\t\t$this->Email->from = \"iWrestled admin <\".EMAIL_REPLY.\">\";\n\t\t\t\t\t\t//Here, the element in /views/elements/email/html/ is called to create the HTML body\n\t\t\t\t\t\t$this->Email->template = 'simple_message'; // note no '.ctp'\n\t\t\t\t\t\t//Send as 'html', 'text' or 'both' (default is 'text')\n\t\t\t\t\t\t$this->Email->sendAs = 'both'; // because we like to send pretty mail\n\t\t\t\t\t\t//Set view variables as normal\n\t\t\t\t\t\t$this->set('userDetail', $userDetail);\n\t\t\t\t\t\t$this->set(\"password\", $password);\n\t\t\t\t\t\t//Do not pass any args to send()\n\t\t\t\t\t\tif($this->Email->send()){\n\t\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'success';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'Password send to your email id';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{ \n\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'Password Enter valid email id';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "function sendPasswordChangeEmail($email, $name, $accountName)\n{\n $subject = \"Contest registration system password changed.\";\n $mailContent = $name . \": \\n\";\n $mailContent .= \"The contest registration system has processed a password\" .\n \" change request for your account, \" . $accountName . \".\\n\";\n $mailContent .= \"\\nIf you did not change your password please write to the member administrator:\\n\\n\";\n $mailContent .= \"mailto:\" . ADMIN_EMAIL . \"?subject=\" . urlencode(\"password compromised\") . \"\\n\";\n $mailContent .= \"\\nright away, or simply reply to this note.\\n\";\n $fromAddress = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n do_email($email, $subject, $mailContent, $fromAddress);\n}", "public function restPassword(){\n\t}", "public function FindPw(){\n\t\t\n\t\t$html = fopen(\"../../../../../../FindPw.php\",\"w\") or die(\"unable to make email\");\n\n\t\t$contents = \n\t\t'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1-strict.dtd\">\n\t\t<html lang=\"en\">\n\t\t<head>\n\t\t\t<meta charset=\"UTF-8\">\n\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n\t\t</head>\n\t\t<body>\n\t\t<table align=\"center\" width=\"620\" height=\"270\" bgcolor=\"#ffffff\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t<tbody>\n\t\t\t<tr id=\"mail_lubycon_logo\">\n\t\t\t\t<td>\n\t\t\t\t\t<img src=\"../../CH/img/resist_mail/mail_header.png\" class=\"mail_header\" >\n\t\t\t\t</td>\n\t\t\t</tr>\n \t<tr id=\"mail_hello\">\n \t<td align=\"left\" style=\"font-family:Arial, Helvetica, sans-serif; font-size: 40px; color:#444444;\">\n \t<br />\n \t &nbsp;Hello. <font size=\"40px\" color=\"#48cfad\">:)</font>\n <br />\n <br />\n </td>\n </tr>\n <tr id=\"mail_description\">\n \t<td align=\"left\" style=\"font-family:Arial, Helvetica, sans-serif; font-size: 15px; color:#444444; line-height:25px;\">\n \t\t\t&nbsp;&nbsp;&nbsp;\n Your temporary password has been sent to the registered email.<br /><br />\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t<font size=\"4px\">\n\t\t\t\t\tHere your temporary password is : '.$this->token.'\n\t\t\t\t\t</font>\n\t\t\t\t\t<br /><br />\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;\n\n\t\t\t\t\tIf this is not you, Please Contact.<br />\n &nbsp;&nbsp;&nbsp;\n <br />\n <br />\n \t</td>\n </tr>\n <tr>\n <td align=\"left\" style=\"font-family:Arial, Helvetica, sans-serif; font-size: 15px; color:#444444; line-height:20px;\">\n \t<br />\n &nbsp;&nbsp;&nbsp;\n \tIf you have any problems or questions, please send e-mail to \n <a id=\"mailadress\" href=\"mailto:[email protected]\" style=\"text-decoration:none;\">\n \t<font color=\"#48cfad\" size=\"+1\">[email protected]</font>\n </a>\n </td>\n </tr>\n </tbody>\n\t\t</table>\n\t\t</body>\n\t\t';\n\n\t\tfwrite($html, $contents);\n\t\tfclose($html);\n\t}", "public function validateForgotPassword($input){\n $userData = array();\n $error=array();\n\n\n if(empty($input['email'])){\n $error = array_merge($error,array('email' => 'This field is required.'));\n }\n else{\n $cleanData = $this->cleanInput($input['email']);\n require_once('../app/Core/Database.php');\n $db = new Database();\n $conn = $db->setConnection();\n if($conn !== null){\n $stmt = $conn->query(\"SELECT username,email FROM user where email='\".$cleanData.\"'\");\n if($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $username = $row['username'];\n $newPassword = uniqid();\n require '../app/vendor/autoload.php';\n $mail = new PHPMailer(true);\n try{\n $mail->isSMTP();// set mailer to use smtp\n $mail->Host = 'smtp.gmail.com'; //specify the smtp server\n $mail->SMTPAuth = true; // enable smtp authenticatiion\n $mail->Username = \"[email protected]\"; // SMTP username\n $mail->Password = \"hello@there123HT\"; // SMTP pasword\n $mail->SMTPSecure = \"tls\"; // Enable TLS encryption\n $mail->Port = 587; // TCP port to connect to\n\n // recipient\n $mail->setFrom(\"[email protected]\",\"Seralance\");\n $mail->addAddress($row['email'],$row['email']);\n \n //content\n $mail->isHTML(true); // set email format to html\n $mail->Subject = \"Forgotten password\";\n $msg =<<<EOT\n <html>\n <body>\n <div style=\"text-align: center;\">\n <img src=\"{$_SESSION['baseurl']}public/assets/images/seralance-logo.png\" alt=\"Seralance\">\n </div>\n \n <p style=\"text-align: center;\">\n Your username is {$username}.\n </p>\n <p style=\"text-align: center;\">\n Your newly generated password is {$newPassword}.\n </p>\n </body>\n </html>\n EOT;\n\n $mail->Body =$msg;\n\n $mail->send();\n $this->updatePassword(array('email'=>$row['email'],'newpassword'=>$newPassword));\n\n }\n catch(Exception $e){\n $error = array_merge($error,array('email' => 'Sorry for the inconvenience! We could not send a new password. Please try again later.'));\n } \n }\n else{\n $error = array_merge($error,array('email' => 'Email does not exist.'));\n } \n } \n }\n \n if(empty($error)){\n return array('valid'=>1 ,'data'=>$userData);\n }\n else{\n return array('valid'=>0,'error'=>$error);\n }\n\n \n }", "function update_password()\n {\n }", "public function passwordEmail()\n {\n $this->validateAjax(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if ($user = Students::where('email', request()->input('email'))->first()) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'student.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['message' => trans('auth.failed')], 422);\n }\n }", "public function retrievePasswordAction() {\r\n\t\t$email = $this->getRequest()->getPost('email', false);\r\n\t\t$result = array();\r\n\t\tif ($email) {\r\n\t\t\t$customer = Mage::getModel('customer/customer')\r\n ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())\r\n ->loadByEmail($email); \r\n\t\t\tif ($customer->getId()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$newPassword = $customer->generatePassword();\r\n\t\t\t\t\t$customer->changePassword($newPassword, false);\r\n\t\t\t\t\t$customer->sendPasswordReminderEmail();\r\n\t\t\t\t\t$result = array('success' => true);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception $e){\r\n\t\t\t\t\t$result = array('success' => false, 'error' => $e->getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$result = array('success' => false, 'error' => 'This email address was not found in our records.');\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t$this->getResponse()->setBody(Zend_Json::encode($result));\r\n\t}", "function sendEmailPassword($user_id, $password){\n\t\n\t $result = $GLOBALS['db']->query(\"SELECT email1, email2, first_name, last_name FROM users WHERE id='$user_id'\");\n\t $row = $GLOBALS['db']->fetchByAssoc($result);\n\t \n\t if(empty($row['email1']) && empty($row['email2'])){\n\t \n\t $_SESSION['login_error'] = 'Please contact an administrator to setup up your email address associated to this account';\n\t return;\n\t }\n\t \n\t require_once(\"include/SugarPHPMailer.php\");\n\t\t$notify_mail = new SugarPHPMailer();\n\t\t$notify_mail->CharSet = AppConfig::setting('email.default_charset');\n\t\t$notify_mail->AddAddress(((!empty($row['email1']))?$row['email1']: $row['email2']), $row['first_name'] . ' ' . $row['last_name'] );\n \n\t\tif (empty($_SESSION['authenticated_user_language'])) {\n\t\t\t$current_language = AppConfig::setting('locale.defaults.language');\n\t\t}\n\t\telse {\n\t\t\t$current_language = $_SESSION['authenticated_user_language'];\n\t\t}\n\n\t\t$notify_mail->Subject = 'info@hand Token';\n\t\t$notify_mail->Body = 'Your info@hand session authentication token is: ' . $password;\n\t\tif(AppConfig::setting('email.send_type') == \"SMTP\") {\n\t\t\t$notify_mail->Mailer = \"smtp\";\n\t\t\t$notify_mail->Host = AppConfig::setting('email.smtp_server');\n\t\t\t$notify_mail->Port = AppConfig::setting('email.smtp_port');\n\t\t\tif (AppConfig::setting('email.smtp_auth_req')) {\n\t\t\t\t$notify_mail->SMTPAuth = TRUE;\n\t\t\t\t$notify_mail->Username = AppConfig::setting('email.smtp_user');\n\t\t\t\t$notify_mail->Password = AppConfig::setting('email.smtp_password');\n\t\t\t}\n\t\t}\n\n\t\t$notify_mail->From = 'no-reply@' . AppConfig::setting(array('email.from_host_name', 'site.host_name'));\n\t\t$notify_mail->FromName = 'info@hand Authentication';\n\n\t\tif(!$notify_mail->Send()) {\n\t\t\t$GLOBALS['log']->warn(\"Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})\");\n\t\t}\n\t\telse {\n\t\t\t$GLOBALS['log']->info(\"Notifications: e-mail successfully sent\");\n\t\t}\n\t\n\t\t\t\n\t\t\n\t}", "public function password()\n {\n }", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "protected function changePassword() {}", "public function getPW() {}", "public function Resendpasswordmail($to, $from, $name, $link)\n {\n $sendGrid = Yii::$app->sendGrid;\n $status = '';\n // get forgot password mail\n $forgot_mail_templates = EmailTemplates::find()->where(\n [\n 'email_type_id' => 3\n ]\n )->One();\n\n if (! empty($forgot_mail_templates)) {\n // removing place holders in mail body\n $body = str_replace(\"&lt;&lt;name&gt;&gt;\", $name, $forgot_mail_templates->body);\n $body = str_replace(\n \"&lt;&lt;password_btn&gt;&gt;\",\n '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"mcnButtonBlock\" style=\"min-width:100%;\">\n\t\t\t <tbody class=\"mcnButtonBlockOuter\">\n\t\t\t <tr>\n\t\t\t <td style=\"padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;\" valign=\"top\" align=\"center\" class=\"mcnButtonBlockInner\">\n\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"mcnButtonContentContainer\" style=\"border-collapse: separate !important;border-radius: 3px;background-color: #0076BC;\">\n\t\t\t <tbody>\n\t\t\t <tr>\n\t\t\t <td align=\"center\" valign=\"middle\" class=\"mcnButtonContent\" style=\"font-family: Arial; font-size: 16px; padding: 15px;\">\n\t\t\t <a class=\"mcnButton \" title=\"Reset Your Password\" href=\"'.$link.'\" target=\"_blank\" style=\"font-weight: bold;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;\">Reset Your Password</a>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t </tbody>\n\t\t\t </table>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t </tbody>\n\t\t\t</table>',\n $body\n );\n\n $message = $sendGrid->compose();\n $status = $message->setFrom($from)->setTo($to)->setReplyTo($from)->setSubject($forgot_mail_templates->subject)->setHtmlBody($body)->send($sendGrid);\n }//end if\n\n return $status;\n\n }", "public function getPassword(): string;", "public function forgotpasswordAction()\n {\n $user_service = $this->getServiceLocator()->get('user');\n $email_sent = false;\n\n if ($this->getRequest()->isPost())\n {\n $data = $this->getRequest()->getPost();\n\n $email = trim($data['email']);\n $email = strtolower($email);\n $user_service->emailPassword($email);\n $email_sent = true;\n }\n\n return ['email_sent' => $email_sent];\n }", "public function Forgotpasswordmail($to, $from, $name, $link)\n {\n $sendGrid = Yii::$app->sendGrid;\n $status = '';\n // get forgot password mail\n $forgot_mail_templates = EmailTemplates::find()->where(\n [\n 'email_type_id' => 1\n ]\n )->One();\n\n if (! empty($forgot_mail_templates)) {\n // removing place holders in mail body\n $body = str_replace(\"&lt;&lt;name&gt;&gt;\", $name, $forgot_mail_templates->body);\n $body = str_replace(\n \"&lt;&lt;password_btn&gt;&gt;\",\n '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"mcnButtonBlock\" style=\"min-width:100%;\">\n\t\t\t <tbody class=\"mcnButtonBlockOuter\">\n\t\t\t <tr>\n\t\t\t <td style=\"padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;\" valign=\"top\" align=\"center\" class=\"mcnButtonBlockInner\">\n\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"mcnButtonContentContainer\" style=\"border-collapse: separate !important;border-radius: 3px;background-color: #0076BC;\">\n\t\t\t <tbody>\n\t\t\t <tr>\n\t\t\t <td align=\"center\" valign=\"middle\" class=\"mcnButtonContent\" style=\"font-family: Arial; font-size: 16px; padding: 15px;\">\n\t\t\t <a class=\"mcnButton \" title=\"Reset Your Password\" href=\"'.$link.'\" target=\"_blank\" style=\"font-weight: bold;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;\">Reset Your Password</a>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t </tbody>\n\t\t\t </table>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t </tbody>\n\t\t\t</table>',\n $body\n );\n\n $message = $sendGrid->compose();\n $status = $message->setFrom($from)->setTo($to)->setReplyTo($from)->setSubject($forgot_mail_templates->subject)->setHtmlBody($body)->send($sendGrid);\n }//end if\n\n return $status;\n\n }", "public function post_forgotpassword() {\n try {\n $i = Input::post();\n\n $auth = new \\Craftpip\\OAuth\\Auth();\n $users = $auth->getByUsernameEmail($i['email']);\n if (!$users) {\n throw new \\Craftpip\\Exception('Email/Username not registered with us.');\n }\n\n $mail = new \\Craftpip\\Mail($users['id']);\n $mail->template_forgotpassword();\n $mail->send();\n\n $response = array(\n 'status' => true,\n 'message' => 'asdsa',\n );\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage(),\n );\n }\n\n echo json_encode($response);\n }", "private function emailAtLogin() {}", "public function actionPwd_callback()\n {\n $request = yii::$app->request;\n if ($request->isPost) {\n $username = $request->post('username');\n $type = $request->post('type');\n if (stripos($type,'@') == true) {\n $bool = WcUser::find()\n ->select('id')\n ->where(['username' => $username, 'email' => $type])\n ->asArray()\n ->One();\n if ($bool) {\n //加密发送邮件\n $id = $bool['id'];\n $host = $request->hostInfo;\n $homeurl = yii::$app->homeUrl;\n $url = $host.$homeurl.\"?r=user/resetpwd\";\n echo $this->actionEmailsend($id, $url);\n }\n } else {\n return '手机找回未开通';\n }\n } else {\n return $this->render('pwd_callback');\n }\n }", "function sendResetPasswordEmail($email, $password){\n\n $messaggio = \"Usa questa password temporanea\";\n\n $linkLogin = 'https://www.unimolshare.it/login.php';\n $emailTo = \"[email protected]\";\n $subject = \"UnimolShare - Conferma registrazione\";\n $message = '<html><body><h1>UnimolShare</h1><div>';\n $message .= $messaggio.':<br/><br/><b>'.$password.'</div><br/><div>Vai su '.$linkLogin.' per entrare.</div></body></html>';\n $headers = \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\n try {\n mail($emailTo, $subject, $message, $headers);\n return true;\n } catch (Exception $e){\n return false;\n }\n\n }", "function ajaxMotDePasse($ar){\n $p = new XParam($ar, array());\n $message = $this->modcustomer->sendNewPassword($ar);\n die($message);\n }", "public function testSendPasswordRecoveryEmail()\n {\n }", "public function askingForPassword($message = \"Start\")\n {\n $this->comment(\"--------==/*$message*\\==--------\");\n $details[\"email\"] = \"[email protected]\";\n $this->info(\"Email:- \".$details[\"email\"]);\n $details[\"password\"] = $this->ask(\"Password\");\n if (config(\"system.developer.email\") == $details[\"email\"] && $details[\"password\"] == config(\"system.developer.password\")) {\n $this->comment(\"Asked for Password\");\n $this->comment(\"--------==/*Make Your Chocie*\\==--------\");\n return;\n }\n $this->error(\"----CommandTrait.askingForPassword Password is Wrong----\");\n $this->comment(\"--------==/**\\==--------\");\n $this->askingForPassword($message);\n }", "public function sendConfirmationEmail($input)\n {\n try\n {\n # set up PHPMailer Library\n $mail = new \\PHPMailer(true);\n\n # variables\n $title = \"Your Passcode for login\";\n\n\n # set the PHPMailer properties\n $mail->isSMTP();\n $mail->CharSet = \"utf-8\";\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'tls';\n $mail->Host = 'smtp.gmail.com';\n $mail->Port = '587';\n $mail->Username = '[email protected]';\n $mail->Password = '0288541828';\n $mail->Subject = \"ABC Pathology Lab : PASSCODE \";\n $mail->From = \"[email protected]\";\n $mail->FromName = \"ABC Pathology lab\";\n\n\n $mail->MsgHTML(\n 'PASSCODE : '.$input->password\n );\n\n $mail->addAddress(\n $input->email, 'test'\n );\n\n # send email\n return $mail->send();\n }\n catch (phpmailerException $e)\n {\n return false;\n }\n catch (Exception $e)\n {\n return false;\n }\n }", "public function getMessPassword ()\n {\n return $this->mess_password;\n }", "public function doForgetPassword(){\n $email = Input::get('email');\n $result = 0;\n\n if(!empty($email)){\n $token = User::createAccountToken();\n \tUser::where('email', '=',$email)->update(array('account_token' => $token));\n\n\t\t\t$user = User::getByEmail($email);\n if (!empty($user)) {\n $link_reset = URL::to('/').'/forgetPassword?email='.$email.'&token='.$token;\n\n $data = array(\n 'link_reset' => $link_reset,\n 'user' => $user->toArray()\n );\n\n Mail::send('emails.reset_password', $data, function($message) use($email) {\n $message->to($email, Config::get('constants.website_name'))\n ->subject('【'.Config::get('constants.website_name').'】Cấp lại mật khẩu!');\n });\n\n $result = 1;\n }\n }\n return json_encode($result);\n }", "public function forgot_password() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['username'])){\n $email = $_POST['username'];\n $user = $this->User->getByEmail($email);\n $pass = rand(111111, 999999);\n if($this->User->setPassword($user['id'], $pass)) {\n $text = <<<END\nBecause of a request on our site, your password has been reset. To change your password, go to /users/change_password\nYour username is: {$email}\nYour password is: {$pass}\nEND;\n $email = self::getLib('email');\n $html = $email->text2html($text, email);\n $email->setSender('support');\n $email->setReplyTo('support');\n $email->setRecipients( array($recipient) );\n $email->setSubject(\"Your password has been reset\");\n $email->addMessagePart($text);\n $email->addMessagePart($html, \"html\");\n $email->send();\n $flash = \"An email with your new password has been sent to you. You should receive it shortly.\";\n } else {\n $flash = \"An error occured.\";\n }\n } else {\n $flash = \"Please enter a user name.\";\n }\n return array('flash' => $flash);\n }", "static function password_forgot() {\n $model = \\Auth::$model;\n\n # hash GET param exists\n if (!$hash = data('hash'))\n go('/');\n\n # user hash exists\n $user = $model::first(array(\n 'fields' => 'id, email, name',\n 'where' => \"hash_password_forgot = '$hash'\"\n ));\n\n if (empty($user))\n go('/');\n\n # POST passwords sent\n if ($model::data()) {\n $user->password = $model::data('password');\n $user->password_confirm = $model::data('password_confirm');\n\n # validate passwords\n if ($user->validate()) {\n $user->password = auth_encrypt($user->password);\n $user->hash_password_forgot = '';\n\n $user->edit() ?\n flash('Sua senha foi alterada com sucesso.') :\n flash('Algo ocorreu errado. Entre em contrato com a empresa.', 'error');\n\n go('/');\n }\n }\n\n globals('user', $user);\n }", "function the_post_password()\n {\n }", "public function esig_mail_get_password() {\n\n $esig_options = get_option('esig_mail_options');\n $temp_password = $esig_options['smtp_settings']['password'];\n $password = \"\";\n if (!$temp_password) {\n return $password;\n }\n\n $decoded_pass = base64_decode($temp_password);\n\n if (base64_encode($decoded_pass) === $temp_password) { //it might be encoded\n $password = base64_decode($temp_password);\n } else { //not encoded\n $password = $temp_password;\n }\n return $password;\n }", "public function actionPassword()\n {\n if (is_null($this->password)) {\n self::log('Password required ! (Hint -p=)');\n return ExitCode::NOUSER;\n }\n\n if (is_null($this->email) && is_null($this->id)) {\n self::log('User ID or Email required ! (Hint -e= or -i=)');\n return ExitCode::DATAERR;\n }\n\n $model = User::find()->where([\n 'OR',\n [\n 'email' => $this->email\n ],\n [\n 'id' => $this->id\n ]\n ])->one();\n\n if (is_null($model)) {\n\n self::log('User not found');\n\n return ExitCode::NOUSER;\n }\n\n $validator = new TPasswordValidator();\n\n $model->password = $this->password;\n\n $validator->validateAttribute($model, \"password\");\n\n if ($model->errors) {\n\n self::log($model->errorsString);\n\n return ExitCode::DATAERR;\n }\n\n $model->setPassword($this->password);\n\n if (! $model->save()) {\n\n self::log('Password not changed ');\n\n return ExitCode::DATAERR;\n }\n\n self::log($this->email . ' = Password successfully changed !');\n\n return ExitCode::OK;\n }", "public function password($password);", "function update_paypassword()\n {\n }", "public function getPasswordAdapter();", "public function actionPassword() {\n\t\t$content = ModelBase::factory('Setting')->handlePassword($this->data);\n\n\t\tif ($content->get('updated')) $this->setAlert('info', 'Password terupdate!');\n\n\t\t// Template configuration\n\t\t$this->layout = 'modules/setting/index.tpl';\n\t\t$data = ModelBase::factory('Template')->getSettingData(compact('content'));\n\n\t\t// Render\n\t\treturn $this->render($data);\n\t}", "public function recoverPassword() {\n try {\n /* Check if for the empty or null email parameters */\n if (isset($_POST[\"email\"])) {\n // Get the email parameters from POST request\n $form_data = array(\n ':email' => $_POST[\"email\"]\n );\n // Create a SQL query to check if exist this user with email\n $query = \"\n select *\n from tb_user \n where email = :email\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameters email\n $statement->execute($form_data);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n // Create a User object\n $user = new User($row);\n $username = $user->getUsername();\n $password = $user->getPassword();\n // Send creadentials by email passed\n require_once('classes/phpmailer/class.phpmailer.php');\n // include(\"phpmailer/class.smtp.php\"); // optional, gets called from within class.phpmailer.php if not already loaded\n $mail = new PHPMailer();\n $mail->CharSet = 'UTF-8';\n $mail->IsSMTP(); // telling the class to use SMTP\n $mail->Host = \"mail.ybytesi.com\"; // SMTP server\n $mail->SMTPDebug = 1; // enables SMTP debug information (for testing)\n // 1 = errors and messages\n // 2 = messages only\n $mail->SMTPAuth = true; // enable SMTP authentication\n $mail->Host = \"mail.ybytesi.com\"; // sets the SMTP server\n $mail->Port = 26; // set the SMTP port for the GMAIL server\n $mail->Username = \"[email protected]\"; // SMTP account username\n $mail->Password = \"Su9rt3*2018$\"; // SMTP account password\n\n $mail->SetFrom('[email protected]', 'SMS System');\n\n $mail->AddReplyTo($email, $username);\n\n $mail->Subject = \"Password sending\";\n\n $body = \"<html><head></head><body><p>Ol&aacute; $username,</p><p>Enviamos-lhe a sua palavra-passe, <b>$password</b>.</p><br/><br/><p>Atentamente,</p><p>Webmaster inic.gov.st</p></body></html>\";\n \n $mail->AddEmbeddedImage(\"../img/logo.png\", \"my-attach\", \"../img/logo.png\");\n $body = $body.'<img alt=\"Logo\" src=\"cid:my-attach\" />';\n \n $mail->MsgHTML($body);\n\n $address = $email;\n $mail->AddAddress($address, $username);\n $resp = $mail->Send();\n // data[] is a associative array that return json\n if (!$resp) {\n $data[] = array('result' => '0');\n } else {\n $data[] = array('result' => '1');\n }\n } else {\n $data[] = array('result' => 'Email not found!');\n }\n } else {\n // Check for missing parameters in POST data\n $data[] = array('result' => 'Missing email parameter !!');\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function textAndEmailUserPassword($mysqli, $userId, $plainTextPassword) {\n\t// email\n\t$email_to = getUsersEmail ( $mysqli, $userId );\n\t$email_subject = \"Your Password\";\n\t$email_message = \"Password: $plainTextPassword\";\n\tmail ( $email_to, $email_subject, $email_message );\n\t// text message\n\t$userPhoneNumber = getUsersPhoneNumber ( $mysqli, $userId );\n\t$userCellCarrier = getUserCellCarrier ( $mysqli, $userId );\n\t$text_to = $userPhoneNumber . $userCellCarrier;\n\t$text_subject = \"Your Password\";\n\t$text_message = \"Password: $plainTextPassword\";\n\tmail ( $text_to, $text_subject, $text_message );\n}", "function sendForgetPassword($userData)\n {\n $this->getCountryCode($userData->country_id);\n $template = 'USR007';\n $username = \"$userData->first_name $userData->last_name\";\n $replace = ['[UserName]', '[ResetPasswordLink]', '[UserTempCode]'];\n $with = [$username, FRONT_URL . \"/reset_password?token=$userData->reset_pass_token\", $userData->reset_pass_code];\n $to = $this->countryCode . (int) $userData->mobile_no;\n parent::sendSms($to, $replace, $with, $template);\n }", "function send_tempPass($email){\n\n\n $temp_pass = generate_temp_pass();\n $insert_to_db_pass = md5($temp_pass);\n $username = $_SESSION['username'];\n $email = htmlspecialchars($email);\n \n change_to_temp($insert_to_db_pass,$_SESSION['email'],$username);\n $to = $_SESSION['email'];\n\n $subject = \"Temporary Password\";\n\n //message to the user!\n $message = \"\n <html>\n <body style='background: #3B653D;'>\n <div>\n <h1 style = 'color:#ffffff; font-size:32px; text-align: center;'> Here is your account temporary password info $email !<br></h1>\n \n <span style = 'color:#ffffff;' font-size:20px;'> Temporary Password: $temp_pass </span><br>\n <span><a style = 'color:#ffffff;' href =http://farvlu.farmingdale.edu/~foxrc/BCS350_Project/change_password_link.php> Click here to change password </a> </span>\n \n </div>\n </body>\n </html>\";\n $headers = \"MIME-Version: 1.0\" . PHP_EOL;\n $headers .= \"Content-type:text/html;charset=UTF-8\" . PHP_EOL;\n $headers .= \"From: [email protected]\". PHP_EOL;\n mail($to,$subject,$message,$headers);\n\n}", "public function send_pw_reset_email($to,$id) {\r\n \r\n $full_url= BASE_URL . \"/#/reset_pw/\" . $id;\r\n $this->mail->addAddress($to); // Add a recipient\r\n $this->mail->Subject = PW_RESET_SUBJECT;\r\n $this->mail->Body = strtr (PW_RESET_BODY, array ('{{res_link}}' => $full_url));;\r\n //$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\r\n $resp = $this->mail->send();\r\n return $resp;\r\n }", "public function change_pass(){\n if($this->session->userData('userData')){\n $users = $this->session->userData('userData');\n $pass=$this->input->post('old_pass');\n $password_new = $this->input->post('new_pass');\n for($i=0;$i<5;$i++){\n $pass=md5($pass);\n $password_new=md5($password_new);\n }\n //var_dump($password_new);die;\n $arr2 = array('password' => $password_new);\n $user=$this->f_usersmodel->getFirstRowWhere('users',array('id'=>$users['oauth_uid']));\n if($pass==$user->password){\n $rs=$this->f_usersmodel->Update_where('users',array('id' => $users['oauth_uid']),$arr2);\n if($rs){\n\t\t\t\t\t\t $config = Array(\n 'protocol' => 'smtp',\n 'smtp_host' => $this->config->item('smtp_hostssl'),\n 'smtp_port' => $this->config->item('smtp_portssl'),\n 'smtp_user' => $this->config->item('smtp_user'), // change it to yours\n 'smtp_pass' => $this->config->item('smtp_pass'), // change it to yours\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'wordwrap' => TRUE\n );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->load->library('email', $config);\t\t\t\t\t\t\n $subject = $this->option->site_name.' - Thay đổi mật khẩu';\n $message = '<p>Mật khẩu tài khoản của bạn đã được đổi: '.$this->input->post('new_pass').'</p>';\n // Get full html:\n $body =\n '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <title>' . htmlspecialchars($subject, ENT_QUOTES, $this->email->charset) . '</title>\n <style type=\"text/css\">\n body {\n font-family: Arial, Verdana, Helvetica, sans-serif;\n font-size: 16px;\n }\n </style>\n </head>\n <body>\n ' . $message . '\n </body>\n </html>';\n \n\t\t\t\t\t\t$receiver_email = $user->email . ','.@$this->option->site_email;\n $this->email->set_newline(\"\\r\\n\");\n $this->email->from(@$this->option->site_email,'Thay đổi mật khẩu'); // change it to yours\n $this->email->to($receiver_email);\n $this->email->subject($subject);\n $this->email->message($body);\n if ($this->email->send()) {\n $this->session->set_flashdata(\"mess\", \"Đổi mật khẩu thành công!!!\");\n } else {\n $this->session->set_flashdata(\"mess_err\", \"Đổi mật khẩu thất bại!!!\");\n redirect($_SERVER['HTTP_REFERER']);\n }\n redirect($_SERVER['HTTP_REFERER']);\n }\n }else{\n $this->session->set_flashdata(\"mess_err\", \"mật khẩu cũ không đúng!!!\");\n redirect($_SERVER['HTTP_REFERER']);\n }\n\n }else{\n redirect(base_url());\n }\n }", "public function emailpassword($error = NULL) {\n \n $this->template->content3=View::instance('v_users_emailpassword'); \n $this->template->title= APP_NAME. \" :: Login\";\n // add required js and css files to be used in the form\n $client_files_head=Array('/js/languages/jquery.validationEngine-en.js',\n '/js/jquery.validationEngine.js',\n '/css/validationEngine.jquery.css'\n );\n $this->template->client_files_head=Utils::load_client_files($client_files_head); \n # Pass data to the view\n $this->template->content3->error = $error;\n\n echo $this->template;\n\n\n }", "public function getAuthPassword()\n {\n }", "public function getAuthPassword()\n {\n }", "public function getAuthPassword()\n {\n }", "public function forgotPwd() {\n\t\tif (isset($_POST['email'])){\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$query=\"select * from users where email='$email'\";\n\t\t\t\t$result = mysqli_query($this->connrps,$query);\n\t\t\t\t$count=mysqli_num_rows($result);\n\t\t\t\t// If the count is equal to one, we will send message other wise display an error message.\n\t\t\t\tif($count==1){\n\t\t\t\t\t$rows=mysqli_fetch_array($result);\n\t\t\t\t\t$pass = base64_decode($rows['password']);\n\t\t\t\t\t$to = $rows['email'];\n\t\t\t\t\t$url = $_SERVER['HTTP_HOST'];\n\t\t\t\t\t$body = \"\n\t\t\t\t\tWebsite Url : $url <br/>\n\t\t\t\t\tYour Email Id : $to <br/>\n\t\t\t\t\tHere is your password : $pass <br/><br/><br/><br/>\n\t\t\t\t\tSincerely,<br/>\n\t\t\t\t\tBARNA\";\n\t\t\t\t\t$from = \"[email protected]\";\n\t\t\t\t\t$subject = \"Your password has been recovered\";\n\t\t\t\t\t$headers1 = 'From: Password Recovered <$from>' . \"\\r\\n\";\n\t\t\t\t\t$headers1 .= \"Content-type: text/html;charset=iso-8859-1\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-Priority: 1\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-MSMail-Priority: High\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-Mailer: Password Recovered\\r\\n\";\n\t\t\t\t\t$sentmail = mail ( $to, $subject, $body, $headers1 );\n\t\t\t\t\t//If the message is sent successfully, display sucess message otherwise display an error message.\n\t\t\t\t\tif($sentmail==1){\n\t\t\t\t\t\t$message= \"Your password has been sent to your email address.\";\n\t\t\t\t\t\t$_SESSION['succ_msg'] = $message;\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($_POST['email']!=\"\"){\n\t\t\t\t\t\t\t$message= \"Cannot send password to your e-mail address.Problem with sending mail...\";\n\t\t\t\t\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t\tif ($_POST ['email'] != \"\") {\n\t\t\t\t\t$message= \"Email does not exist.\";\n\t\t\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n }", "public function setMailPassword($mailPassword) {\n \t$this->mailPassword = $mailPassword;\n }", "public function emailPasswordEmail($email, $password, $member_card_number, $last_name, $username, $title) {\r\t\t$this->email->clear();\r\t\t$this->email->from('[email protected]', 'Wang Zihao');\r\t\t$this->email->to($email);\r\t\t$this->email->subject('Password & Membercard ID');\r\t\t$this->email->message(\"<p>Dear \".$title.\" \".$last_name.\",</p><br><p>Thank you for registration as member of CEGhypermarket!!</p><p>You account credential is as below:</p><br><p>account: \".$username.\"</p><p>password: \".$password.\"</p><p>member card nember: \".$member_card_number.\"</p><br><p>Hope you have a great time shopping with us!</p><br><br><P>Best Regards,</p><p>CEGhypermarket team</p>\");\r\t\t\r\t\t$this->email->send();\r\t\t$err = $this->email->print_debugger();\r\t\techo $err;\r\t}", "public function passwordRecovery($data){\n $email = $data['email'];\n $firstName = $data['firstName'];\n $lastName = $data['lastName'];\n $name = $firstName.' '.$lastName;\n $this->Email->from(array($this->noreply => $this->team));\n $this->Email->bcc(array($this->concierge => 'Concierge'));\n $this->Email->to(array($email => $name));\n $this->Email->emailFormat('both');\n\n $this->Email->subject('You have requested password recovery at '.$this->web.'!');\n $this->Email->template('passwordRecovery');\n\n $this->Email->viewVars(array('contentForEmail' => $data));\n return $this->Email->send();\n }", "function SentVerificationEmail($email,$username,$password){\n \t$to = $email;\n\t$subject = 'DoggieCare Forget Password';\n\t$message = 'Username ='.$username.' || Password='.$password;\n\t$headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\nmail($to, $subject, $message, $headers);\n \n }", "function sendMailForNewPassword($email, $link) {\r\n\r\n\t\t$message = \"<p>Bonjour,</p>\";\r\n\t\t$message .= \"<p>Veuillez cliquer sur le lien ci-dessous pour ré-initialiser votre mot de passe :<br>\";\r\n\t\t$message .= \"<a href=\" . $link . \" target'_blank'>\" . $link . \"</a><br></p>\";\r\n\t\t$message .= \"<p>Si vous n'avez pas demandé à réinitialiser votre mot de passe, ignorez cet email.<br></p>\";\r\n\t\t$message .= \"<p>Cordialement,<br>L'équipe du jeu \".SITE_NAME.\"</p>\";\r\n\r\n\t\t/*\r\n\t\t$subject = SITE_NAME.\" - Restauration du mot de passe\";\r\n\r\n\t\t//send the email\r\n\t\t$sent = mail($email,$subject,$message,$headers); \r\n\t\treturn $sent;\r\n\t\t*/\r\n\r\n\r\n\t\t$mail = new PHPmailer();\r\n $mail->IsSMTP();\r\n $mail->SMTPSecure = \"tls\";\r\n $mail->IsHTML(true);\r\n //$mail->SMTPDebug=true; \r\n\r\n // Connexion au serveur SMTP \r\n $mail->Host='smtp.gmail.com'; \r\n $mail->Port = 587;\r\n $mail->SMTPAuth = true; \r\n $mail->Username = '[email protected]'; \r\n $mail->Password = 'sutcabacool'; \r\n \t\t$mail->CharSet = 'UTF-8';\r\n\r\n\r\n\t\t$mail->From = \"[email protected]\";\r\n\t\t$mail->FromName = SITE_NAME;\r\n\t\t// Définition du sujet/objet\r\n\t\t$mail->Subject = SITE_NAME.\" - Restauration du mot de passe\";\r\n\t\t// On définit le corps du message\r\n\t\t$mail->Body = $message;\r\n\t\t// Il reste encore à ajouter au moins un destinataire\r\n\t\t$mail->AddAddress($email);\r\n\r\n\t\t// Pour finir, on envoi l'e-mail\r\n\t\t$sent = $mail->send();\r\n $mail->SmtpClose();\r\n // ferme la connexion smtp et désalloue la mémoire\r\n unset($mail);\r\n\t\treturn $sent;\r\n\t}", "public function RedefinePassword($user, $user_pass)\n {\n $link = base_url(\"admin/login\");\n\n // PHPMailer object\n $mail = $this->phpmailer_lib->load();\n\n // SMTP configuration\n $mail->isSMTP();\n $mail->SMTPAuth = true;\n $mail->Host = getenv('MAIL_HOST');\n $mail->Username = getenv('MAIL_USER');\n $mail->Password = getenv('MAIL_PASS');\n $mail->Port = intval(getenv('MAIL_PORT'));\n\n $mail->setFrom(getenv('MAIL_USER'), \"Sistema - \" . getenv('SIS_NAME'));\n $mail->addReplyTo(getenv('MAIL_USER'), \"Sistema - \" . getenv('SIS_NAME'));\n\n // Add a recipient\n $mail->addAddress($user->user_email, $user->user_name);\n\n // Email subject\n $mail->Subject = 'Senha alterada';\n\n // Charset\n $mail->CharSet = 'utf-8';\n\n //Language\n $mail->SetLanguage('pt-Br');\n\n\n // Set email format to HTML\n $mail->isHTML(true);\n\n // Email body content\n $mailContent = \"\n <div style=\\\"margin:0;padding:0;background-color:#f0f0f0;\\\">\n <div style=\\\"background-color:#f0f0f0; padding:5px;\\\">\n <div style=\\\"font-size:10px;line-height:10px\\\">&nbsp;</div>\n <table style=\\\"border-collapse:collapse;table-layout:fixed; margin: 20px auto 0;word-wrap:break-word;word-break:break-word;background-color:#ffffff\\\" align=\\\"center\\\">\n <tbody>\n <tr>\n <td style=\\\"padding:0;text-align:left;vertical-align:top;color:#787778;font-size:14px;line-height:21px;font-family:Ubuntu,sans-serif;width:600px\\\">\n <div style=\\\"Margin-left:20px;Margin-right:20px;Margin-top:24px\\\">\n <div style=\\\"line-height:20px;font-size:1px\\\">&nbsp;</div>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <h1 style=\\\"Margin-top:0;Margin-bottom:0;font-style:normal;font-weight:normal;color:#565656;font-size:36px;line-height:43px;text-align:center\\\">\n <strong>Redefinir Senha</strong>\n </h1>\n <p>Olá, <b>{$user->user_name}!</b>.<br/></p>\n <p style=\\\"background-color: #eeeeee; padding: 15px; position: relative; left: -15px;\\\">\n Sua senha foi alterada com sucesso. <br>\n Clique no <b>LINK</b> abaixo para acessar o painel.\n </p>\n <br/>\n <a href=\\\"{$link}\\\" style=\\\"font-family:'Arial',sans-serif; font-size: 17px; background-color: #5cb85c; padding: 15px; color: #FFFFFF; text-decoration: none;\\\">PAINEL</a>\n <br/>\n <br/>\n <p>Este e-mail é enviado pelo sistema, por favor não o responda.<br/>Qualquer dúvida entre em contato pelo e-mail <b>\" . getenv('MAIL_SUPORTE') . \"</b>.</p>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <div style=\\\"line-height:10px;font-size:1px\\\">&nbsp;</div>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <div style=\\\"line-height:10px;font-size:1px\\\">&nbsp;</div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"600\\\" align=\\\"center\\\" bgcolor=\\\"#e0ddd6\\\" border=\\\"0\\\" style=\\\"margin-bottom:20px;\\\">\n <tbody>\n <tr>\n <td width=\\\"15\\\"></td>\n <td>\n <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"600\\\" align=\\\"center\\\" bgcolor=\\\"#666666\\\" border=\\\"0\\\" style=\\\"border-bottom-left-radius:4px;border-bottom-right-radius:4px\\\">\n <tbody>\n <tr>\n <td height=\\\"14\\\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n <td width=\\\"15\\\"></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \";\n\n $mail->Body = $mailContent;\n\n $data = [\n 'user_pass' => $user_pass,\n 'user_cpass' => $user_pass,\n 'user_uuid' => $this->uuid->v4(),\n 'user_id' => $user->user_id\n ];\n\n // ATUALIZA SENHA\n if($this->user->updatePassword($data)):\n // Send email\n if(!$mail->send()):\n return $mail->ErrorInfo;\n \n else: \n return true;\n\n endif;\n\n else:\n return 'Erro ao atualizar senha, entre em contato com o suporte.';\n\n endif;\n \n }", "protected function password($options) {\n $element = new Password('passwordTxt');\n $element->setLabel('Password');\n $element->setAttribute('class', 'form-control');\n if($options['action'] == 'create' || ($options['action'] != 'create' && $this->request->getPost('passwordTxt')))\n {\n $validators = array( new PresenceOf(array('message' => 'Password is required')) );\n if($this->request->isPost() && $this->request->getPost('passwordTxt')){\n $validators[] = new StringLength(array(\n \"min\" => 8,\n \"max\" => 16,\n \"messageMaximum\" => \"Password must not be greater than 16 characters\",\n \"messageMinimum\" => \"Password must be between 8-16 characters\",\n ));\n }\n $element->addValidators($validators);\n $element->setUserOption('lblRequired', true);\n }\n $this->add($element); \n }", "public function sendMail($mail){\r\n\r\n\r\n\r\n\r\n $mail=str_secure($this->mail);\r\n\r\n $message=\"\r\n\r\n <b>Username: </b> $this->name;\r\n <b>$Password : </b> $this->password;\r\n\r\n \";\r\n\r\n\r\n\r\n\r\n return ($mail!=\"\")?mail($mail, \"Vos Identifiant\", $message):\" Ce mail n'est pas disponible\";\r\n\r\n\r\n\r\n }", "public function admin_mail_body($res,$key) {\n\n\t\t$ques = $this->_question->getquestion($res['question_id']);\n\n\t $url = Url::baseUrl().'/reset-password/token/'.$key;\n\n\t\t$output = '<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td><table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" style=\"border-collapse: collapse;\"><tr><td style=\"background: url('.Url::baseUrl().'/assets/img/bg.png) no-repeat;background-size: cover;padding: 50px 0;text-align: center;\"><img src=\"'.Url::baseUrl().'assets/img/logo-white.png\" style=\"width: 300px;\"></td></tr><tr><td style=\"padding: 40px;\"><table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td style=\"padding: 10px 0; \">Hello '.$res['username'].',</td></tr><tr><td style=\"padding: 10px 0; \">You are receiving this email because you contacted ADMIN for assistance regarding your \"Security Answer\" to reset your password. Please take note of your registered security answer below and click \"Reset Password\" to proceed</td></tr><tr><td style=\"padding: 20px;\"><table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td style=\"width: 150px; padding: 5px 0;\">Security Question</td><td>'.$ques['security_question'].'</td></tr><tr><td style=\"width: 150px; padding: 5px 0;\">Security Answer</td><td>'.$res['answer'].'</td></tr><tr><td colspan=\"2\" style=\"text-align: center; height: 80px; padding: 10px;\"><a href=\"'.$url.'\" style=\"padding: 10px; background: #f5f5f5; border: 1px solid #b2b2b2; text-transform: uppercase; text-decoration: none; color: #000\">Reset Password</a></td></tr></table></td></tr><tr><td style=\"padding: 20px 0 0 0;\">Best Regards,</td></tr><tr><td style=\"font-weight: 600;\">MSW ADMIN</td></tr></table></td></tr><tr><td style=\"background: url('.Url::baseUrl().'/assets/img/bg.png) no-repeat;background-size: cover;padding: 10px 0;text-align: center;\"></td></tr></table></td></tr></table>';\n\n\t\treturn $output;\n\t}", "function QuenPass(&$error){\n\t\t\t\t$success=true;\n\t\t\t\t$email=$_POST['email'];\n\t\t\t\ttrim(strip_tags($email));\n\t\t\t\tif(get_magic_quotes_gpc()==false)\n\t\t\t\t\t$email=mysql_real_escape_string($email);\n\t\t\t\tif($email==NULL){\n\t\t\t\t\t$success=false;\n\t\t\t\t\t$error['send-pass']=\"Vui lòng nhập địa chỉ email.\";\n\t\t\t\t\treturn false;\n\t\t\t\t}elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$error['send-pass'] = \"Dạng thức email sai.\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\t\n\t\t\t\t$checkMail=$this->KTEmail($email);\n\t\t\t\tif($checkMail==false){\n\t\t\t\t\t$success=false;\n\t\t\t\t\t$error['send-pass']=\"Email không tồn tại.\";\n\t\t\t\t}\n\t\t\t\tif($success==true){\n\t\t\t\t\t$rdk=$this->ChuoiNgauNhien(128);\n\t\t\t\t\t$sql=\"UPDATE user SET randomKey='$rdk' WHERE email='$email'\";\n\t\t\t\t\tmysql_query($sql) or die(mysql_error());\t\n\t\t\t\t\t//Send email to customer\n\t\t\t\t\trequire_once \"email/smtp.php\";\n\t\t\t\t\t$subject=\"Bạn quên mật khẩu?\";\n\t\t\t\t\t$content=file_get_contents(\"email/form/changePassword.php\");\n\t\t\t\t\t$link = \"http://www.bitas.com.vn/user/quen-mat-khau-doi-mat-khau/\";\n\t\t\t\t\t$link = $link . \"$rdk/$email/\";\n\t\t\t\t\t$content=str_replace(\"{link}\",$link,$content);\n\t\t\t\t\t$frommail=\"[email protected]\";\n\t\t\t\t\t$tomail=\"$email\";\n\t\t\t\t\tSendMail($frommail,$tomail,$subject,$content);\n\t\t\t\t\t$_SESSION['thongbao_success']=\"Chúng tôi đã gửi email cho bạn với những hướng dẫn để thiết lập lại mật khẩu. Hãy kiểm tra hộp thư đến của bạn và bấm vào liên kết được cung cấp.\";\n\t\t\t\t}\n\t\t\t\treturn $success;\n\t\t\t}", "function sendUserForgotPassword($argArrPOST) {\n\n @extract($argArrPost);\n $objValid = new Validate_fields;\n $objCore = new Core();\n $objValid->check_4html = true;\n\n $objValid->add_text_field('Email', strip_tags($argArrPOST['frmUserLoginEmail']), 'email', 'y');\n\n if ($objValid->validation()) {\n $errorMsgFirst = 'Please enter valid email address!';\n } else {\n $errorMsg = $objValid->create_msg();\n }\n if ($errorMsg) {\n $objCore->setErrorMsg($errorMsg);\n return false;\n } else {\n $arrUserFlds = array('pkUserID', 'UserFirstName', 'UserEmail', 'UserPassword');\n $varUserWhere = ' 1 AND UserEmail = \\'' . trim($argArrPOST['frmUserLoginEmail']) . '\\'';\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if ($arrUserList) {\n //update the random key in the database\n\n $varRandomPassword = $this->generate_random_string(5); //die;\n\n\n $varRandomKey = md5(uniqid(microtime()));\n $arrUpdateArray = array('UserAuthorizationToken' => $varRandomKey, 'UserPassword' => md5($varRandomPassword));\n $varaffectedRecord = $this->update(TABLE_USERS, $arrUpdateArray, $varUserWhere);\n\n\n\n $argUserName = $arrUserList[0]['UserEmail'];\n //$argPassword = $arrUserList[0]['UserPassword'];\n $argPassword = $varRandomPassword;\n $argFirstName = $arrUserList[0]['UserFirstName'];\n\n //Send forget Password To User\n $varPath = '<img src=\"' . SITE_ROOT_URL . 'common/images/logo2.png' . '\"/>';\n\n $varToUser = $argArrPOST['frmUserLoginEmail'];\n $varFromUser = SITE_NAME . '<' . SITE_EMAIL_ADDRESS . '>';\n $varSubject = 'Venueset:Login Details';\n $varResetPasswordlink = '<a href=\"' . SITE_ROOT_URL . 'reset_password.php?userId=' . $arrUserList[0]['pkUserID'] . '&authorizationToken=' . base64_encode($varRandomKey) . '\">Reset Password</a>';\n $varOutput = file_get_contents(SITE_ROOT_URL . 'common/email_template/html/user_forget_password.html');\n $varUnsubscribeLink = 'Click <a href=\"' . SITE_ROOT_URL . 'unsubscribe.php?user=' . md5(trim($argArrPOST['frmUserLoginEmail'])) . '\" target=\"_blank\">here</a> to unsubscribe.';\n\n $arrBodyKeywords = array('{USER_FIRST_NAME}', '{USER_NAME}', '{USER_PASSWORD}', '{IMAGE_PATH}', '{SITE_NAME}', '{RESET_PASSWORD_LINK}', '{UNSUBSCRIBE_LINK}');\n\n $arrBodyKeywordsValues = array($argFirstName, $argUserName, $argPassword, $varPath, SITE_NAME, $varResetPasswordlink, $varUnsubscribeLink);\n $varBody = str_replace($arrBodyKeywords, $arrBodyKeywordsValues, $varOutput);\n //echo $varBody;die;\n $objCore->sendMail($varToUser, $varFromUser, $varSubject, $varBody);\n $objCore->setSuccessMsg(FRON_END_USER_FORGET_PASSWORD_SEND);\n return true;\n } else {\n $objCore->setErrorMsg(FRON_END_USER_EMAIL_EXIST_ERROR);\n return false;\n }\n }\n }", "function forgot_password() {\n $datos['titulo'] = \"Restablecer Contraseña\";\n $this->render_page('usuarios/forgot_password', $datos);\n }", "public function forgotpassword() {\n\n\t\t$login_box_visiblity = '';\n\t\t$forgot_box_visiblity = 'visible';\n\n\t\t$this->JQValidator->addValidation('User', $this->User->validate, 'UserLoginForm');\n\t\t$this->JQValidator->addValidation('ForgotPasswordForm', $this->ForgotPasswordForm->validate, 'ForgotPasswordForm');\n\n\t\t$this->set(compact('login_box_visiblity', 'forgot_box_visiblity'));\n\n\t\tif (array_key_exists('ForgotPasswordForm', $this->data)) {\n\t\t\t$flag = $this->ForgotPassword->sendMail($this->data['ForgotPasswordForm'], 'admin');\n\n\t\t\tif ($flag) {\n\t\t\t\t$this->redirect('login');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->login();\n\t\t}\n\t}", "protected function composeEmailToUser()\n\t{\n\t\t$theURL = ( empty($this->myReentryURL) ?\n\t\t\t\t$this->composeReentryURL() : $this->myReentryURL ) ;\n\t\t$s = $this->model->getRes( 'account/email_body_pwd_reset_instr/'\n\t\t\t. $this->myEmailAddr . '/'\n\t\t\t. $this->getRandomCharsFromToken() )\n\t\t\t. '<a href=\"' . $theURL . '\">' . $theURL . '</a>'\n\t\t\t;\n\t\treturn $s ;\n\t}" ]
[ "0.75584584", "0.7238033", "0.7020873", "0.69817704", "0.6907169", "0.6895449", "0.6877657", "0.6840177", "0.6819303", "0.680018", "0.67783195", "0.67714113", "0.6769879", "0.6761599", "0.67610735", "0.6716332", "0.6715631", "0.66895866", "0.66895866", "0.66895866", "0.66895866", "0.66895866", "0.66895866", "0.66895866", "0.6572222", "0.65615696", "0.6542796", "0.6540663", "0.6531813", "0.6531813", "0.6531813", "0.6531813", "0.6531813", "0.6531813", "0.6523386", "0.65024954", "0.6500259", "0.6492566", "0.64855254", "0.6467757", "0.6461139", "0.64334935", "0.64323056", "0.64226544", "0.64145577", "0.64117044", "0.640786", "0.6397113", "0.63900155", "0.6383604", "0.6380567", "0.63466316", "0.6346344", "0.63458353", "0.63270974", "0.6325849", "0.6325569", "0.63242644", "0.63206136", "0.63106096", "0.63015056", "0.6294659", "0.6291939", "0.629058", "0.6287023", "0.62868315", "0.62860304", "0.6276278", "0.6270332", "0.62644494", "0.6262581", "0.6261233", "0.6260733", "0.6258694", "0.6257267", "0.62556696", "0.6249391", "0.6243303", "0.62422633", "0.62366396", "0.623542", "0.62287295", "0.62237805", "0.62237805", "0.62237805", "0.62229526", "0.62177366", "0.6216615", "0.62157404", "0.62116104", "0.6203765", "0.6203685", "0.61954015", "0.6188986", "0.6177272", "0.61769235", "0.61750853", "0.6174569", "0.61723924", "0.61608815" ]
0.66995174
17
ajPassword edit method API
public function ajPasswordEdit() { $this->autoRender = false; $this->response->type('application/json'); if (!$this->request->is("ajax")) { $this->responseData['error'] = array('code' => 600, 'msseage' =>$this->convertErrorMessage(600)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } if (!$this->requestData) { $this->responseData['error'] = array('code' => 601, 'msseage' =>$this->convertErrorMessage(601)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } $user = $this->Users->find()->where([ 'Users.id' => $this->requestData['id'], 'Users.is_added' => 1, 'Users.is_deleted'=> 0 ])->first(); if (!$user) { $this->responseData['error'] = array('code' => 600, 'msseage' =>$this->convertErrorMessage(600)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } $closeDate = new Time('-1 day'); $updateDate = new Time($user->update_at); if(strtotime($closeDate) > strtotime($updateDate)) { $this->responseData['error'] = array('code' => 808, 'msseage' =>$this->convertErrorMessage(808)); $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); return; } $user->password = password_hash($this->requestData['password'], PASSWORD_DEFAULT); $user->update_user = $user->id; $user->update_at = date('Y-m-d H:i:s'); try { if ($this->Users->save($user)) { $this->responseData['success'] = 0; // mail $email = new UserEmail('default'); $email->passwordSetMail($user); } else { $this->responseData['error'] = array('code' => 802, 'msseage' =>$this->convertErrorMessage(802)); } } catch (Exception $e) { $this->responseData['error'] = array('code' => 802, 'msseage' =>$this->convertErrorMessage(802)); } $this->response->getBody()->write(json_encode($this->responseData, JSON_UNESCAPED_UNICODE)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function changePassword() {}", "public function editPassword(){\n return view(editPassword);\n }", "public function editPassword(){\n \treturn view('auth.passwords.changePass');\n }", "public function testUpdatePasswordNotGiven(): void { }", "function update_password()\n {\n }", "public function editPassword()\n {\n $this->load_view('Profil Akun', 'user/gantiPassword');\n }", "public function setPassword(){\n\t}", "public function setPassword($value);", "public function update_password($id, $password);", "public function changepass($id=null){\n\n }", "public function setpasswordAction(){\n $req=$this->getRequest();\n $cu=$this->aaac->getCurrentUser();\n $password=$this->getRequest()->getParam('password');\n $record=Doctrine_Query::create()->from('Users')->addWhere('ID=?')->fetchOne(array($req->getParam('id'))); \n $record->password=md5($password);\n if(!$record->trySave()){\n $this->errors->addValidationErrors($record);\n }\n $this->emitSaveData(); \n }", "public function changePasswordAction(){\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['password']) && isset($data['repeat_password'])){\n if($data['password'] === $data['repeat_password']){\n $user->setPassword($data['password']);\n } else {\n $this->setErrorResponse('password and repeat_password should match!');\n }\n } else {\n $this->setErrorResponse('password and repeat_password is mandatory fields!');\n }\n $this->_helper->json(array('updated' => true));\n }", "public function update_password() {\n $this->authenticate->check();\n $data['title'] = translate('change_password');\n $city_join = array(\n array(\n 'table' => 'app_services',\n 'condition' => 'app_city.city_id=app_services.city',\n 'jointype' => 'inner'\n )\n );\n $top_cities = $this->model_customer->getData('app_city', 'app_city.*', 'app_services.status=\"A\"', $city_join, 'city_id', 'city_id', '', 12, array(), '', array(), 'DESC');\n $data['topCity_List'] = $top_cities;\n $this->load->view('front/profile/change_password', $data);\n }", "public function setPassword($newPassword);", "public static function edit_account() {\n\t\t$user_id = get_current_user_id();\n\t\t$form_id = ur_get_form_id_by_userid( $user_id );\n\t\t$enable_strong_password = ur_get_single_post_meta( $form_id, 'user_registration_form_setting_enable_strong_password' );\n\t\t$minimum_password_strength = ur_get_single_post_meta( $form_id, 'user_registration_form_setting_minimum_password_strength' );\n\n\t\tif ( 'yes' === $enable_strong_password || '1' === $enable_strong_password ) {\n\t\t\twp_enqueue_script( 'ur-password-strength-meter' );\n\t\t}\n\n\t\tur_get_template(\n\t\t\t'myaccount/form-edit-password.php',\n\t\t\tarray(\n\t\t\t\t'user' => get_user_by( 'id', get_current_user_id() ),\n\t\t\t\t'enable_strong_password' => $enable_strong_password,\n\t\t\t\t'minimum_password_strength' => $minimum_password_strength,\n\t\t\t)\n\t\t);\n\t}", "public function testUpdatePasswordOnlyNumbers(): void { }", "public function olvidoPassword(){\n\t}", "function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}", "public function edit_password_mahasiswa()\n\t{\n\t\t$data['edit'] = $this->m_aka->edit_mahasiswa();\n\t\t$data['content'] = 'password/edit_password_mahasiswa';\n\t\t$this->load->view('content', $data);\n\t\t\n\t}", "public function getPasswordChangeForm();", "public function editPasswordAdmin()\n {\t\n \treturn view('setting.edit-password-admin');\n }", "public function updatePassword()\n {\n $session = \\Config\\Services::session();\n if ($session->status != 'pengguna') {\n return redirect()->to('/dashboard');\n }\n\n\n $model = new PenggunaModel();\n helper('form');\n $this->form_validation = \\Config\\Services::validation();\n\n\n $password = password_hash($this->request->getPost('password'), PASSWORD_DEFAULT);\n\n $data = [\n 'NIK' => $this->request->getPost('NIK'),\n 'password' => $this->request->getPost('password'),\n 'password2' => $this->request->getPost('password2'),\n ];\n\n $id = $this->request->getPost('NIK');\n\n if ($this->form_validation->run($data, 'editPassword') == FALSE) {\n $error = $this->form_validation->listErrors();\n session()->setFlashdata('error', '<br><small class=\"red-text\">\n ' . $error . '</small>');\n return redirect()->to($_SERVER['HTTP_REFERER']);;\n } else {\n $data['password'] = $password;\n unset($data['password2']);\n $model->updatePengguna($data, $id);\n session()->setFlashdata('tipe', 'password');\n session()->setFlashdata('success', 'diubah');\n return redirect()->to('http://localhost:8080/profile/');\n }\n }", "public function testUpdatePasswordsDontMatch(): void { }", "public function edit()\n {\n return view('auth.change-password');\n }", "public function changePasswordAction()\r\n\t{\r\n\t\t$this->_view->_title = 'Thay đổi mật khẩu';\r\n\r\n\t\tif ($this->_arrParam['form']['token'] > 0) {\r\n\r\n\t\t\t$new = $this->_arrParam['form']['new-password'];\r\n\t\t\t$enter = $this->_arrParam['form']['enter-password'];\r\n\r\n\t\t\tif ($new != $enter) {\r\n\t\t\t\t$this->_view->error = 'Mật khẩu không khớp. Xin kiểm tra lại';\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$this->_model->changePassword($this->_arrParam);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// URL::redirect($this->_arrParam['module'], $this->_controller, 'index');\r\n\r\n\r\n\r\n\t\t$this->_view->render(\"{$this->_controller}/change_password\");\r\n\t}", "public function modifpassword($user,$passwd){\n \n }", "public function actionPassword()\n {\n if (is_null($this->password)) {\n self::log('Password required ! (Hint -p=)');\n return ExitCode::NOUSER;\n }\n\n if (is_null($this->email) && is_null($this->id)) {\n self::log('User ID or Email required ! (Hint -e= or -i=)');\n return ExitCode::DATAERR;\n }\n\n $model = User::find()->where([\n 'OR',\n [\n 'email' => $this->email\n ],\n [\n 'id' => $this->id\n ]\n ])->one();\n\n if (is_null($model)) {\n\n self::log('User not found');\n\n return ExitCode::NOUSER;\n }\n\n $validator = new TPasswordValidator();\n\n $model->password = $this->password;\n\n $validator->validateAttribute($model, \"password\");\n\n if ($model->errors) {\n\n self::log($model->errorsString);\n\n return ExitCode::DATAERR;\n }\n\n $model->setPassword($this->password);\n\n if (! $model->save()) {\n\n self::log('Password not changed ');\n\n return ExitCode::DATAERR;\n }\n\n self::log($this->email . ' = Password successfully changed !');\n\n return ExitCode::OK;\n }", "public function actionChangePassword()\n {\n $this->render('changePassword');\n }", "public function setPasswordField($password = true) {}", "public function password()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n if ($_POST) {\n\n if (!$_POST['old-password'] && !$_POST['new-password']) {\n\n $userModel = new UserModel();\n\n $validateResult = $userModel->validate($_POST);\n\n if ($validateResult === true) {\n\n $checkPassword = $userModel->checkOldPassword($_POST['old-password']);\n\n if ($checkPassword) {\n\n if ($userModel->refreshPassword($_POST)) {\n\n $this->data['success'] = 'Пароль успешно изменен';\n\n } else {\n\n $this->data['warning'] = 'Произошла ошибка';\n }\n\n } else {\n\n $this->data['warning'] = 'Старый пароль введен не правильно';\n }\n\n } else {\n\n $this->data['warning'] = $validateResult;\n }\n\n } else {\n\n $this->data['warning'] = 'Все поля должны быть заполнены';\n }\n }\n\n $this->render('password');\n }", "function update_paypassword()\n {\n }", "public function setPassword($newPassword){\n\t}", "public function actionUpdatePassword(){\r\n //common view data\r\n $mainCategories = $this->mainCategories;\r\n $brands = $this->brands;\r\n \r\n $errors = [];\r\n $success = null;\r\n \r\n //check if the user is logged in and get User $user properties from the database\r\n $userID = $this->checkLogged();\r\n $success = null;\r\n \r\n //check if the form has been submitted and process form data\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n $currentPassword = filter_input(INPUT_POST, 'currentPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n $newPassword = filter_input(INPUT_POST, 'newPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n $confirmNewPassword = filter_input(INPUT_POST, 'confirmNewPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n \r\n $model = new ChangePasswordForm($userID, $currentPassword, $newPassword, $confirmNewPassword);\r\n \r\n if(!$model->validate()) {\r\n $errors = $model->errors;\r\n } else if(!$model->verifyPassword()) {\r\n $errors['currentPassword'][0] = 'Incorrect password';\r\n } else {\r\n $success = $model->updatePassword() ? 'PASSWORD SUCCESSFULLY UPDATED' : 'ERROR UPDATING PASSWORD';\r\n }\r\n }\r\n \r\n include_once ROOT . '/views/profile/changepass.php';\r\n \r\n }", "public function editPassword()\n\t{\n\t\t$data['active'] = 9;\n\t\t$this->load->view('skin/front_end/header_company_page_topbar');\n\t\t$this->load->view('skin/front_end/navbar_company_page', $data);\n\t\t$this->load->view('content_front_end/company_password_page');\n\t\t$this->load->view('skin/front_end/footer_company_page');\n\t}", "public function userPasswordUpdate() {\n $password = Hash::make($this->request->input(\"new_password\"));\n $updateArray = [\n \"password\" => $password\n ];\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }", "public function passwordAction(){\r\n $this->view->password = '';\r\n }", "public function editPassword($pword)\n\t\t{\n\t\t\tglobal $password;\n\t\t\tglobal $user_id;\n\t\t\n\t\t\t$pword = addslashes($pword);\n\n\t\t\tif(strlen($pword) <= 32)\n\t\t\t{\n\t\t\t$qry = 'UPDATE admin_table SET password = \"' . $pword . '\" WHERE user_id = '. $user_id;\n\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t\t}\n\t\t\n\t\t\t$password = $pword;\n\t\t}", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "public function changePasswordAction()\n {\n if ($this->request->isPost()) {\n // Request data\n $data = $this->request->getPost();\n\n $formValidator = $this->createValidator([\n 'input' => [\n 'source' => $data,\n 'definition' => [\n 'password' => new Pattern\\Password,\n 'confirmation' => new Pattern\\PasswordConfirmation($data['password'])\n ]\n ]\n ]);\n\n if ($formValidator->isValid()) {\n // Update current password\n $userService = $this->getModuleService('userService');\n $userService->updatePasswordById($this->getUserId(), $data['password']);\n\n $this->flashBag->set('success', 'Your password has been updated successfully');\n return 1;\n\n } else {\n return $formValidator->getErrors();\n }\n \n } else {\n // Just render empty form\n return $this->view->render('settings/change-password');\n }\n }", "function changepassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['hash'] =User::userid();\n // Render the action with template\n $this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n }", "public function change_password()\n {\n return view('backend.profile.change-password');\n }", "public function password()\n {\n return view('account.account.change-password');\n }", "public function actionPassword()\n {\n $id = Yii::$app->user->id;\n\t\t$model = $this->findModel($id);\n\t\t$model->scenario = 'password';\n if ($model->load(Yii::$app->request->post())) {\t\n\t\t\tif(!Yii::$app->security->validatePassword($model->old_password, Yii::$app->user->identity->password_hash)){\n\t\t\t\tYii::$app->getSession()->setFlash('error', 'Old password not match with current password');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$model->password = $model->new_password;\n\t\t\t\tif($model->save()) {\n\t\t\t\t\tYii::$app->getSession()->setFlash('success', 'Password have changed.');\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tYii::$app->getSession()->setFlash('error', 'Password is not change.');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->redirect(['password']);\n } else {\n return $this->render('password', [\n 'model' => $model,\n ]);\n }\n }", "public function actionPassword() {\n\t\t$content = ModelBase::factory('Setting')->handlePassword($this->data);\n\n\t\tif ($content->get('updated')) $this->setAlert('info', 'Password terupdate!');\n\n\t\t// Template configuration\n\t\t$this->layout = 'modules/setting/index.tpl';\n\t\t$data = ModelBase::factory('Template')->getSettingData(compact('content'));\n\n\t\t// Render\n\t\treturn $this->render($data);\n\t}", "public function change_password() {\n\t\treturn view( 'provider.profile.change_password' );\n\t}", "public function updatePassword(UserInterface $user);", "public function update()\n {\n $new_password = $this->input->post('inputNewPassword');\n if ($this->authentication->change_password($new_password))\n {\n $this->flash_message('Password Akun Berhasil di Update');\n } else {\n $this->flash_message('Password Akun Gagal di Update');\n }\n redirect($this->data['user'].'/editPassword');\n }", "public function edit(Passwords $passwords)\n {\n \n }", "public function edit_pw($user_id){\n\t\t$this->load->model('dashboard');\n\t\t$update=$this->dashboard->update_pass($this->input->post(),$user_id);\n\t\tredirect(\"/\");//temp, TODO:need to figure out redirect here\n\t}", "public function edit_password_akademik()\n\t{\n\t\t$data['edit'] = $this->m_aka->edit_data_staff_akademik();\n\t\t$data['content'] = 'password/edit_password_akademik';\n\t\t$this->load->view('content', $data);\n\t\t\n\t}", "public function necesitaCambiarPassword();", "public function actionChangePassword()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', ['required' => true]);\n $model = $this->findModel($username);\n $model->setPassword($this->prompt(Console::convertEncoding(Yii::t('app', 'New password')) . ':', [\n 'required' => true,\n 'pattern' => '#^.{4,255}$#i',\n 'error' => Console::convertEncoding(Yii::t('app', 'More than {:number} symbols', [':number' => 4])),\n ]));\n $this->log($model->save());\n }", "public function testUpdatePasswordOnlyUpperCase(): void { }", "function ciniki_users_changePassword($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'oldpassword'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Old Password'), \n 'newpassword'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'New Password'), \n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n \n if( strlen($args['newpassword']) < 8 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.20', 'msg'=>'New password must be longer than 8 characters.'));\n }\n\n //\n // Check access \n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'checkAccess');\n $rc = ciniki_users_checkAccess($ciniki, 0, 'ciniki.users.changePassword', 0);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Check old password\n //\n $strsql = \"SELECT id, email FROM ciniki_users \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $ciniki['session']['user']['id']) . \"' \"\n . \"AND password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['oldpassword']) . \"') \";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.users', 'user');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Perform an extra check to make sure only 1 row was found, other return error\n //\n if( $rc['num_rows'] != 1 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.21', 'msg'=>'Invalid old password'));\n }\n\n //\n // Turn off autocommit\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the password, but only if the old one matches\n //\n $strsql = \"UPDATE ciniki_users SET password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['newpassword']) . \"'), \"\n . \"last_updated = UTC_TIMESTAMP(), \"\n . \"last_pwd_change = UTC_TIMESTAMP() \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $ciniki['session']['user']['id']) . \"' \"\n . \"AND password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['oldpassword']) . \"') \";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUpdate');\n $rc = ciniki_core_dbUpdate($ciniki, $strsql, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.users');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.22', 'msg'=>'Unable to update password.'));\n }\n\n if( $rc['num_affected_rows'] < 1 ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.users');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.23', 'msg'=>'Unable to change password.'));\n }\n\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.24', 'msg'=>'Unable to update password.'));\n }\n\n return array('stat'=>'ok');\n}", "public function change_password()\n {\n $view_data = [\n 'form_errors' => []\n ];\n // Check input data\n if ($this->input->is_post()) {\n\n // Call API to register for parent\n $res = $this->_api('user')->change_password($this->input->post());\n\n if ($res['success'] && !isset($res['invalid_fields'])) {\n $this->_flash_message('パスワードを変更しました');\n redirect('setting');\n return;\n }\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n\n $this->_render($view_data);\n }", "public function putChangePasswordAction(Request $request): JsonResponse;", "public function changeUserPassword($uid,$newPassword);", "public function actionUpdatePassword()\n\t{\n\t\t$emp_id=isset($_POST['emp_id'])?$_POST['emp_id']:'';\n\t\t$old_password=isset($_POST['old_password'])?$_POST['old_password']:'';\n\t\t$new_password=isset($_POST['password'])?$_POST['password']:'';\n\t\tif($emp_id)\n\t\t{\n\t\t\t$model=$this->loadModel($emp_id);\t\n\t\t}\n\t\t\n\t\tif(md5($old_password)==$model->password)\n\t\t{\n\t\t\t$model->password=md5($new_password);\n\t\t\tif($model->save())\n\t\t\t\techo 1;\n\t\t}\n\t\telse{\n\t\t echo 2;\t\n\t\t}\n\t\t\n\t\t}", "public function updatePassword(ExtendedUserInterface $user);", "public function changepassword()\n { \n return view('admin.profile.changepassword');\n }", "public function testUpdatePasswordOnlyLowerCase(): void { }", "public function updatePasswordAction() {\n global $config;\n header('Content-Type: application/json');\n $validPassword=false;\n if (isset($_POST[\"currentPassword\"]) &&$_POST[\"currentPassword\"]!=\"\") {\n foreach ($this->users as $user) {\n if ($config[\"userAdmin\"] == $user[\"username\"]) {\n if (generatePasswordHash($_POST[\"currentPassword\"]) == $user[\"password\"]) {\n $validPassword=true;\n }\n break;\n }\n }\n }\n if (!$validPassword) {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"wrong current password\"));\n return;\n }\n if (!isset($_POST[\"user\"])||($_POST[\"user\"]!=$config[\"userAdmin\"]&&$_POST[\"user\"]!=$config[\"userGuest\"])) {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"invalid user\"));\n return;\n }\n if (!isset($_POST[\"newPassword\"])||$_POST[\"newPassword\"]==\"\") {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"invalid new password\"));\n return;\n }\n $updatedPassword=false;\n $userPos=0;\n\n foreach ($this->users as $user) {\n if ($_POST[\"user\"] == $user[\"username\"]) {\n $this->users[$userPos][\"password\"]=generatePasswordHash($_POST[\"newPassword\"]);\n $updatedPassword=true;\n break;\n }\n $userPos++;\n }\n \n\n if ($updatedPassword) {\n $this->save();\n echo json_encode(array(\"success\"=>true));\n return;\n } else {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"cant update the password\"));\n return;\n }\n\n }", "public function setPassword($password);", "public function setPassword($password);", "public function setPassword($password);", "public function ov_password($name, $value = ''){\n $args = func_get_args(); array_shift($args); array_shift($args);\n return $this->generate_input('password', $name, $value, false, $args);\n }", "public function testUpdateCPasswordNotGiven(): void { }", "public static function renderPassword();", "public function changePW()\n {\n $id = $_GET['id'];\n $passwordInDB = $this->model->getPasswordInDB($id);\n // $passwordInDB = $_SESSION['user']['password'];\n $password = $_POST['password'];\n $password_confirm = $_POST['password_confirm'];\n $verifOldPW = password_verify($_POST['old-password'], $passwordInDB['password']);\n $regexCharacterChoice = '/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\\W)/';\n $errors = [];\n \n if ($verifOldPW === false) {\n $errors['password'] = 'Votre ancien mot de passe est incorrect';\n $this->model->setFlash('danger', 'Votre ancien mot de passe est incorrect');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if (empty($password) || strlen($password) < 8 || !preg_match($regexCharacterChoice, $password)) {\n $errors['password'] = 'Vous devez rentrer un mot de passe valide';\n $this->model->setFlash('danger', 'Vous devez rentrer un mot de passe valide');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if ($password != $password_confirm) {\n $errors['password'] = 'Les mots de passe ne correspondent pas';\n $this->model->setFlash('danger', 'Les mots de passe ne correspondent pas');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if (empty($errors)) {\n $this->model->changePW();\n $this->model->setFlash('success', 'Votre mot de passe a bien été modifié');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n }", "public function setPassword($id,$newpass){\n $consulta = $this->find($id)->current();\n $consulta->password = $newpass;\n $consulta->save();\n }", "public function editUserPasswordChk() {\r\n\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_password');\r\n $condition_to_pass = array(\"user_password\" => base64_encode($this->input->post('old_user_password')));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'true';\r\n } else {\r\n echo 'false';\r\n }\r\n }", "public function account_change_password()\n\t{\n\t\t$user_session = $this->session->all_userdata();\n\t\t$user_id = $user_session['user_id'];\n\t\t\n\t\t// print_r($user_id);\n\t\t// die;\n\n\t\t$new_password = $this->input->post('new_password');\n\t\t$retype_password = $this->input->post('retype_password');\n\n\t\tif ($new_password != $retype_password)\n\t\t{\n\t\t\t$this->system_message->set_error(\"Password Miss Match\");\n\n\t\t}\n\t\telse{\n\t\t\t$data = array('password' => $this->input->post('new_password'));\n\t\t\tif (!empty($new_password) && !empty($retype_password))\n\t\t\t{\n\t\t\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t\t\t{\n\t\t\t\t\t$this->custom_model->my_update(array('password_show'=>$new_password),array('id' => $user_id),'admin_users');\n\t\t\t\t\techo \"success\"; die;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"error\"; die;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"error\"; die;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function changePassword()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('change-password');\n\n return $this->loadPublicView('user.change-password', $breadCrumb['data']);\n }", "public function showEditPassword()\n {\n return view('pages.settings.password.index');\n }", "public function changePassword(Request $request){\n DB::table('users')\n ->where('id', 1)\n ->update(['password' => $request->get('password')]);\n return view('updatePassword') ; \n }", "public function get_change_password() {\n return View::make('login.change-password');\n }", "public function password()\n {\n }", "public function change_pass()\n\t{\n\t\t$form = array();\n\n\t\t$form['validation']['params'] = array('password_old', 'password', 'password_confirm');\n\n\t\t$form['submit'] = function ($params) {\n\t\t\treturn $this->_change_pass_submit();\n\n\n\t\t};\n\n\t\t$form['form'] = function () {\n\t\t\tpage_info('title', lang('title_change_pass'));\n\n\t\t\t$this->_display();\n\t\t};\n\n\t\t$this->_form($form);\n\t}", "public function restPassword(){\n\t}", "public function editPassword(Request $request)\n {\t\n //memastikan hanya peserta yang aktif hanya bisa mengubah passwordnya\n $peserta = $request->user()->peserta()->get()->toArray();\n $daftar = Daftar::all()->where('aktif',1)->toArray();\n\n if(empty($peserta) && empty($daftar) && Laratrust::hasRole('peserta')){\n Auth::logout();\n return redirect('/');\n }\n \n \treturn view('setting.edit-password');\n }", "public function c_changepass(){\n\t\t\n\t\t$this->getC();\n\t\t$this->layout = false;\n\t\tif ($this->request->is('post')) {\n\t\t\t$customers = $this->Customers->get($this->request->session()->read('id'), [\n\t\t\t\t'contain' => []\n\t\t\t]);\n\t\t\t$pass = $this->request->data['data']['Customers']['oldpassword'];\n\t\t\t$new = $this->request->data['data']['Customers']['password'];\n\t\t\tif(!empty($customers)){\n\t\t\t\n\t\t\t\tif($this->request->data['data']['Customers']['cpassword']==$this->request->data['data']['Customers']['oldpassword']){\n\t\t\t\t\t$this->request->data['password']=$new;\n\t\t\t\t\t$customer = $this->Customers->patchEntity($customers, $this->request->data);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->Customers->save($customer)) {\n\t\t\t\t\t\t$this->Flash->success('Password has been successfully updated.');\n\t\t\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->Flash->success('Wrong Password. Please try again.');\n\t\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$this->Flash->success('Wrong Password. Please try again.');\n\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t}\n\t\t}\n\t}", "function savePassword()\n {\n // get real current password from database\n $realPassword = null;\n $dataReturn = $this->model->khachhang->getCustomerPassword($_SESSION['idUser']);\n if (!empty($dataReturn)) {\n $realPassword = $dataReturn['matKhau'];\n }\n // data user enter in form change password\n $currentPasswordText = isset($_POST['customer_password_current']) ? $_POST['customer_password_current'] : '';\n // kiem tra mat khau hien tai nhap vao co giong voi mat khau trong CSDL la $realPassword hay khong ?\n if (!password_verify(addslashes($currentPasswordText . $_SESSION['email']), $realPassword)) {\n // neu khong trung khop\n $_SESSION['error-changePassCustomer'] = 'Mật khẩu hiện tại không đúng !';\n redirect('user/changePassword');\n } else {\n $newPasswordText = isset($_POST['customer_password_new']) ? $_POST['customer_password_new'] : '';\n $resultUpdate = $this->model->khachhang->updateCustomerPassword($_SESSION['idUser'], $newPasswordText);\n if ($resultUpdate) {\n // neu luu mat khau moi thanh cong\n $_SESSION['success-changePassCustomer'] = 'Đổi mật khẩu mới thành công !';\n redirect('user/index');\n } else {\n\n }\n }\n }", "public function edit_postAction() {\n $info = $this->getPost(array('uid', 'groupid', 'password', 'r_password', 'status'));\n if ($info['password']) {\n //if ($info['password'] == '') $this->output(-1, '密码不能为空.');\n if (strlen($info['password']) < 5 || strlen($info['password']) > 16) $this->output(-1, '用户密码长度5-16位之间');\n if ($info['password'] !== $info['r_password']) $this->output(-1, '两次密码输入不一致');\n }else {\n unset($info['password']);\n }\n $ret = Admin_Service_User::updateUser($info, intval($info['uid']));\n if (!$ret) $this->output(-1, '更新用户失败');\n $this->output(0, '更新用户成功.');\n }", "public function success_changepass(){\n if(isset($_GET['email'])){\n $data['u']=$this->f_usersmodel->getFirstRowWhere('users',array('email'=>$_GET['email']));\n }\n\n $data['doitac']=$this->load->widget('doitac');\n\n $seo = array(\n 'title' => 'Thay đổi mật khẩu thành công'\n );\n\n $this->LoadHeader(null,$seo);\n $this->load->view('users/success_changepass',$data);\n $this->LoadFooter();\n }", "public function changePassword() {\n return view('/myprofile/myprofilepassword');\n }", "public function update(){\n\t\t$sql = \"update user set pass='\".$this->pass.\"' where id='\".$this->id.\"'\";\n\t\treturn\tExecutor::doit($sql);\n\t}", "public function changePassword() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'change_password';\n\t\t$data['pageName'] = 'Change Password';\n\t\tif($data['common_data']['user_data']['role'] == INACTIVE_STATUS_ID){\n\t\t\theader(\"Location: \".ROUTE_PROFILE);\n\t\t\tdie();\n\t\t}\n\t\tif($data['common_data']['user_data']['account_type'] == FACEBOOK_ACCOUNT_TYPE){\n\t\t\theader(\"Location: \".ROUTE_ERROR_PAGE);\n\t\t\tdie();\n\t\t}\n\n\t\t$data['tutor_details'] = $this->profile_model->getTutorDetailsById($data['common_data']['user_id']);\n\t\t//Getting all payment details\n\t\t$data['payment_details'] = $this->payment_model->getPaymentDetailsById($data['common_data']['user_id']);\n\t\t$data['tutor_badges'] = $this->user_model->getTutorBadges($data['common_data']['user_id']);\n\t\t$data['badges'] = $this->user_model->getBadges();\n\n\t\t$template['body_content'] = $this->load->view('frontend/profile/change-password', $data, true);\t\n\t\t$this->load->view('frontend/layouts/template', $template, false);\n\t}", "public function getPassword() {}", "public function actionChangepassword()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\n\t\tif(isset($_POST['SiteUser']))\n\t\t{\t\n\t\t\tif(trim($_POST['SiteUser']['password']) != '') {\n\t\t\t\t$record->password = $_POST['SiteUser']['password'];\n\t\t\t\t\n\t\t\t} \t\t\n\t\t\tif(trim($_POST['SiteUser']['password']) == trim($_POST['SiteUser']['repeat_password'])) {\n\t\t\t\t$record->repeat_password = $record->password;\n\t\t\t}\t\n\t\t\t\n\t\t\tif($record->validate()) {\n\t\t\t\t$record->repeat_password = $record->password = crypt($record->password);\n\t\t\t\tif($record->save())\n\t\t\t\t\t$this->redirect(array('personal'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$record->repeat_password = $record->password = '';\n\t\t\t}\n\n\t\t}\t\n\n\t\t$this->render('changepassword',array('record'=>$record));\n\t}", "public function edit_password_jurusan()\n\t{\n\t\t$data['edit'] = $this->m_aka->edit_data_staff_jurusan();\n\t\t$data['content'] = 'password/edit_password_jurusan';\n\t\t$this->load->view('content', $data);\n\t\t\n\t}", "public function updatePassword(UpdatePasswordRequest $request){\n $request->validate();\n $this->userRepository->updatePassword($request);\n return back();\n }", "public function updatePassword(passRequest $request){\n \n \n \t$user = Auth::user();\n \t$oldPassword = $request['passwordold'];\n $newPassword = $request['password'];\n\n if (Hash::check($oldPassword, $user->password)) {\n $request->user()->fill(['password'=>Hash::make($newPassword)])->save();\n return redirect()->action('ItemsController@index');\n }\n else\n {\n \treturn redirect()->back()->with('alert','Thay đổi không thành công');\n }\n }", "public function getChangepassword() { \n return view ( 'user::admin.changepassword', [ \n StringLiterals::RULES => $this->_adminUserRepository->setRules ( [ \n 'old_password' => 'required',\n 'password' => 'required|confirmed',\n 'password_confirmation' => 'required|same:password' \n ] )->getRules () \n ] );\n }", "public function editPasswordProfil()\n {\n //------------------------Get informations of the Ajax POST----------------------//\n $this->password = $this->input->post('current_password');\n $this->newPassword = $this->input->post('new_password');\n $this->newPasswordConfirm = $this->input->post('new_password_confirmation');\n //------------------------------------------------------------------------------//\n\n //-------------create my objet for test password and id--------------//\n $this->modelMembers->setId($this->id_member);\n $this->modelMembers->setPassword(hash_password($this->password));\n //-----------------------------------------------------------------//\n\n //----------------Call my method to verify that the id matches the password-----------------------//\n $membersModel = $this->modelMembers;\n $resultRequest = $this->modelMembers->checkPasswordById($membersModel);\n //-----------------------------------------------------------------------------------------------//\n\n $callBack = array();\n\n //--If the method returns true--//\n if ($resultRequest) {\n\n //---------if the 2 passwords are the same----------//\n if ($this->newPasswordConfirm == $this->newPassword) {\n\n //------------create my object-------------//\n $this->modelMembers->setId($this->id_member);\n $this->modelMembers->setPassword(hash_password($this->newPassword));\n $membersModel = $this->modelMembers;\n //-----------------------------------------//\n\n //--------using my method to update the password-------------//\n $this->modelMembers->updatePasswordMembers($membersModel);\n //----------------------------------------------------------//\n\n $callBack[\"confirm\"] = \"success\";\n\n } else {\n $callBack[\"errorPasswordConfirm\"] = \"error\";\n }\n\n } else {\n $callBack[\"errorPasswordActuel\"] = \"error\";\n }\n\n echo json_encode($callBack);\n }", "public function getChangePassword(){\n return view('pages.change_password');\n }", "public function action_password($unused = null) {\n\t\tif (!Auth::instance()->has_permission('update_profile', $this->_model_name)) {\n\t\t\tthrow new Oxygen_Access_Exception;\n\t\t}\n\n\t\tOHooks::instance()\n\t\t\t->add(get_class($this).'.password.model_post_save', array(\n\t\t\t\tget_class($this),\n\t\t\t\t'password_model_post_save'\n\t\t\t));\n\n\t\tparent::action_password(true);\n\n\t\t$title = __('Change Password');\n\t\t$this->template->title = $title;\n\t\t$this->favorites->title($title);\n\t\t$this->breadcrumbs->delete('Edit '.$this->_model->meta('one_text'));\n\t}", "function admin_password($id = null) {\n\n\t\t/**\n\t\t * If $id is not set and $this->data is empty, an error message is displayed.\n\t\t * $this->data = Datas from the form\n\t\t * $id = The user ID\n\t\t */\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user.', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'password'));\n\t\t}\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Save the user password after edit.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Select the subdomain name with the ID.\n\t\t\t\t * It's necessary for the insert in the \"robot\" table.\n\t\t\t\t * @var string\n\t\t\t\t */\n\t\t\t\t$data = $this->Robot->search($id, 'User');\n\n\t\t\t\t/**\n\t\t\t\t * Insert the edit action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ ' . $data['User']['name'] . ' ]</strong> ' . __d('core', 'User password changed by (' . $this->Auth->user('name') . ').', true) , 'CORE', $_SERVER[\"REMOTE_ADDR\"]);\n\n\t\t\t\t/**\n\t\t\t\t * If the new user password is edited, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has been changed.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user password is not edited, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has not been changed.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Display datas.\n\t\t */\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t}\n\n\t}", "function changepassword()\n {\n $data['action'] = $this->lang->line('changepassword');\n $data['title'] = $this->lang->line('changepassword');\n\t $data['user'] = $this->db_session->userdata('user_name');\n $data['fal'] = $this->fal_front->changepassword();\n\t $this->load->view('user/changepassword_view', $data); \n }", "public function checkPassword($value);", "public function usePassword($password)\n {\n // CODE...\n }" ]
[ "0.78546065", "0.780078", "0.77040315", "0.764606", "0.7576257", "0.7356296", "0.7316896", "0.73154294", "0.7301957", "0.7274504", "0.7272078", "0.71971315", "0.71930176", "0.71576905", "0.7136665", "0.712726", "0.7121174", "0.7115979", "0.7109772", "0.7105688", "0.70929766", "0.70730907", "0.70476484", "0.7046816", "0.70446455", "0.7019461", "0.70162356", "0.69910985", "0.69799256", "0.6976599", "0.6961184", "0.6954773", "0.6945833", "0.6940413", "0.6940185", "0.69315976", "0.6885724", "0.6878904", "0.6876363", "0.6871127", "0.6851782", "0.68510157", "0.6844727", "0.6844159", "0.6844098", "0.68427294", "0.68393356", "0.6835895", "0.6835218", "0.6826185", "0.68223166", "0.6816138", "0.68151927", "0.6805147", "0.677554", "0.6774048", "0.6770912", "0.67597306", "0.6756291", "0.6752012", "0.6748865", "0.67395204", "0.6733774", "0.6733774", "0.6733774", "0.67182", "0.6717063", "0.6698232", "0.6697423", "0.6696252", "0.6690452", "0.6680106", "0.6675473", "0.6670989", "0.66705763", "0.666804", "0.666759", "0.6656067", "0.66559774", "0.6646313", "0.6645055", "0.66450226", "0.6627735", "0.6623431", "0.6621958", "0.6614074", "0.6608453", "0.6606243", "0.6599132", "0.65979457", "0.6596239", "0.65938824", "0.6592651", "0.6591756", "0.65914375", "0.6586879", "0.65860844", "0.6582618", "0.65770584", "0.65716857" ]
0.66332185
82
Set default arguments Page or post details on a single page or post; site details on any other template. The default arguments can be customized via a filter.
private function setDefaultArgs() { $args = [ 'title' => get_bloginfo('name'), 'url' => get_bloginfo('url'), 'desc' => get_bloginfo('description'), ]; if (is_page() || is_singular()) { $args = [ 'title' => get_the_title(), 'url' => get_permalink(), 'desc' => $this->getPostExcerpt(), ]; } $this->setArgs(apply_filters('cgit_socialize_default_args', $args)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ht_dms_default_paginated_view_arguments( $args = null ) {\n\t$paginated_view_args = array(\n\t\t'uID' => get_current_user_id(),\n\t\t'limit' => 5,\n\t\t'page' => 1,\n\t);\n\n\tif ( is_array( $args ) ) {\n\t\t$paginated_view_args = array_merge( $paginated_view_args, $args );\n\t}\n\n\treturn $paginated_view_args;\n\n\n}", "function apply_default_args($args) {\r\n\t\t$defaults = array(\r\n\t\t\t'width'=>'',\r\n\t\t\t'height'=>'',\r\n\t\t\t'placeholder'=>'',\r\n\t\t\t'description'=>''\r\n\t\t);\r\n\t\t$args = wp_parse_args( $args, $defaults );\r\n\t\treturn $args;\t\r\n\t}", "function get_arguments_views_plugins() {\n return array(\n 'argument default' => array(\n 'param' => array(\n 'title' => t('GET parameter from URL'),\n 'handler' => 'get_arguments_plugin_argument_default_param',\n ),\n ),\n );\n}", "public function setDefaultArgs($args);", "private function default(&$args) {\n\n\t\t// Check args\n\t\tif (empty($args) || !is_array($args))\n\t\t\t$args = [];\n\n\t\t// Set agency slug\n\t\t$args['agency'] = $this->agency;\n\n\t\t// Check language\n\t\tif (!isset($args['language']) && isset($this->language))\n\t\t\t$args['language'] = $this->language;\n\t}", "private function default_args() {\n\t\n\t\t$defaults = array(\n\t\t\t'container' \t=> 'nav',\n\t\t\t'separator' \t=> '&raquo;',\n\t\t\t'before' \t\t=> 'Viewing:',\n\t\t\t'home' \t\t\t=> 'Home',\n\t\t);\n\t\treturn $defaults;\n\t}", "public function setViewHelperDefaulArgumentsToAdditionalArguments() {}", "private function setArgs(){\n\t\t$this->args = array(\n\t\t\t'label' => $this->label,\n\t\t\t'labels' => $this->labels,\n\t\t\t'description' => $this->description,\n\t\t\t'public' => $this->public,\n\t\t\t'exclude_from_search' => $this->excludeSearch,\n\t\t\t'publicly_queryable' => $this->publiclyQueryable,\n\t\t\t'show_ui' => $this->show_ui ,\n\t\t\t'show_in_nav_menus' => $this->showInNavMenus,\n\t\t\t'show_in_menu' => $this->showInMenu,\n\t\t\t'show_in_admin_bar' => $this->showInAdminBar,\n\t\t\t'menu_position' => $this->menuPosition,\n\t\t\t'menu_icon' => $this->menuIcon,\n\t\t\t'capability_type' => $this->capabilityType,\n\t\t\t'map_meta_cap' => $this->mapMetaCap,\n\t\t\t'hierarchical' => $this->hierarchical,\n\t\t\t'supports' => $this->supports,\n\t\t\t'register_meta_box_cb' => $this->registerMetaBoxCb,\n\t\t\t'taxonomies' => $this->taxonomies,\n\t\t\t'has_archive' => $this->hasArchive,\n\t\t\t'permalink_epmask' => $this->permalinkEpmask,\n\t\t\t'rewrite' => $this->rewrite,\n\t\t\t'query_var' => $this->queryVar,\n\t\t\t'can_export' => $this->canExport,\n\t\t\t'_builtin' => $this->builtin\n\t\t);\n\t}", "public function getDefaultParams() {\n\t\treturn $this->setWpQueryVars( 'paged', 'posts_per_page' );\n\t}", "private static function get_default_args() {\n $careerjet_api_key = get_option('jobsearch_integration_careerjet_affid');\n \n return array(\n 'affid' => $careerjet_api_key,\n 'keywords' => '',\n 'location' => '',\n 'page' => 1,\n );\n }", "protected function _create_defaults( $args ) {\n\t\t\t$defaults = array(\n\t\t\t\t'help_tabs' => array(),\n\t\t\t\t'help_sidebar' => '',\n\t\t\t);\n\t\t\t$args = wp_parse_args( $args, $defaults );\n\t\t\t$this->args = json_decode( json_encode( $args ) );\n\t\t}", "private static function arguments() {\n\t\treturn apply_filters(\n\t\t\t'drsa_post_type_args', array(\n\t\t\t\t'labels' => self::labels(),\n\t\t\t\t'public' => false,\n\t\t\t\t'publicly_queryable' => false,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'query_var' => true,\n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'has_archive' => false,\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'menu_position' => null,\n\t\t\t\t'menu_icon' => 'dashicons-pressthis',\n\t\t\t\t'supports' => array( 'title', 'author', 'thumbnail' ),\n\t\t\t\t'capability_type' => apply_filters( 'drsa_ad/cpt/capability_type', 'post' ),\n\t\t\t)\n\t\t);\n\t}", "function set_default_properties( $atts ) {\n\tglobal $post;\n\n\t# If the attribute 'id' is set on the shortcode, set the post object to the post entered.\n\tif ( $atts['id'] ) {\n\t\t$post = get_post( $atts['id'] );\n\t}\n\n\t# If we are on the blog template, get the blog template ID.\n\tif ( is_home() ) {\n\t\t$post = get_post( get_option( 'page_for_posts' ) );\n\t}\n\n\t# Set up variable to check if static exists as a class.\n\t$is_static = in_array( 'static', explode( ' ', $atts['class'] ), true );\n\n\t$defaults = ( object ) array(\n\t\t'ID' => $post->ID,\n\t\t'slug' => $post->post_name,\n\t\t'header' => set_header_text( $post ),\n\t\t'image_source' => is_single() ? set_cover_image( $post->ID ) : set_featured_image( $post->ID, $is_static ),\n\t\t'classes' => set_featured_image_classes( $is_static, $atts['class'] ),\n\t\t'sub_header' => set_sub_header_text( $post ),\n\t\t'button_text' => set_button_text( $is_static, $post ),\n\t\t'button_link' => set_button_link( $post ),\n\t\t'button_downloadable' => set_button_downloadable( $post ),\n\t);\n\n\treturn $defaults;\n}", "function defaultAction($args) {\n\t}", "public function get_default_args(){ return $this->default_args; }", "public function __construct($args = [])\n {\n parent::__construct($args);\n\n // Add common data needed all pages\n $this->setBase();\n }", "public function setup() {\n\n\t\t$this->set_defaults();\n\n\t\t$this->arguments = array(\n\t\t\t'priority' => 30,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'title' => esc_html__( 'Month View', 'the-events-calendar' ),\n\t\t\t'description' => esc_html__( 'Options selected here will override what was selected in the \"General Theme\" and \"Global Elements\" sections', 'the-events-calendar' ),\n\t\t);\n\t}", "public function setArguments() {\n\n $theme = wp_get_theme(); // For use with some settings. Not necessary.\n\n $this->args = array(\n // TYPICAL -> Change these values as you need/desire\n 'opt_name' => 'neattheme', // This is where your data is stored in the database and also becomes your global variable name.\n 'display_name' => $theme->get('Name'), // Name that appears at the top of your panel\n 'display_version' => $theme->get('Version'), // Version that appears at the top of your panel\n 'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)\n 'allow_sub_menu' => true, // Show the sections below the admin menu item or not\n 'menu_title' => __('Theme Options', 'neat'),\n 'page' => __('Theme Options', 'neat'),\n // You will need to generate a Google API key to use this feature.\n // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth\n 'google_api_key' => '', // Must be defined to add google fonts to the typography module\n 'async_typography' => true,\n //'admin_bar' => false, // Show the panel pages on the admin bar\n 'global_variable' => '', // Set a different name for your global variable other than the opt_name\n 'dev_mode' => false, // Show the time the page took to load, etc\n 'customizer' => true, // Enable basic customizer support\n // OPTIONAL -> Give you extra features\n 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.\n 'page_parent' => 'themes.php', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters\n 'page_permissions' => 'manage_options', // Permissions needed to access the options panel.\n 'menu_icon' => '', // Specify a custom URL to an icon\n 'last_tab' => '', // Force your panel to always open to a specific tab (by id)\n 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title\n 'page_slug' => '_options', // Page slug used to denote the panel\n 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not\n 'default_show' => false, // If true, shows the default value next to each field that is not the default value.\n 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: *\n // CAREFUL -> These options are for advanced use only\n 'transient_time' => 60 * MINUTE_IN_SECONDS,\n 'output' => true, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output\n 'output_tag' => true, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head\n //'domain' \t=> 'redux-framework', // Translation domain key. Don't change this unless you want to retranslate all of Redux.\n //'footer_credit' \t=> '', // Disable the footer credit of Redux. Please leave if you can help it.\n // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.\n 'database' => '', // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!\n 'show_import_export' => true, // REMOVE\n 'system_info' => false, // REMOVE\n 'help_tabs' => array(),\n 'help_sidebar' => '', // __( '', $this->args['domain'] ); \n );\n $this->args['share_icons'][] = array(\n 'url' => 'https://twitter.com/marstheme',\n 'title' => 'Follow us on Twitter',\n 'icon' => 'el-icon-twitter'\n );\n // Panel Intro text -> before the form\n if (!isset($this->args['global_variable']) || $this->args['global_variable'] !== false) {\n if (!empty($this->args['global_variable'])) {\n $v = $this->args['global_variable'];\n } else {\n $v = str_replace(\"-\", \"_\", $this->args['opt_name']);\n }\n $this->args['intro_text'] = sprintf(__('<p>Did you know that Redux sets a global variable for you? To access any of your saved options from within your code you can use your global variable: <strong>$%1$s</strong></p>', 'neat'), $v);\n } else {\n $this->args['intro_text'] = __('<p>This text is displayed above the options panel. It isn\\'t required, but more info is always better! The intro_text field accepts all HTML.</p>', 'neat');\n }\n\n // Add content after the form.\n //$this->args['footer_text'] = __('<p>This text is displayed below the options panel. It isn\\'t required, but more info is always better! The footer_text field accepts all HTML.</p>', 'neat');\n }", "protected function set_new_menu_params() {\n\t\t$this->menu_args['menu-item-title'] = !empty( $_POST['premise_post_title'] ) ? $_POST['premise_post_title'] : '';\n\t\t$this->menu_args['menu-item-url'] = !empty( $_POST['premise_post_url'] ) ? $_POST['premise_post_url'] : '';\n\t\t$this->menu_args['menu-item-object-id'] = !empty( $_POST['premise_post_object_id'] ) ? $_POST['premise_post_object_id'] : '';\n\t\t$this->menu_args['menu-item-object'] = !empty( $_POST['premise_post_object'] ) ? $_POST['premise_post_object'] : '';\n\t}", "function wp_parse_args($args, $defaults = array())\n {\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}", "function adminDefault() {\n\t\t\n\t\t// load intro and options\n\t\t$this->content = new BlogPostIntro();\n\t\t$this->content->loadContent($GLOBALS['objPage']->id);\n\t\t\n\t\t// load confirmation\n\t\t$this->confirm = new CmsContent();\n\t\t$this->confirm->loadContent($GLOBALS['objPage']->id, 'confirm');\n\t\t\n\t\t// load no access message\n\t\t$this->noaccess = new CmsContent();\n\t\t$this->noaccess->loadContent($GLOBALS['objPage']->id, 'noaccess');\n\t\t\n\t\tif ($GLOBALS['confModule']['blog_post']['editor_full']) {\n\t\t\t$this->content->initAdmin('full',2);\n\t\t\t$this->confirm->initAdmin('full',2);\n\t\t\t$this->noaccess->initAdmin('full',2);\n\t\t} else {\n\t\t\t$this->content->initAdmin('Default',1);\n\t\t\t$this->confirm->initAdmin('Default',1);\n\t\t\t$this->noaccess->initAdmin('Default',1);\n\t\t}\n\t\t\n\t\t$this->data = new ContentBlogPost();\n\t\t$this->data->loadPostsList(true);\n\t\t\n\t\t// only if on page\n\t\t$GLOBALS['objCms']->initSubmitting(1,2); // save and save and close\n\n\t\t$this->baseLink = CMS_WWW_URI.'admin/special.php?module=blog';\n\t\t$this->setView('admin');\n\t\t\n\t}", "function default_location() {\n\n return array(\n array(\n 'param' => 'post_type',\n 'operator' => '==',\n 'value' => 'post',\n )\n );\n }", "function bwrt_default_pages( WP_Site $site, array $args ) {\n // Get template pages\n $templates = bwrt_get_default_pages();\n\n if ( empty($templates) ) {\n return;\n }\n\n switch_to_blog( $site->id );\n\n // Create pages on new site\n foreach ( $templates as $template ) {\n if ( is_object($template) && $template instanceof WP_Post ) {\n\n $result = wp_insert_post(\n array(\n 'post_title' => $template->post_title,\n 'post_name' => $template->post_name,\n 'post_content' => $template->post_content,\n 'post_status' => 'publish',\n 'post_author' => $args['user_id'],\n 'post_type' => 'page',\n 'menu_order' => 1,\n 'comment_status' => 'closed',\n 'ping_status' => 'closed',\n )\n );\n\n if ( is_wp_error( $result ) ) {\n error_log( 'Error adding BWR Template: ' . print_r( $result, true ) );\n }\n }\n }\n\n // Delete WP Sample Page\n $default_page = get_page_by_title( 'Sample Page' );\n wp_delete_post( $default_page->ID );\n\n restore_current_blog();\n}", "public function getDefaultParams();", "function tb_default_options() {\n $defaults = array (\n 'banner_id' => '',\n 'banner_link' => '',\n 'city' => ''\n );\n return apply_filters( \"tb_default_options\", $defaults );\n}", "public function getDefaultParameters();", "public function getDefaultParameters();", "public function setArguments() {\n\n $theme = wp_get_theme(); // For use with some settings. Not necessary.\n\n $this->args = array(\n // TYPICAL -> Change these values as you need/desire\n 'opt_name' => 'tb_options',\n // This is where your data is stored in the database and also becomes your global variable name.\n 'display_name' => $theme->get( 'Name' ),\n // Name that appears at the top of your panel\n 'display_version' => $theme->get( 'Version' ),\n // Version that appears at the top of your panel\n 'menu_type' => 'menu',\n //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)\n 'allow_sub_menu' => true,\n // Show the sections below the admin menu item or not\n 'menu_title' => __( 'Theme Options', 'slova' ),\n 'page_title' => __( 'Theme Options', 'slova' ),\n // You will need to generate a Google API key to use this feature.\n // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth\n 'google_api_key' => '',\n // Set it you want google fonts to update weekly. A google_api_key value is required.\n 'google_update_weekly' => false,\n // Must be defined to add google fonts to the typography module\n 'async_typography' => true,\n // Use a asynchronous font on the front end or font string\n //'disable_google_fonts_link' => true, // Disable this in case you want to create your own google fonts loader\n 'admin_bar' => true,\n // Show the panel pages on the admin bar\n 'admin_bar_icon' => 'dashicons-portfolio',\n // Choose an icon for the admin bar menu\n 'admin_bar_priority' => 50,\n // Choose an priority for the admin bar menu\n 'global_variable' => '',\n // Set a different name for your global variable other than the opt_name\n 'dev_mode' => false,\n // Show the time the page took to load, etc\n 'update_notice' => false,\n // If dev_mode is enabled, will notify developer of updated versions available in the GitHub Repo\n 'customizer' => true,\n // Enable basic customizer support\n //'open_expanded' => true, // Allow you to start the panel in an expanded way initially.\n //'disable_save_warn' => true, // Disable the save warning when a user changes a field\n\n // OPTIONAL -> Give you extra features\n 'page_priority' => null,\n // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.\n 'page_parent' => 'themes.php',\n // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters\n 'page_permissions' => 'manage_options',\n // Permissions needed to access the options panel.\n 'menu_icon' => '',\n // Specify a custom URL to an icon\n 'last_tab' => '',\n // Force your panel to always open to a specific tab (by id)\n 'page_icon' => 'icon-themes',\n // Icon displayed in the admin panel next to your menu_title\n 'page_slug' => '_options',\n // Page slug used to denote the panel\n 'save_defaults' => true,\n // On load save the defaults to DB before user clicks save or not\n 'default_show' => false,\n // If true, shows the default value next to each field that is not the default value.\n 'default_mark' => '',\n // What to print by the field's title if the value shown is default. Suggested: *\n 'show_import_export' => true,\n // Shows the Import/Export panel when not used as a field.\n\n // CAREFUL -> These options are for advanced use only\n 'transient_time' => 60 * MINUTE_IN_SECONDS,\n 'output' => true,\n // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output\n 'output_tag' => true,\n // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head\n // 'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it.\n\n // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.\n 'database' => '',\n // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!\n 'system_info' => false,\n // REMOVE\n\n // HINTS\n 'hints' => array(\n 'icon' => 'icon-question-sign',\n 'icon_position' => 'right',\n 'icon_color' => 'lightgray',\n 'icon_size' => 'normal',\n 'tip_style' => array(\n 'color' => 'light',\n 'shadow' => true,\n 'rounded' => false,\n 'style' => '',\n ),\n 'tip_position' => array(\n 'my' => 'top left',\n 'at' => 'bottom right',\n ),\n 'tip_effect' => array(\n 'show' => array(\n 'effect' => 'slide',\n 'duration' => '500',\n 'event' => 'mouseover',\n ),\n 'hide' => array(\n 'effect' => 'slide',\n 'duration' => '500',\n 'event' => 'click mouseleave',\n ),\n ),\n )\n );\n\t\t\t\t\n // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Visit us on GitHub',\n 'icon' => 'el-icon-github'\n //'img' => '', // You can use icon OR img. IMG needs to be a full URL.\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Like us on Facebook',\n 'icon' => 'el-icon-facebook'\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Follow us on Twitter',\n 'icon' => 'el-icon-twitter'\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Find us on LinkedIn',\n 'icon' => 'el-icon-linkedin'\n );\n }", "function applyDefaults()\n {\n list($page, $action) = $this->controller->getActionName();\n $fe =& PEAR_PackageFileManager_Frontend::singleton();\n $fe->log('debug',\n str_pad($this->getAttribute('id') .'('. __LINE__ .')', 20, '.') .\n \" applyDefaults ActionName=($page,$action)\"\n );\n }", "private function setOptions()\n\t{\n\t\t$this->site = ( isset($_POST['site']) ) ? sanitize_text_field($_POST['site']) : null;\n\t\t$this->feed_type = ( isset($_POST['type']) && $_POST['type'] !== 'search' ) ? sanitize_text_field($_POST['type']) : 'search';\n\t\t$this->post_id = ( isset($_POST['id']) ) ? sanitize_text_field($_POST['id']) : null;\n\t\t$this->feed_format = ( isset($_POST['format']) && $_POST['format'] !== 'unformatted' ) ? sanitize_text_field($_POST['format']) : 'unformatted';\n\t}", "protected function get_default_args() {\n\t\t$existing = parent::get_default_args();\n\n\t\t$new = array(\n\t\t\t'id' => '',\n\t\t\t'id__in' => array(),\n\t\t\t'id__not_in' => array(),\n\t\t\t'transaction' => '',\n\t\t\t'transaction__in' => array(),\n\t\t\t'transaction__not_in' => array(),\n\t\t\t'customer' => '',\n\t\t\t'customer__in' => array(),\n\t\t\t'customer__not_in' => array(),\n\t\t\t'membership' => '',\n\t\t\t'membership__in' => array(),\n\t\t\t'membership__not_in' => array(),\n\t\t\t'seats' => '',\n\t\t\t'seats_gt' => '',\n\t\t\t'seats_lt' => '',\n\t\t\t'active' => ''\n\t\t);\n\n\t\treturn wp_parse_args( $new, $existing );\n\t}", "function acf_parse_args($args, $defaults = array())\n{\n}", "public function initializeArguments()\n {\n parent::initializeArguments();\n $this->registerArgument('section', 'string', 'Section to render - combine with partial to render section in partial', false, null);\n $this->registerArgument('partial', 'string', 'Partial to render, with or without section', false, null);\n $this->registerArgument('arguments', 'array', 'Array of variables to be transferred. Use {_all} for all variables', false, []);\n $this->registerArgument('optional', 'boolean', 'If TRUE, considers the *section* optional. Partial never is.', false, false);\n $this->registerArgument('default', 'mixed', 'Value (usually string) to be displayed if the section or partial does not exist', false, null);\n $this->registerArgument('contentAs', 'string', 'If used, renders the child content and adds it as a template variable with this name for use in the partial/section', false, null);\n }", "function aurum_setup_postdata_for_pages() {\n\tsetup_postdata( get_queried_object() );\n}", "protected function field_default() {\n\t\t\treturn $this->parse_args( array(\n\t\t\t\t'oembed_width' => '500px',\n\t\t\t\t'oembed_height' => '500px',\n\t\t\t), parent::field_default() );\n\t\t}", "function genesis_sample_theme_setting_defaults() {\n\n\tif ( function_exists( 'genesis_update_settings' ) ) {\n\n\t\tgenesis_update_settings(\n\t\t\tarray(\n\t\t\t\t'blog_cat_num' => 6,\n\t\t\t\t'content_archive' => 'full',\n\t\t\t\t'content_archive_limit' => 0,\n\t\t\t\t'content_archive_thumbnail' => 0,\n\t\t\t\t'posts_nav' => 'numeric',\n\t\t\t\t'site_layout' => 'content-sidebar',\n\t\t\t)\n\t\t);\n\n\t}\n\n\tupdate_option( 'posts_per_page', 6 );\n\n}", "public function addDefaultEntriesAndValues() {}", "function extra_siteinfo_filters() {\n $filter = array(array(arg(2), arg(3)));\n if (arg(1) == 'nodes') {\n if (arg(2) == 'all') {\n $_SESSION['node_overview_filter'] = array();\n }\n else {\n $_SESSION['node_overview_filter'] = $filter;\n }\n drupal_goto('admin/content');\n }\n elseif (arg(1) == 'users') {\n if (arg(2) == 'all') {\n $_SESSION['user_overview_filter'] = array();\n }\n else {\n $_SESSION['user_overview_filter'] = $filter;\n }\n drupal_goto('admin/people');\n }\n else {\n drupal_goto('admin/reports/extra-siteinfo');\n }\n}", "public function populateDefaults() {\n\t\t$this->owner->ShowInMenus = false;\n\t\t$this->owner->ShowInSearch = false;\n\t\t$this->owner->SubmitButtonText = \"Show my results\";\n \t}", "function change_arguments( $args ) {\n //$args['dev_mode'] = true;\n\n return $args;\n }", "function material_press_page_menu_args($args)\n {\n $args['show_home'] = true;\n return $args;\n }", "function beforeFilter() {\n\t\t$this->plugin = 'aqueous';\n\t\t$this->passedArgs = array_merge(array('layout'=>'default', 'theme'=>null), $this->passedArgs);\n\t}", "function elementor_default_setting()\n {\n\n if (false == yatri_enable_page_builder_compatibility() || 'post' == get_post_type()) {\n return;\n }\n\n\n // don't modify post meta settings if we are not on Elementor's edit page.\n if (!$this->is_elementor_editor()) {\n return;\n }\n\n global $post;\n\n $id = yatri_get_post_id();\n\n $page_builder_flag = '';//get_post_meta($id, 'yatri_pb_usage_flag', true);\n\n if (isset($post) && empty($page_builder_flag) && (is_admin() || is_singular())) {\n\n if (empty($post->post_content) && $this->is_elementor_activated($id)) {\n\n update_post_meta($id, 'yatri_pb_usage_flag', 'used');\n update_post_meta($id, 'yatri_sidebar_location', 'yatri_full_width_100');\n update_post_meta($id, 'yatri_page_breadcrumb_option', 'disable');\n update_post_meta($id, 'yatri_page_title_enable', 'no');\n update_post_meta($id, 'yatri_page_featured_image_enable', 'no');\n\n\n add_filter('yatri_page_title_enable', '__return_false');\n add_filter('yatri_page_featured_image_enable', '__return_false');\n }\n }\n }", "function gc_theme_setting_defaults() {\n\n\tif ( function_exists( 'genesis_update_settings' ) ) {\n\n\t\tgenesis_update_settings( array(\n\t\t\t'blog_cat_num' => 5,\n\t\t\t'content_archive' => 'excerpts',\n\t\t\t'content_archive_limit' => 0,\n\t\t\t'content_archive_thumbnail' => 1,\n\t\t\t'posts_nav' => 'numeric',\n\t\t\t'site_layout' => 'content-sidebar',\n\t\t) );\n\n\t}\n\tupdate_option( 'posts_per_page', 5 );\n\n}", "public function initializeArgumentsAndRender() {}", "public function initializeArgumentsAndRender() {}", "function get_default_page_to_edit()\n {\n }", "private function add_default_options_page() {\n\n\t\tadd_menu_page(\n\t\t\tself::OPTIONS_TITLE,\n\t\t\tself::OPTIONS_MENU_TITLE,\n\t\t\tself::OPTIONS_USER_CAP,\n\t\t\tself::OPTIONS_MENU_SLUG,\n\t\t\t[ $this, 'print_default_options_page' ]\n\t\t);\n\t}", "function pre_load_reports_page() {\r\n\r\n //** Default Help items */\r\n $contextual_help['General Help'][] = '<h3>' . __('Reports', WPI) . '</h3>';\r\n $contextual_help['General Help'][] = '<p>' . __('This page allows you to manage your sales statistics.', WPI) . '</p>';\r\n\r\n //** Hook this action is you want to add info */\r\n $contextual_help = apply_filters('wpi_reports_page_help', $contextual_help);\r\n\r\n do_action('wpi_contextual_help', array('contextual_help' => $contextual_help));\r\n }", "public function default()\n {\n global $controller,$alerts,$local,$view,$theme;\n $tmpFirst = null;\n if ($controller->argc > 0) {\n $tmpFirst = $controller->argv[0];\n $this->ifProfile($tmpFirst);\n }\n }", "function als_alert_default_args() {\n\n\t/**\n\t * Filters the default alert args.\n\t *\n\t * @since 1.0.0\n\t */\n\treturn apply_filters( 'als_alert_default_args', array(\n\t\t'post_ID' => 0,\n\t\t'content' => '',\n\t\t'color' => 'default',\n\t\t'type' => 'inset-banner',\n\t\t'icon' => 'default',\n\t\t'time_range' => '',\n\t\t'popup_image' => '',\n\t\t'popup_image_small'=> '',\n\t\t'user_interaction' => 'none',\n\t\t'button_text' => '',\n\t\t'button_link' => '',\n\t\t'button_new_tab' => '',\n\t) );\n}", "function twentytwelve_page_menu_args($args) {\n if (!isset($args['show_home']))\n $args['show_home'] = true;\n return $args;\n}", "public function get_page_arguments() {\n\t\treturn [\n\t\t\t$this->get_parent_slug(),\n\t\t\t$this->get_page_title(),\n\t\t\t$this->get_title(),\n\t\t\t$this->get_capability(),\n\t\t\t$this->get_slug(),\n\t\t\t$this->get_render_func() ?: [ $this, 'render_page' ],\n\t\t];\n\t}", "function change_arguments( $args ) {\n //$args['dev_mode'] = true;\n\n return $args;\n }", "protected function _setHookPreferences()\r\n\t{\r\n\t\tif (array_key_exists('project', $this->_args) && $this->_args['project'] !== '') {\r\n\t\t\t$this->project = $this->_args['project'];\r\n\t\t}\r\n\t\tif (array_key_exists('search', $this->_args) && $this->_args['search'] == 'false') {\r\n\t\t\t$this->search = false;\r\n\t\t}\r\n\t\tif (array_key_exists('filter', $this->_args) && $this->_args['filter'] == 'false') {\r\n\t\t\t$this->filter = false;\r\n\t\t}\r\n\t\tif (array_key_exists('authenticate', $this->_args) && $this->_args['authenticate'] == 'false') {\r\n\t\t\t$this->auth = false;\r\n\t\t}\r\n\t}", "function cmsmasters_page_menu_args($args) {\n $args['show_home'] = true;\n \n return $args;\n}", "function changeDefaultPostLabel() {\n\t\tglobal $menu;\n\t\tglobal $submenu;\n\t\t$menu[5][0] = 'Stories';\n\t\t$submenu['edit.php'][5][0] = 'Stories';\n\t\t$submenu['edit.php'][10][0] = 'Add Stories';\n\t\t$submenu['edit.php'][16][0] = 'Stories Tags';\n\t}", "private function _setDefaults(): void {\n\t\t// default query options\n\t\t$options['limit'] = 50;\n\t\t$options['offset'] = false;\n\t\t$options['sort'] = false;\n\t\t$options['sortDirection'] = false;\n\t\t$this->setQueryOptions($options);\n\t}", "public function add_page_excerpts() {\n add_post_type_support( 'page', 'excerpt' );\n }", "function hello_pro_onboarding_set_genesis_defaults( $content, $imported_post_ids ) {\n\n\tif ( ! function_exists( 'genesis_update_settings' ) ) {\n\t\treturn;\n\t}\n\n\t$settings = array(\n\t\t'content_archive' => 'excerpts', // Show excerpts, not full entries.\n\t\t'content_archive_thumbnail' => 1, // Show the blog post Featured Images.\n\t\t'image_size' => 'blogroll', // Use the 'blogroll' size Featured Image on blog archives.\n\t\t'image_alignment' => 'none', // Set default alignment for Featured Images on blog archives.\n\t);\n\n\tgenesis_update_settings( $settings );\n\n}", "protected function setDefaultValueExtra()\n {\n $this->default_data['address'] = 'xxx.atlassian.net';\n $this->default_data['rest_api_resource'] = '/rest/api/latest/';\n $this->default_data['timeout'] = 60;\n\n $this->default_data['clones']['mappingTicket'] = array(\n array(\n 'Arg' => self::ARG_SUMMARY,\n 'Value' => 'Issue {include file=\"file:$centreon_open_tickets_path/providers/' .\n 'Abstract/templates/display_title.ihtml\"}'\n ),\n array('Arg' => self::ARG_DESCRIPTION, 'Value' => '{$body}'),\n array('Arg' => self::ARG_PROJECT, 'Value' => '{$select.jira_project.id}'),\n array('Arg' => self::ARG_ASSIGNEE, 'Value' => '{$select.jira_assignee.id}'),\n array('Arg' => self::ARG_PRIORITY, 'Value' => '{$select.jira_priority.id}'),\n array('Arg' => self::ARG_ISSUETYPE, 'Value' => '{$select.jira_issuetype.id}'),\n );\n }", "function posts_column_views($defaults){\n\t$defaults['post_views'] = __('Visitas');\n\treturn $defaults;\n}", "protected function setDefaultParams()\n {\n foreach ($this->allowedParams as $param => $options) {\n $this->params[$param] = null;\n if (! empty($options['arguments'])) {\n $this->params[$param] = array();\n foreach ($options['arguments'] as $arg => $opts) {\n if (! empty($opts['default'])) {\n $cast = ! empty($opts['cast']) ? $opts['cast'] : 'string';\n $this->params[$param][$arg] = $this->castValue($cast, $opts['default']);\n }\n }\n } elseif (! empty($options['default'])) {\n $cast = ! empty($options['cast']) ? $options['cast'] : 'string';\n $this->params[$param] = $this->castValue($cast, $options['default']);\n }\n }\n }", "public function get_default_params()\n {\n }", "public function apply_filters_in_request() {\n\n\t\t\t$args = jet_smart_filters()->query->get_query_args();\n\n\t\t\tif ( ! $args ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_filter( 'jet-engine/listing/grid/posts-query-args', array( $this, 'add_query_args' ), 10, 2 );\n\n\t\t}", "public function default($name_of_page,$action){\r\n\r\n self::get_view($name_of_page,$action);// this function (get_view) talk this parameter and using it to call it in the browser to get main_view page\r\n }", "protected function setRequestArgumentsFromGetPost() {\n\t\t$validArguments = array('vendorName', 'extensionName', 'pluginName', 'controllerName', 'actionName', 'formatName', 'arguments');\n\t\tforeach ($validArguments as $argument) {\n\t\t\tif (GeneralUtility::_GP($argument)) {\n\t\t\t\t$this->requestArguments[$argument] = GeneralUtility::_GP($argument);\n\t\t\t} else if (GeneralUtility::_GP('amp;' . $argument)) {\n\t\t\t\t// Something went wrong...\n\t\t\t\t$this->requestArguments[$argument] = GeneralUtility::_GP('amp;' . $argument);\n\t\t\t}\n\t\t}\n\t}", "function setHooks() {\n add_filter('manage_pages_columns', array($this, 'addColumn')); \n add_action('manage_pages_custom_column', array($this,'displayTemplateColumn'), 10, 2);\n\n // Hooks for filtering pages by available templates\n add_action('restrict_manage_posts', array($this, 'displayFilterOptions'));\n add_filter('parse_query', array($this, 'getPagesByTemplate'));\n }", "function settings($args, $request) {\n\t\t$path = array_shift($args);\n\t\tswitch($path) {\n\t\t\tcase 'index':\n\t\t\tcase '':\n\t\t\tcase 'journal':\n\t\t\t\t$this->journal($args, $request);\n\t\t\t\tbreak;\n\t\t\tcase 'website':\n\t\t\t\t$this->website($args, $request);\n\t\t\t\tbreak;\n\t\t\tcase 'publication':\n\t\t\t\t$this->publication($args, $request);\n\t\t\t\tbreak;\n\t\t\tcase 'distribution':\n\t\t\t\t$this->distribution($args, $request);\n\t\t\t\tbreak;\n\t\t\tcase 'access':\n\t\t\t\t$this->access($args, $request);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tassert(false);\n\t\t}\n\t}", "function EV_posts_modify_query_vars($query_vars) {\n\t\tif( ( preg_match('/edit.php/i', $_SERVER['REQUEST_URI']) ) && !isset($_GET['page']) ) {\n\t\t\treturn array_merge( $query_vars, array('showpostsoverride') );\n\t\t} else {\n\t\t\treturn $query_vars;\n\t\t}\n\t}", "public function __construct($name_of_page,$action){\r\n\t\tself::default($name_of_page,$action);\t\r\n }", "public static function fill_query_vars($args)\n {\n }", "function uwmadison_page_menu_args( $args ) {\n\t\t$args['show_home'] = true;\n\t\t$args['menu_class'] = $args['container_class'];\n\t\treturn $args;\n\t}", "function subh_posts_column_views( $defaults ) {\r\n $defaults['post_views'] = __( 'Views' );\r\n \r\n return $defaults;\r\n}", "function edit_post($post_data = \\null)\n {\n }", "public function initializeDefaults() {\n\t\t$page = $this->getCollectionObject();\n\t\tLoader::helper('clov_page', 'clov');\n\t\t\n\t\t// Show non-draft expenses and draft expenses owned by the user.\n\t\tClovPageHelper::addBlockByHandle($page, 'clov_expense_list');\n\t\tClovPageHelper::addBlockByHandle($page, 'clov_expense_list', array(\n\t\t\t'uID' => '0',\n\t\t\t'activePages' => '0',\n\t\t));\n\t\tClovPageHelper::addBlockByHandle($page, 'clov_relative_link', array(\n\t\t\t'action' => 'clov/expenses/-/add',\n\t\t\t'text' => t('Add A New Expense'),\n\t\t\t'class' => 'clov-action-link clov-add-link',\n\t\t));\n\t\t\n\t\t$this->initializePermissions();\n\t}", "function wp_widget_multi_pages($args, $number = 1)\n {\n extract($args);\n $options = get_option('widget_multi_pages');\n \n \n $sortby = empty($options[$number]['sortby']) ? 'menu_order' : $options[$number]['sortby'];\n $exclude = empty($options[$number]['exclude']) ? '' : '&exclude=' . $options[$number]['exclude'];\n $headpage = empty($options[$number]['headpage']) ? '' : '&child_of=' . $options[$number]['headpage'];\n $posts = empty($options[$number]['posts']) ? '' : $options[$number]['posts'];\n \n if ($sortby == 'menu_order') {\n $sortby = 'menu_order, post_title';\n }\n $title = $options[$number]['title'];\n \n if ($posts != '') {\n $out = '';\n echo $before_widget . $before_title . $title . $after_title . \"<ul>\";\n global $post;\n $myposts = get_posts('include=' . $posts);\n foreach ($myposts as $post) {\n setup_postdata($post);\n echo '<li><a href=\"';\n the_permalink();\n echo '\">';\n the_title();\n echo '</a></li>';\n }\n echo \"</ul>\" . $after_widget;\n } else {\n $out = wp_list_pages('title_li=&echo=0&sort_column=' . $sortby . $exclude . $headpage);\n \n if (!empty($title) && !empty($out)) {\n $out = $before_widget . $before_title . $title . $after_title . \"<ul>\" . $out . \"</ul>\" . $after_widget;\n }\n \n \n if (!empty($out)) {\n?>\n <?php\n echo $out;\n?>\n <?php\n }\n }\n }", "public static function filter_post_meta_for_previews($default_value, int $object_id, string $meta_key, bool $single)\n {\n }", "function create_custom_pages() {\n $custom_pages = array(\n 'home' => 'Home',\n );\n foreach($custom_pages as $page_name => $page_title) {\n $page = get_page_by_path($page_name);\n if( empty($page) ) {\n wp_insert_post( array(\n 'post_type' => 'page',\n 'post_title' => $page_title,\n 'post_name' => $page_name,\n 'post_status' => 'publish'\n ));\n }\n }\n\n // Set static Homepage\n $home = get_page_by_path('home');\n update_option( 'page_on_front', $home->ID );\n update_option( 'show_on_front', 'page' );\n}", "private function twigDefaultContext()\n {\n // show language bar by default\n if (!isset($this->data['hideLanguageBar'])) {\n $this->data['hideLanguageBar'] = false;\n }\n // get languagebar\n $this->data['languageBar'] = null;\n if ($this->data['hideLanguageBar'] === false) {\n $languageBar = $this->generateLanguageBar();\n if (is_null($languageBar)) {\n $this->data['hideLanguageBar'] = true;\n } else {\n $this->data['languageBar'] = $languageBar;\n }\n }\n\n // assure that there is a <title> and <h1>\n if (isset($this->data['header']) && !isset($this->data['pagetitle'])) {\n $this->data['pagetitle'] = $this->data['header'];\n }\n if (!isset($this->data['pagetitle'])) {\n $this->data['pagetitle'] = 'SimpleSAMLphp';\n }\n }", "function page_template_dropdown($default_template = '', $post_type = 'page')\n {\n }", "function twentyten_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "function labs_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "function tutorials($location='blog',$title=\"introduction\",$page=\"1\")\n{\n // only capture the correct template and location name\n // need to abstract\n $this->_common($location,$title,$page,self::portal.'_view');\n}", "function set_post_meta_with_wp_filter( int $post_id, string $key, ?string $filter_name = null, $default = null ): void {\n\t\t\\wpinc\\meta\\set_post_meta_with_wp_filter( $post_id, $key, $filter_name, $default );\n\t}", "function change_default_title($title) {\n $screen = get_current_screen();\n $post_type = $screen->post_type;\n if (array_key_exists($post_type, TOWER_CUSTOM_POSTS))\n return @TOWER_CUSTOM_POSTS[$post_type]['placeholder'];\n return $title;\n}", "function kre_add_path_to_page_query($args, $request) {\n\tif (isset( $request['pagename']) ) {\n\t\t$args['pagename'] = $request['pagename'];\n\t}\n\n\treturn $args;\n}", "public function populateDefaults()\n {\n // Populate Defaults (from parent):\n \n parent::populateDefaults();\n \n // Populate Defaults:\n \n $this->FeedTitle = _t(\n __CLASS__ . '.DEFAULTFEEDTITLE',\n 'Latest News Articles'\n );\n \n $this->FeedDescription = _t(\n __CLASS__ . '.DEFAULTFEEDDESCRIPTION',\n 'The latest news articles from our site.'\n );\n }", "function bdpp_default_settings() {\n\t\n\tglobal $bdpp_options;\n\t\n\t$bdpp_options = array(\n\t\t\t\t\t'post_types'\t\t\t=> array(0 => 'post'),\n\t\t\t\t\t'trend_post_types'\t\t=> array(),\n\t\t\t\t\t'sharing_enable'\t\t=> 0,\n\t\t\t\t\t'sharing'\t\t\t\t=> array(),\n\t\t\t\t\t'sharing_lbl'\t\t\t=> esc_html__('Share this', 'blog-designer-pack'),\n\t\t\t\t\t'sharing_design'\t\t=> 'design-1',\n\t\t\t\t\t'sharing_post_types'\t=> array(),\n\t\t\t\t\t'disable_font_awsm_css'\t=> 0,\n\t\t\t\t\t'disable_owl_css'\t\t=> 0,\n\t\t\t\t\t'custom_css'\t\t\t=> '',\n\t\t\t\t);\n\n\t$default_options = apply_filters('bdpp_default_options_values', $bdpp_options );\n\n\t// Update default options\n\tupdate_option( 'bdpp_opts', $default_options );\n\t\n\t// Overwrite global variable when option is update\n\t$bdpp_options = bdpp_get_settings();\n}", "function wp($query_vars = '')\n {\n }", "function setContext( )\n\t{\n\t\t$args = new safe_args();\n\t\t$args->set('name', \tREQUIRED, 'string');\n\t\t$args->set('value', REQUIRED, 'any');\t\t\n\t\t$args = $args->get(func_get_args());\n\t\t\t\n\t\t$this->context[$args['name']] = $args['value'];\n\t}", "static function default_page($_escaped_fragment_ = null);", "function initDefaults()\n\t{\n\t\tglobal $ninespot_admin;\n\t\n\t\t$ninespot_admin->addNewLayout( 'nines-layout-default',\n\t\t\tarray(\n\t\t\t\t'spots' => array(\n\t\t\t\t\t'head' => array(\n\t\t\t\t\t\t1 => 8,\n\t\t\t\t\t\t2 => 8,\n\t\t\t\t\t\t3 => 0,\n\t\t\t\t\t\t4 => 0,\n\t\t\t\t\t),\n\t\t\t\t\t'nav' => array(\n\t\t\t\t\t\t1 => 16,\n\t\t\t\t\t\t2 => 0,\n\t\t\t\t\t\t3 => 0,\n\t\t\t\t\t\t4 => 0,\n\t\t\t\t\t),\n\t\t\t\t\t'avant-body' => array(\n\t\t\t\t\t\t1 => 0,\n\t\t\t\t\t\t2 => 0,\n\t\t\t\t\t\t3 => 0,\n\t\t\t\t\t\t4 => 0,\n\t\t\t\t\t),\n\t\t\t\t\t'body' => array(\n\t\t\t\t\t\t1 => 4,\n\t\t\t\t\t\t2 => 8,\n\t\t\t\t\t\t3 => 4,\n\t\t\t\t\t\t4 => 0,\n\t\t\t\t\t),\n\t\t\t\t\t'apres-body' => array(\n\t\t\t\t\t\t1 => 0,\n\t\t\t\t\t\t2 => 0,\n\t\t\t\t\t\t3 => 0,\n\t\t\t\t\t\t4 => 0,\n\t\t\t\t\t),\n\t\t\t\t\t'foot' => array(\n\t\t\t\t\t\t1 => 16,\n\t\t\t\t\t\t2 => 0,\n\t\t\t\t\t\t3 => 0,\n\t\t\t\t\t\t4 => 0,\n\t\t\t\t\t),\n\t\t\t\t\t'apres-foot' => array(\n\t\t\t\t\t\t1 => 16,\n\t\t\t\t\t\t2 => 0,\n\t\t\t\t\t\t3 => 0,\n\t\t\t\t\t\t4 => 0,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'widgets' => array(\n\t\t\t\t\t'head' => array(\n\t\t\t\t\t\t'text' => array( 'title' => 'This is a text widget' , 'text' => 'Edit me in the dashboard' ),\n\t\t\t\t\t),\n\t\t\t\t\t'body-1' => array(\n\t\t\t\t\t\t'pages' => array( 'expandtree' => 1 , 'homelink' => 'Home' ),\n\t\t\t\t\t),\n\t\t\t\t\t'body-2' => array(\n\t\t\t\t\t\t'breadcrumbs' => array( 'homelink' => get_option('name') , 'maxchars' => 35 ),\n\t\t\t\t\t\t'categorydescription' => array( 'title' => '%term_name% Archives' ),\n\t\t\t\t\t\t'pagednav' => array(),\n\t\t\t\t\t\t'postloop' => array( 'title' => 'Primary Post Loop', 'what' => 'normal', 'template' => 'a_default_full.php', ),\n\t\t\t\t\t\t'pagednav' => array(),\n\t\t\t\t\t),\n\t\t\t\t\t'body-3' => array(\n\t\t\t\t\t\t'postloop' => array( 'title' => 'Around the site', 'title_show' => 1, 'what' => 'post', 'age_bool' => 'newer' , 'age_num' => 2 , 'age_unit' => 'year' , 'count' => 3 , 'order' => 'rand', 'template' => 'c_default_tiny.php', ),\n\t\t\t\t\t\t'text' => array( 'title' => 'Above this is a post loop widget' , 'text' => 'Use multiple post loop widgets to feature stories anywhere on the page. This widget shows stories published in the past year, but you can select stories by category, tag, or other criteria.' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "function get_default_post_to_edit($post_type = 'post', $create_in_db = \\false)\n {\n }", "protected function setUp()\n {\n $this->post = Post::find(21); // it' a page with the custom fields\n }", "function pre_load_settings_page() {\r\n\r\n //** Default Help items */\r\n $contextual_help['Main'][] = '<h3>' . __('Main', WPI) . '</h3>';\r\n $contextual_help['Main'][] = '<p>' . __('<b>Business Name</b><br /> Enter your business name here. This field defaults to the blog name you chose during WordPress installation.', WPI) . '</p>';\r\n $contextual_help['Main'][] = '<p>' . __('<b>Business Address</b><br /> Enter your business address here. It will appear on the invoices and quotes you send.', WPI) . '</p>';\r\n $contextual_help['Main'][] = '<p>' . __('<b>Business Phone</b><br /> Enter your business phone here. It will appear on the invoices and quotes you send.', WPI) . '</p>';\r\n $contextual_help['Main'][] = '<p>' . __('<b>Email Address</b><br /> Enter your email address here. It will appear on the invoices and quotes you send.', WPI) . '</p>';\r\n $contextual_help['Main'][] = '<p>' . __('<b>Display Styles</b><br /> Here you can set, enable or disable the WP-Invoice default style settings. Change the default values only if you are an advanced user who understands CSS styles and is able to create their own stylesheets. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-main/\">More...</a>', WPI) . '</p>';\r\n $contextual_help['Main'][] = '<p>' . __('<b>Tax Handling</b><br /> Here you can set when tax calculation is done (depends on your country\\'s fiscal system) and you can define a global default tax. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-main/\">More...</a>', WPI) . '</p>';\r\n $contextual_help['Main'][] = '<p>' . __('<b>Advanced Settings</b><br /> These settings control advanced features that have to do with billing, installation features, design issues and general actions for administrators and developers. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-main/\">More...</a>', WPI) . '</p>';\r\n\r\n $contextual_help['Business Process'][] = '<h3>' . __('Business Process', WPI) . '</h3>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<b>When creating an invoice</b><br />Options for managing invoice creating process. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-business-process/\">More...</a>', WPI) . '</p>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<b>When viewing an invoice</b><br />Options for managing invoice view. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-business-process/\">More...</a>', WPI) . '</p>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<b>How to insert invoice</b><br />Here you have four choices that will define the way an invoice will appear on the invoice display page you have set before. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-business-process/\">More...</a>', WPI) . '</p>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<b>After a payment has been completed</b><br />Here we have options that will create automatic email notifications on successful payment of an invoice (partial or complete). <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-business-process/\">More...</a>', WPI) . '</p>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<b>Mail From options</b><br />This options allow you to change the default email address that WordPress sends it\\'s mail from, and the name of the sender that the email is from.') . '</p>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<b>Google Analytics Events Tracking</b><br />If you are using <a target=\"_blank\" href=\"http://code.google.com/intl/en/apis/analytics/docs/tracking/asyncTracking.html\">Google Analytics code snippet</a> for tracking site activity then you can do it better with WP-Invoice Event Tracking feature. Tick events you want to track in your Google Analytics account and see where/when/what people do. To view Events activity go to Content -> Events in your Google Analytics account.', WPI) . '</p>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<u>Attempting to pay Invoices</u> - event is triggered on clicking \"Process Payment\" button on Invoice page.', WPI) . '</p>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<u>View Invoices</u> - event is triggered when Invoice was viewed by the customer.', WPI) . '</p>';\r\n $contextual_help['Business Process'][] = '<p>' . __('<i>More Events soon!</i>', WPI) . '</p>';\r\n\r\n $contextual_help['Payment'][] = '<h3>' . __('Payment', WPI) . '</h3>';\r\n $contextual_help['Payment'][] = '<p>' . __('<b>Default Currency</b><br />Sets the default currency you will use in your invoices. Default value is U.S. Dollars.', WPI) . '</p>';\r\n $contextual_help['Payment'][] = '<p>' . __('<b>Currency list</b><br>This expandable area allows you to manage the list of currencies you have. You can add new currencies or remove existing ones.<br>Be aware, if you add a new currency please make sure that it corresponds to ISO 4217 and the currency code can be accepted by the payment services / gateways you are using. Here\\'s a <a href=\"http://en.wikipedia.org/wiki/List_of_circulating_currencies\">list of currencies</a> with ISO codes and currency symbols.<br>Note that you cannot delete a currency which has already been used in an existing invoice or that is currently selected as default. To do so, delete any invoices using that currency first.', WPI) . '</p>';\r\n\r\n $contextual_help['Payment'][] = '<p>' . __('<b>Default Payment Method</b><br />Here you can choose what default payment method you want to use for invoice payments.', WPI) . '</p>';\r\n $contextual_help['Payment'][] = '<p>' . __('<b>Payment Gateways</b><br />Here you can specify Gateways which you want to use for your invoices by default. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-payment/\">More...</a>', WPI) . '</p>';\r\n $contextual_help['Payment'][] = '<p>' . __('<b>Manual Payment Information</b><br />If you don\\'t want to use payment gateways but offline payments, or if an invoice has no payment gateways enabled, the text in this field will appear as a message to the customer, offering guidance on how to pay you. Write a short text with your bank account number or any other way you want to accept the offline payment. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-payment/\">More...</a>', WPI) . '</p>';\r\n\r\n $contextual_help['E-Mail Templates'][] = '<h3>' . __('E-Mail Templates', WPI) . '</h3>';\r\n $contextual_help['E-Mail Templates'][] = '<p>' . __('You can create as many e-mailed templates as needed, they can later be used to quickly create invoice notifications and reminders, and being sent directly from an invoice page. The following variables can be used within the Subject or the Content of the e-mail templates:', WPI) . '</p>';\r\n\r\n $email_vars['invoice_id'] = __('Invoice ID', WPI);\r\n $email_vars['link'] = __('URL of invoice', WPI);\r\n $email_vars['recipient'] = __('Name or business name of receipient', WPI);\r\n $email_vars['amount'] = __('Due BalanceID', WPI);\r\n $email_vars['subject'] = __('Invoice title', WPI);\r\n $email_vars['description'] = __('Description of Invoice', WPI);\r\n $email_vars['business_name'] = __('Business Name', WPI);\r\n $email_vars['business_email'] = __('Business Email Address', WPI);\r\n $email_vars['creator_name'] = __('Name of user who has created invoice', WPI);\r\n $email_vars['creator_email'] = __('Email of user who has created invoice', WPI);\r\n $email_vars['due_date'] = __('Invoice due date (if presented)', WPI);\r\n $email_vars['type'] = __('Replaced by Invoice Type. (invoice, recurring invoice, quote)', WPI);\r\n\r\n $email_vars = apply_filters('wpi_email_template_vars', $email_vars);\r\n\r\n if (is_array($email_vars)) {\r\n $contextual_help['E-Mail Templates'][] = '<ul>';\r\n foreach ($email_vars as $var => $title) {\r\n $contextual_help['E-Mail Templates'][] = '<li><b>%' . $var . '%</b> - ' . $title . '</li>';\r\n }\r\n $contextual_help['E-Mail Templates'][] = '</ul>';\r\n }\r\n\r\n $contextual_help['E-Mail Templates'][] = '<p><a href=\"https://usabilitydynamics.com/tutorials/wp-invoice/email-templates/\" target=\"_blank\">' . __('More...', WPI) . '</a></p>';\r\n\r\n $contextual_help['Line Items'][] = '<h3>' . __('Line Items', WPI) . '</h3>';\r\n $contextual_help['Line Items'][] = '<p>' . __('Predefined Line Items are common services and/or products that you can create once and use in your invoices. For example, if you are a Web professional and your usual invoice has at least an hour of Web Design or / and Web Development services, you can create these item entries to save yourself from typing it every time. When you create a new invoice or quote (with the Quotes Premium Feature), or edit an existing one, you will be able to select these items from a list and if you want, edit the name, description, quantity, price and tax. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-predefined-line-items/\">More...</a>', WPI) . '</p>';\r\n\r\n $contextual_help['Premium Features'][] = '<h3>' . __('Premium Features', WPI) . '</h3>';\r\n $contextual_help['Premium Features'][] = '<p>' . __('This tab show a list of the premium features which are available for purchase and those which you have purchased for WP-Invoice. You can see a list of features available for purchase in the WP-Invoice Premium Features section of our website. <a target=\"_blank\" href=\"https://usabilitydynamics.com/tutorials/wp-invoice/wp-invoice-settings-premium-features/\">More...</a>', WPI) . '</p>';\r\n\r\n $contextual_help['Help'][] = '<h3>' . __('Help', WPI) . '</h3>';\r\n $contextual_help['Help'][] = '<p>' . __('This tab will help you troubleshoot your plugin and check for updates for Premium Features', WPI) . '</p>';\r\n\r\n $contextual_help['Shortcodes'][] = '<h3>' . __('Shortcodes', WPI) . '</h3>';\r\n $contextual_help['Shortcodes'][] = '<p><b>' . __('Invoice History', WPI) . '</b></p>';\r\n $contextual_help['Shortcodes'][] = '<p>' . __('Shortcode:', WPI) . ' <code>[wp-invoice-history title=\"Your Title\"]</code></p>';\r\n $contextual_help['Shortcodes'][] = '<p>' . __(\"Works the same way as 'Invoice History' widget. Shows invoice list for currently logged in users.\", WPI) . '</p>';\r\n\r\n $contextual_help['Shortcodes'][] = '<p><b>' . __('Invoice Lookup', WPI) . '</b></p>';\r\n $contextual_help['Shortcodes'][] = '<p>' . __('Shortcode:', WPI) . ' <code>[wp-invoice-lookup message=\"Your Message\" button=\"Your Button\"]</code></p>';\r\n $contextual_help['Shortcodes'][] = '<p>' . __(\"Works the same way as 'Invoice Lookup' widget. Allows you to search your invoices by invoice numbers.\", WPI) . '</p>';\r\n //** Hook this action is you want to add info */\r\n $contextual_help = apply_filters('wpi_settings_page_help', $contextual_help);\r\n\r\n do_action('wpi_contextual_help', array('contextual_help' => $contextual_help));\r\n }", "function get_site_screen_help_tab_args()\n {\n }", "public function set_default_field_args( $field_args, $tab_key, $section_key ) {\n\n $type = isset($field_args['type']) ? $field_args['type'] : 'text';\n $conditions = isset($field_args['conditions']) ? $field_args['conditions'] : false;\n\n $disable = isset($field_args['disable']) ? boolval($field_args['disable']) : false;\n\n if ( isset($field_args['global']) && $field_args['global'] === true) {\n $disable = $this->is_disabled( $field_args['name'] ) ? true : $disable;\n $name_id = $this->get_option_prefix( $field_args['name'] );\n }\n else if ( isset($field_args['parent']) ) {\n $disable = $this->is_disabled( $field_args['name'], false, $section_key ) ? true : $disable;\n $name_id = $field_args['parent']['name_id'] . '[' . $field_args['name'] . ']';\n }\n else {\n $disable = $this->is_disabled( $field_args['name'], false, $section_key ) ? true : $disable;\n $name_id = $this->get_option_prefix($section_key . '[' . $field_args['name'] . ']');\n }\n\n $args = array(\n 'id' => $field_args['name'],\n 'name_id' => $name_id,\n 'label_for' => $args['label_for'] = \"{$section_key}[{$field_args['name']}]\",\n 'desc' => isset($field_args['desc']) ? $field_args['desc'] : '',\n 'placeholder' => isset($field_args['placeholder']) ? $field_args['placeholder'] : '',\n 'global' => isset($field_args['global']) ? boolval($field_args['global']) : false,\n 'label' => isset($field_args['label']) ? $field_args['label'] : '',\n 'title' => isset($field_args['title']) ? $field_args['title'] : '',\n 'tab' => $tab_key,\n 'section' => $section_key,\n 'parent' => isset($field_args['parent']) ? $field_args['parent'] : false,\n 'size' => isset($field_args['size']) ? $field_args['size'] : null,\n 'options' => isset($field_args['options']) ? $field_args['options'] : '',\n 'std' => isset($field_args['default']) ? $field_args['default'] : '',\n 'disable' => $disable,\n 'sanitize_callback' => isset($field_args['sanitize_callback']) ? $field_args['sanitize_callback'] : '',\n 'type' => $type,\n 'sub_fields' => ( $type === 'sub_fields' && isset($field_args['sub_fields']) ) ? $field_args['sub_fields'] : false,\n 'display' => (isset($field_args['display'])) ? $field_args['display'] : '',\n 'conditions' => $conditions\n );\n\n return $args;\n }", "function lightning_media_post_bs4_widget_default_options( $default_options ) {\n\t\t$default_options = array(\n\t\t\t'count' => 6,\n\t\t\t'offset' => '',\n\t\t\t'title' => __( 'Recent Posts', 'media-post-bs4-textdomain' ),\n\t\t\t'post_type' => array( 'post' => 1 ), // クエリに投げる形式は違うので要変換.\n\t\t\t'terms' => '',\n\t\t\t'layout' => 'media',\n\t\t\t'col_xs' => 1,\n\t\t\t'col_sm' => 1,\n\t\t\t'col_md' => 1,\n\t\t\t'col_lg' => 1,\n\t\t\t'col_xl' => 1,\n\t\t\t'display_image' => true,\n\t\t\t'display_image_overlay_term' => true,\n\t\t\t'display_excerpt' => false,\n\t\t\t'display_date' => true,\n\t\t\t'display_new' => true,\n\t\t\t'new_date' => 7,\n\t\t\t'new_text' => 'New!!',\n\t\t\t'btn_text' => __( 'Read more', 'media-post-bs4-textdomain' ),\n\t\t\t'btn_align' => 'text-right',\n\t\t);\n\t\treturn $default_options;\n\t}" ]
[ "0.6301038", "0.6133395", "0.60831714", "0.6061171", "0.5944418", "0.5856443", "0.5796426", "0.576162", "0.5754492", "0.5735988", "0.56655335", "0.56044525", "0.5584979", "0.55499923", "0.5523067", "0.551069", "0.55074257", "0.54819846", "0.5405473", "0.5364972", "0.5360249", "0.53483284", "0.53435725", "0.53204066", "0.5315727", "0.5312722", "0.5312663", "0.5312663", "0.53000367", "0.5299209", "0.5297914", "0.5287341", "0.5286436", "0.52861285", "0.52376515", "0.52375996", "0.5221841", "0.52088875", "0.52004063", "0.51918393", "0.51858574", "0.51854825", "0.518027", "0.5171785", "0.5164196", "0.5160259", "0.515815", "0.51551694", "0.51482034", "0.51360804", "0.5135674", "0.51353294", "0.5133895", "0.51132166", "0.5104579", "0.51033765", "0.50978404", "0.5094713", "0.50939685", "0.507494", "0.50738794", "0.5071153", "0.50630367", "0.50504935", "0.50470454", "0.5040748", "0.5022845", "0.5015641", "0.50109226", "0.5008346", "0.5007675", "0.50070816", "0.500547", "0.5004425", "0.49973533", "0.49917546", "0.49915463", "0.49893808", "0.49836636", "0.49816906", "0.4977434", "0.4969682", "0.49696577", "0.49693388", "0.49668232", "0.49656078", "0.4964951", "0.4964174", "0.49636787", "0.4962448", "0.49620327", "0.49568802", "0.49558702", "0.49546614", "0.4952107", "0.49501044", "0.49488044", "0.4948103", "0.49472558", "0.4945238" ]
0.790967
0
Set icon paths Sets the URLs and file system paths for the social media icons, which can also be customized via filters.
private function setIconPaths() { // Directory URL and path $plugin = CGIT_SOCIALIZE_PLUGIN; $dir = 'icons'; $url = plugin_dir_url($plugin) . $dir; $path = plugin_dir_path($plugin) . $dir; // Apply filters for customization $ext = apply_filters('cgit_socialize_icon_extension', '.svg'); $url = apply_filters('cgit_socialize_icon_url', $url); $path = apply_filters('cgit_socialize_icon_path', $path); // Make sure directories have trailing slashes $url = trailingslashit($url); $path = trailingslashit($path); // Add URLs and paths to each network foreach ($this->networks as $key => $value) { $this->networks[$key]['icon'] = $url . $key . $ext; $this->networks[$key]['icon_path'] = $path . $key . $ext; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIcons() {\n\t\t$this->icons = array(\n\t\t\t'slider' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'carousel' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'testimonial' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'portfolio' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'options' => 'dashicons-admin-generic'\n\t\t);\n\t}", "public static function addIconPath($path) {\n\t\tstatic::$iconPaths[] = $path;\n\t}", "function load_icons() {\n themify_get_icon( 'ti-import' );\n themify_get_icon( 'ti-export' );\n Themify_Enqueue_Assets::loadIcons();\n }", "public function set_icon_sizes($sizes)\n {\n $this->icon_sizes = $sizes;\n }", "static public function get_social_icons() {\n\t\t$icons = array(\n\t\t\t'' => '',\n\t\t\t'im-icon-google-plus' => 'Google Plus',\n\t\t\t'im-icon-google-drive' => 'Google Drive',\n\t\t\t'im-icon-facebook' => 'Facebook',\n\t\t\t'im-icon-instagram' => 'Instagram',\n\t\t\t'fa-icon-instagram' => 'Instagram (2)',\n\t\t\t'im-icon-twitter' => 'Twitter',\n\t\t\t'im-icon-feed-2' => 'RSS',\n\t\t\t'im-icon-youtube' => 'Youtube',\n\t\t\t'im-icon-vimeo' => 'Vimeo',\n\t\t\t'im-icon-flickr' => 'Flickr',\n\t\t\t'im-icon-picassa' => 'Picassa',\n\t\t\t'im-icon-dribble' => 'Dribbble',\n\t\t\t'im-icon-deviantart-2' => 'Deviantart',\n\t\t\t'im-icon-forrst' => 'Forrst',\n\t\t\t'im-icon-steam' => 'Steam',\n\t\t\t'im-icon-github-3' => 'Github',\n\t\t\t'im-icon-wordpress' => 'Wordpress',\n\t\t\t'im-icon-joomla' => 'Joomla',\n\t\t\t'im-icon-blogger' => 'Blogger',\n\t\t\t'im-icon-tumblt' => 'Tumblt',\n\t\t\t'im-icon-yahoo' => 'Yahoo',\n\t\t\t'im-icon-skype' => 'Skype',\n\t\t\t'im-icon-reddit' => 'Reddit',\n\t\t\t'im-icon-linkedin' => 'Linkedin',\n\t\t\t'im-icon-lastfm' => 'Lastfm',\n\t\t\t'im-icon-delicious' => 'Delicious',\n\t\t\t'im-icon-stumbleupon' => 'Stumbleupon',\n\t\t\t'im-icon-stackoveratom' => 'Stackoveratom',\n\t\t\t'im-icon-pinterest-2' => 'Pinterest',\n\t\t\t'im-icon-xing' => 'Xing',\n\t\t\t'im-icon-flattr' => 'Flattr',\n\t\t\t'im-icon-foursquare-2' => 'Foursquare',\n\t\t\t'im-icon-yelp' => 'Yelp',\n\t\t\t'fa-icon-renren' => 'Renren',\n\t\t\t'fa-icon-vk' => 'Vk',\n\t\t\t'fa-icon-stackexchange' => 'Stackexchange',\n\t\t );\n\t\tasort( $icons );\n\t\treturn $icons;\n\t}", "public function prepare_icon_set() {\n\n\t\t\tif ( empty( $this->settings['icon_data']['icons'] ) ) {\n\t\t\t\t$this->maybe_parse_set_from_css();\n\t\t\t}\n\n\t\t\tif ( ! array_key_exists( $this->settings['icon_data']['icon_set'], self::$sets ) ) {\n\t\t\t\tself::$sets[ $this->settings['icon_data']['icon_set'] ] = array(\n\t\t\t\t\t'iconCSS' => $this->settings['icon_data']['icon_css'],\n\t\t\t\t\t'iconBase' => $this->settings['icon_data']['icon_base'],\n\t\t\t\t\t'iconPrefix' => $this->settings['icon_data']['icon_prefix'],\n\t\t\t\t\t'icons' => $this->settings['icon_data']['icons'],\n\t\t\t\t);\n\t\t\t}\n\t\t}", "public function setIcon($icon);", "protected function buildCssAndRegisterIcons() {}", "function register_block_core_site_icon_setting()\n {\n }", "function h_get_social_icon($slug = null) {\n $list = apply_filters('h_social_icons', [\n 'facebook' => [\n 'label' => __( 'Facebook' ),\n 'color' => '#1977f2',\n 'placeholder' => 'https://www.facebook.com/your-page',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z\"></path></svg>',\n ],\n\n 'twitter' => [\n 'label' => __( 'Twitter' ),\n 'color' => '#21a1f3',\n 'placeholder' => 'https://twitter.com/your-username',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z\"></path></svg>',\n ],\n\n 'instagram' => [\n 'label' => __( 'Instagram' ),\n 'color' => '#f00075',\n 'placeholder' => 'https://instagram.com/your-username',\n 'svg' => '<svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z\"></path></svg>',\n ],\n\n 'whatsapp' => [\n 'label' => __( 'WhatsApp' ),\n 'color' => '#25d366',\n 'placeholder' => 'https://wa.me/6281234567890',\n 'svg' => '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 448 512\"><path d=\"M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z\"/></svg>'\n // 'svg' => '<svg width=\"18\" height=\"18\" viewBox=\"0 0 20 20\">\n // <path d=\"M10,0C4.5,0,0,4.5,0,10c0,1.9,0.5,3.6,1.4,5.1L0.1,20l5-1.3C6.5,19.5,8.2,20,10,20c5.5,0,10-4.5,10-10S15.5,0,10,0zM6.6,5.3c0.2,0,0.3,0,0.5,0c0.2,0,0.4,0,0.6,0.4c0.2,0.5,0.7,1.7,0.8,1.8c0.1,0.1,0.1,0.3,0,0.4C8.3,8.2,8.3,8.3,8.1,8.5C8,8.6,7.9,8.8,7.8,8.9C7.7,9,7.5,9.1,7.7,9.4c0.1,0.2,0.6,1.1,1.4,1.7c0.9,0.8,1.7,1.1,2,1.2c0.2,0.1,0.4,0.1,0.5-0.1c0.1-0.2,0.6-0.7,0.8-1c0.2-0.2,0.3-0.2,0.6-0.1c0.2,0.1,1.4,0.7,1.7,0.8s0.4,0.2,0.5,0.3c0.1,0.1,0.1,0.6-0.1,1.2c-0.2,0.6-1.2,1.1-1.7,1.2c-0.5,0-0.9,0.2-3-0.6c-2.5-1-4.1-3.6-4.2-3.7c-0.1-0.2-1-1.3-1-2.6c0-1.2,0.6-1.8,0.9-2.1C6.1,5.4,6.4,5.3,6.6,5.3z\"/>\n // </svg>',\n ],\n\n 'phone' => [\n 'label' => __( 'Phone' ),\n 'color' => 'var(--main)',\n 'placeholder' => 'tel:+12-3456-789',\n 'svg' => '<svg width=\"18\" height=\"18\" viewBox=\"0 0 512 512\"><path d=\"M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z\"/></svg>',\n ],\n\n 'email' => [\n 'label' => __( 'Email' ),\n 'color' => 'var(--main)',\n 'placeholder' => 'mailto:[email protected]',\n 'svg' => '<svg width=\"18\" height=\"18\" viewBox=\"0 0 512 512\"><path d=\"M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z\"/></svg>',\n ],\n\n 'location' => [\n 'label' => __( 'Location' ),\n 'color' => 'var(--main)',\n 'placeholder' => 'https://goo.gl/maps/abcdefghij',\n 'svg' => '<svg width=\"18\" height=\"18\" viewBox=\"0 0 384 512\"><path d=\"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z\"/></svg>',\n ],\n\n 'fax' => [\n 'label' => __( 'Fax' ),\n 'color' => 'var(--main)',\n 'placeholder' => 'fax:+1234567890',\n 'svg' => '<svg width=\"18\" height=\"18\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M480 160V77.25a32 32 0 0 0-9.38-22.63L425.37 9.37A32 32 0 0 0 402.75 0H160a32 32 0 0 0-32 32v448a32 32 0 0 0 32 32h320a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32zM288 432a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm128 128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-112H192V64h160v48a16 16 0 0 0 16 16h48zM64 128H32a32 32 0 0 0-32 32v320a32 32 0 0 0 32 32h32a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32z\"/></svg>',\n ],\n\n 'dribbble' => [\n 'label' => __( 'Dribbble' ),\n 'color' => '#e94c89',\n 'placeholder' => 'https://dribbble.com/username',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z\"></path></svg>'\n ],\n\n 'github' => [\n 'label' => __( 'Github' ),\n 'color' => '#24292d',\n 'placeholder' => 'https://github.com/username',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z\"></path></svg>'\n ],\n\n 'linkedin' => [\n 'label' => __( 'LinkedIn' ),\n 'color' => '#0577b5',\n 'placeholder' => 'https://www.linkedin.com/in/your-username',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z\"></path></svg>',\n ],\n\n 'patreon' => [\n 'label' => __( 'Patreon' ),\n 'color' => '#ff424d',\n 'placeholder' => 'https://patreon.com/username',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 569 546\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><circle cx=\"363\" cy=\"205\" r=\"205\"></circle><rect width=\"100\" height=\"546\" x=\"0\" y=\"0\"></rect></svg>'\n ],\n\n 'pinterest' => [\n 'label' => __( 'Pinterest' ),\n 'color' => '#e60122',\n 'placeholder' => 'https://pinterest.com/your-username',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2\"></path></svg>',\n ],\n\n 'pocket' => [\n 'label' => __( 'Pocket' ),\n 'color' => '#ef4155',\n 'placeholder' => 'https://getpocket.com/',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z\"></path></svg>',\n ],\n\n 'skype' => [\n 'label' => __( 'Skype' ),\n 'color' => '#0478d7',\n 'placeholder' => 'skype:your-username?chat',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z\"></path></svg>',\n ],\n\n 'reddit' => [\n 'label' => __( 'reddit' ),\n 'color' => '#fe4500',\n 'placeholder' => 'https://www.reddit.com/user/yourname',\n 'svg' => '<svg width=\"20px\" height=\"20px\" viewBox=\"0 0 512 512\">\n <path d=\"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z\"/></svg>',\n ],\n\n 'telegram' => [\n 'label' => __( 'Telegram' ),\n 'color' => '#08c',\n 'placeholder' => 'https://t.me/your-username',\n 'svg' => '<svg width=\"18\" height=\"20\" viewBox=\"0 0 20 20\">\n <path d=\"M19.9,3.1l-3,14.2c-0.2,1-0.8,1.3-1.7,0.8l-4.6-3.4l-2.2,2.1c-0.2,0.2-0.5,0.5-0.9,0.5l0.3-4.7L16.4,5c0.4-0.3-0.1-0.5-0.6-0.2L5.3,11.4L0.7,10c-1-0.3-1-1,0.2-1.5l17.7-6.8C19.5,1.4,20.2,1.9,19.9,3.1z\"/>\n </svg>',\n ],\n\n 'tiktok' => [\n 'label' => __( 'Tiktok' ),\n 'color' => '#000',\n 'placeholder' => '',\n // 'svg' => '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 448 512\"><path d=\"M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z\"/></svg>',\n 'svg' => '<svg width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M16.708 0.027c1.745-0.027 3.48-0.011 5.213-0.027 0.105 2.041 0.839 4.12 2.333 5.563 1.491 1.479 3.6 2.156 5.652 2.385v5.369c-1.923-0.063-3.855-0.463-5.6-1.291-0.76-0.344-1.468-0.787-2.161-1.24-0.009 3.896 0.016 7.787-0.025 11.667-0.104 1.864-0.719 3.719-1.803 5.255-1.744 2.557-4.771 4.224-7.88 4.276-1.907 0.109-3.812-0.411-5.437-1.369-2.693-1.588-4.588-4.495-4.864-7.615-0.032-0.667-0.043-1.333-0.016-1.984 0.24-2.537 1.495-4.964 3.443-6.615 2.208-1.923 5.301-2.839 8.197-2.297 0.027 1.975-0.052 3.948-0.052 5.923-1.323-0.428-2.869-0.308-4.025 0.495-0.844 0.547-1.485 1.385-1.819 2.333-0.276 0.676-0.197 1.427-0.181 2.145 0.317 2.188 2.421 4.027 4.667 3.828 1.489-0.016 2.916-0.88 3.692-2.145 0.251-0.443 0.532-0.896 0.547-1.417 0.131-2.385 0.079-4.76 0.095-7.145 0.011-5.375-0.016-10.735 0.025-16.093z\"></path></svg>'\n ],\n\n 'tumblr' => [\n 'label' => __( 'Tumblr' ),\n 'color' => '#011835',\n 'placeholder' => 'https://www.tumblr.com/blog/yourname',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z\"></path></svg>',\n ],\n\n 'twitch' => [\n 'label' => __( 'Twitch' ),\n 'color' => '#6440a4',\n 'placeholder' => 'https://twitch.tv/username',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z\"></path></svg>'\n ],\n\n 'wechat' => [\n 'label' => __( 'WeChat' ),\n 'color' => '#7bb32e',\n 'placeholder' => 'weixin://dl/chat?your-username',\n 'svg' => '<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\">\n <path d=\"M13.5,6.8c0.2,0,0.5,0,0.7,0c-0.6-2.9-3.7-5-7.1-5C3.2,1.9,0,4.5,0,7.9c0,1.9,1.1,3.5,2.8,4.8l-0.7,2.1l2.5-1.2c0.9,0.2,1.6,0.4,2.5,0.4c0.2,0,0.4,0,0.7,0c-0.1-0.5-0.2-1-0.2-1.5C7.5,9.3,10.2,6.8,13.5,6.8L13.5,6.8zM9.7,4.9c0.5,0,0.9,0.4,0.9,0.9c0,0.5-0.4,0.9-0.9,0.9c-0.5,0-1.1-0.4-1.1-0.9C8.7,5.2,9.2,4.9,9.7,4.9zM4.8,6.6c-0.5,0-1.1-0.4-1.1-0.9c0-0.5,0.5-0.9,1.1-0.9c0.5,0,0.9,0.4,0.9,0.9C5.7,6.3,5.3,6.6,4.8,6.6z M20,12.3c0-2.8-2.8-5.1-6-5.1c-3.4,0-6,2.3-6,5.1s2.6,5.1,6,5.1c0.7,0,1.4-0.2,2.1-0.4l1.9,1.1l-0.5-1.8C18.9,15.3,20,13.9,20,12.3zM12,11.4c-0.4,0-0.7-0.4-0.7-0.7c0-0.4,0.4-0.7,0.7-0.7c0.5,0,0.9,0.4,0.9,0.7C12.9,11.1,12.6,11.4,12,11.4zM15.9,11.4c-0.4,0-0.7-0.4-0.7-0.7c0-0.4,0.4-0.7,0.7-0.7c0.5,0,0.9,0.4,0.9,0.7C16.8,11.1,16.5,11.4,15.9,11.4z\"/>\n </svg>',\n ],\n\n 'youtube' => [\n 'label' => __( 'YouTube' ),\n 'color' => '#ff0100',\n 'placeholder' => 'https://www.youtube.com/channel/your-channel',\n 'svg' => '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z\"></path></svg>',\n ],\n ]);\n\n if (isset($slug)) {\n return $list[$slug] ?? trigger_error(\"Social Item \\\"{$slug}\\\" does not exists\");\n }\n\n return $list;\n}", "function anva_social_icons() {\n\t$class = 'normal';\n\t$size = 24;\n\tprintf(\n\t\t'<ul class=\"social-media social-style-%2$s social-icon-%3$s\">%1$s</ul>',\n\t\tanva_social_media(),\n\t\tapply_filters( 'anva_social_media_style', $class ),\n\t\tapply_filters( 'anva_social_media_size', $size )\n\t);\n}", "function bridge_qode_register_social_icon_widget( $widgets ) {\n\t\t$widgets[] = 'BridgeQodeSocialIcon';\n\n\t\treturn $widgets;\n\t}", "function ds_register_social_icons_widget() {\n\tregister_widget( 'ds_Social_Icons_Widget' );\n}", "protected function setIconPath($list) {\n $module = $this->getModule();\n $config = Pi::config('', $module);\n\n $rootPath = $this->rootPath();\n $rootUrl = $this->rootUrl();\n $uploadPath = $this->tmpPath();\n $uploadUrl = $this->tmpUrl();\n $prefixLen = strlen($uploadUrl);\n\n $items = array();\n foreach ($list as $item) {\n if ($uploadUrl == substr($item['icon'], 0, $prefixLen)) {\n $imgName = substr($item['icon'], $prefixLen);\n $renamed = rename(\n $uploadPath . $imgName,\n $rootPath . $imgName\n );\n if ($renamed) {\n $item['image'] = $rootUrl . '/' . $imgName;\n $item['filename'] = $imgName;\n }\n }\n $items[] = $item;\n }\n\n return $items;\n }", "function my_social_media_icons() {\n\t$social_sites = my_customizer_social_media_array();\n\t/* any inputs that aren't empty are stored in $active_sites array */\n\tforeach($social_sites as $social_site) {\n\t\tif( strlen( get_theme_mod( $social_site ) ) > 0 ) {\n\t\t$active_sites[] = $social_site;\n\t\t}\n\t}\n\t/* for each active social site, add it as a list item */\n\tif ( ! empty( $active_sites ) ) {\n\t\techo \"<ul class='social-media-icons'>\";\n\t\tforeach ( $active_sites as $active_site ) {\n\t\t\t/* setup the class */\n\t\t\t$class = 'fab fa-' . $active_site;\n\t\t\tif ( $active_site == 'email' ) {\n\t\t\t?>\n\t\t\t<li>\n\t\t\t<a class=\"email\" target=\"_blank\" href=\"mailto:<?php echo antispambot( is_email( get_theme_mod( $active_site ) ) ); ?>\">\n\t\t\t<i class=\"fab fa-envelope\" title=\"<?php _e('email icon', 'text-domain'); ?>\"></i>\n\t\t\t</a>\n\t\t\t</li>\n\t\t\t<?php } else { ?>\n\t\t\t<li>\n\t\t\t<a class=\"<?php echo $active_site; ?>\" target=\"_blank\" href=\"<?php echo esc_url( get_theme_mod( $active_site) ); ?>\">\n\t\t\t<i class=\"<?php echo esc_attr( $class ); ?>\" title=\"<?php printf( __('%s icon', 'text-domain'), $active_site ); ?>\"></i>\n\t\t\t</a>\n\t\t\t</li>\n\t\t\t<?php\n\t\t\t}\n\t\t}\n\t\techo \"</ul>\";\n\t}\n}", "function atom_site_icon()\n {\n }", "function klippe_mikado_register_social_icons_widget( $widgets ) {\n\t\t$widgets[] = 'KlippeMikadoClassIconsGroupWidget';\n\t\t\n\t\treturn $widgets;\n\t}", "protected function register_content_social_icons_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'section_social_icon',\n\t\t\tarray(\n\t\t\t\t'label' => 'Social Icons',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icons_settings',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Social Icons', 'uael' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'uael' ),\n\t\t\t\t'label_off' => __( 'Hide', 'uael' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t)\n\t\t);\n\n\t\t$repeater = new Repeater();\n\n\t\tif ( UAEL_Helper::is_elementor_updated() ) {\n\t\t\t$repeater->add_control(\n\t\t\t\t'new_social',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Icon', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::ICONS,\n\t\t\t\t\t'fa4compatibility' => 'social',\n\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t'value' => 'fab fa-wordpress',\n\t\t\t\t\t\t'library' => 'fa-brands',\n\t\t\t\t\t),\n\t\t\t\t\t'recommended' => array(\n\t\t\t\t\t\t'fa-brands' => array(\n\t\t\t\t\t\t\t'android',\n\t\t\t\t\t\t\t'apple',\n\t\t\t\t\t\t\t'behance',\n\t\t\t\t\t\t\t'bitbucket',\n\t\t\t\t\t\t\t'codepen',\n\t\t\t\t\t\t\t'delicious',\n\t\t\t\t\t\t\t'deviantart',\n\t\t\t\t\t\t\t'digg',\n\t\t\t\t\t\t\t'dribbble',\n\t\t\t\t\t\t\t'elementor',\n\t\t\t\t\t\t\t'facebook',\n\t\t\t\t\t\t\t'flickr',\n\t\t\t\t\t\t\t'foursquare',\n\t\t\t\t\t\t\t'free-code-camp',\n\t\t\t\t\t\t\t'github',\n\t\t\t\t\t\t\t'gitlab',\n\t\t\t\t\t\t\t'globe',\n\t\t\t\t\t\t\t'google-plus',\n\t\t\t\t\t\t\t'houzz',\n\t\t\t\t\t\t\t'instagram',\n\t\t\t\t\t\t\t'jsfiddle',\n\t\t\t\t\t\t\t'linkedin',\n\t\t\t\t\t\t\t'medium',\n\t\t\t\t\t\t\t'meetup',\n\t\t\t\t\t\t\t'mixcloud',\n\t\t\t\t\t\t\t'odnoklassniki',\n\t\t\t\t\t\t\t'pinterest',\n\t\t\t\t\t\t\t'product-hunt',\n\t\t\t\t\t\t\t'reddit',\n\t\t\t\t\t\t\t'shopping-cart',\n\t\t\t\t\t\t\t'skype',\n\t\t\t\t\t\t\t'slideshare',\n\t\t\t\t\t\t\t'snapchat',\n\t\t\t\t\t\t\t'soundcloud',\n\t\t\t\t\t\t\t'spotify',\n\t\t\t\t\t\t\t'stack-overflow',\n\t\t\t\t\t\t\t'steam',\n\t\t\t\t\t\t\t'stumbleupon',\n\t\t\t\t\t\t\t'telegram',\n\t\t\t\t\t\t\t'thumb-tack',\n\t\t\t\t\t\t\t'tripadvisor',\n\t\t\t\t\t\t\t'tumblr',\n\t\t\t\t\t\t\t'twitch',\n\t\t\t\t\t\t\t'twitter',\n\t\t\t\t\t\t\t'viber',\n\t\t\t\t\t\t\t'vimeo',\n\t\t\t\t\t\t\t'vk',\n\t\t\t\t\t\t\t'weibo',\n\t\t\t\t\t\t\t'weixin',\n\t\t\t\t\t\t\t'whatsapp',\n\t\t\t\t\t\t\t'wordpress',\n\t\t\t\t\t\t\t'xing',\n\t\t\t\t\t\t\t'yelp',\n\t\t\t\t\t\t\t'youtube',\n\t\t\t\t\t\t\t'500px',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'fa-solid' => array(\n\t\t\t\t\t\t\t'envelope',\n\t\t\t\t\t\t\t'link',\n\t\t\t\t\t\t\t'rss',\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} else {\n\t\t\t$repeater->add_control(\n\t\t\t\t'social',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Icon', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::ICON,\n\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t'default' => 'fa fa-wordpress',\n\t\t\t\t\t'include' => array(\n\t\t\t\t\t\t'fa fa-android',\n\t\t\t\t\t\t'fa fa-apple',\n\t\t\t\t\t\t'fa fa-behance',\n\t\t\t\t\t\t'fa fa-bitbucket',\n\t\t\t\t\t\t'fa fa-codepen',\n\t\t\t\t\t\t'fa fa-delicious',\n\t\t\t\t\t\t'fa fa-deviantart',\n\t\t\t\t\t\t'fa fa-digg',\n\t\t\t\t\t\t'fa fa-dribbble',\n\t\t\t\t\t\t'fa fa-envelope',\n\t\t\t\t\t\t'fa fa-facebook',\n\t\t\t\t\t\t'fa fa-flickr',\n\t\t\t\t\t\t'fa fa-foursquare',\n\t\t\t\t\t\t'fa fa-free-code-camp',\n\t\t\t\t\t\t'fa fa-github',\n\t\t\t\t\t\t'fa fa-gitlab',\n\t\t\t\t\t\t'fa fa-google-plus',\n\t\t\t\t\t\t'fa fa-houzz',\n\t\t\t\t\t\t'fa fa-instagram',\n\t\t\t\t\t\t'fa fa-jsfiddle',\n\t\t\t\t\t\t'fa fa-linkedin',\n\t\t\t\t\t\t'fa fa-medium',\n\t\t\t\t\t\t'fa fa-meetup',\n\t\t\t\t\t\t'fa fa-mixcloud',\n\t\t\t\t\t\t'fa fa-odnoklassniki',\n\t\t\t\t\t\t'fa fa-pinterest',\n\t\t\t\t\t\t'fa fa-product-hunt',\n\t\t\t\t\t\t'fa fa-reddit',\n\t\t\t\t\t\t'fa fa-rss',\n\t\t\t\t\t\t'fa fa-shopping-cart',\n\t\t\t\t\t\t'fa fa-skype',\n\t\t\t\t\t\t'fa fa-slideshare',\n\t\t\t\t\t\t'fa fa-snapchat',\n\t\t\t\t\t\t'fa fa-soundcloud',\n\t\t\t\t\t\t'fa fa-spotify',\n\t\t\t\t\t\t'fa fa-stack-overflow',\n\t\t\t\t\t\t'fa fa-steam',\n\t\t\t\t\t\t'fa fa-stumbleupon',\n\t\t\t\t\t\t'fa fa-telegram',\n\t\t\t\t\t\t'fa fa-thumb-tack',\n\t\t\t\t\t\t'fa fa-tripadvisor',\n\t\t\t\t\t\t'fa fa-tumblr',\n\t\t\t\t\t\t'fa fa-twitch',\n\t\t\t\t\t\t'fa fa-twitter',\n\t\t\t\t\t\t'fa fa-vimeo',\n\t\t\t\t\t\t'fa fa-vk',\n\t\t\t\t\t\t'fa fa-weibo',\n\t\t\t\t\t\t'fa fa-weixin',\n\t\t\t\t\t\t'fa fa-whatsapp',\n\t\t\t\t\t\t'fa fa-wordpress',\n\t\t\t\t\t\t'fa fa-xing',\n\t\t\t\t\t\t'fa fa-yelp',\n\t\t\t\t\t\t'fa fa-youtube',\n\t\t\t\t\t\t'fa fa-500px',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$repeater->add_control(\n\t\t\t'link',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Link', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'is_external' => 'true',\n\t\t\t\t),\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'uael' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icon_list',\n\t\t\tarray(\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'fields' => $repeater->get_controls(),\n\t\t\t\t'default' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'new_social' => array(\n\t\t\t\t\t\t\t'value' => 'fab fa-facebook',\n\t\t\t\t\t\t\t'library' => 'fa-brands',\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'new_social' => array(\n\t\t\t\t\t\t\t'value' => 'fab fa-twitter',\n\t\t\t\t\t\t\t'library' => 'fa-brands',\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'new_social' => array(\n\t\t\t\t\t\t\t'value' => 'fab fa-google-plus',\n\t\t\t\t\t\t\t'library' => 'fa-brands',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icons_settings' => 'yes',\n\t\t\t\t),\n\t\t\t\t'title_field' => '<# var migrated = \"undefined\" !== typeof __fa4_migrated, social = ( \"undefined\" === typeof social ) ? false : social; #>{{{ elementor.helpers.getSocialNetworkNameFromIcon( new_social, social, true, migrated, true ) }}}',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'shape',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Shape', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'square',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'square' => __( 'Square', 'uael' ),\n\t\t\t\t\t'rounded' => __( 'Rounded', 'uael' ),\n\t\t\t\t\t'circle' => __( 'Circle', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'prefix_class' => 'elementor-shape-',\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icons_settings' => 'yes',\n\t\t\t\t),\n\t\t\t\t'default' => 'rounded',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icons_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'right' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'bottom' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'left' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'shape' => array( 'rounded' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\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 }", "private function setIcon(\\Scrivo\\Str $icon) {\n\t\t$this->icon = $icon;\n\t}", "public function social_icons() {\n\t\t$enabled_socials = get_theme_mod( 'hestia_enable_sharing_icons', true );\n\t\tif ( (bool) $enabled_socials !== true ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_link = esc_url( get_the_permalink() );\n\t\t$post_title = get_the_title();\n\n\t\t$facebook_url =\n\t\t\tesc_url(\n\t\t\t\tadd_query_arg(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'u' => $post_link,\n\t\t\t\t\t),\n\t\t\t\t\t'https://www.facebook.com/sharer.php'\n\t\t\t\t)\n\t\t\t);\n\n\t\t$twitter_url =\n\t\t\tesc_url(\n\t\t\t\tadd_query_arg(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'url' => $post_link,\n\t\t\t\t\t\t'text' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ),\n\t\t\t\t\t),\n\t\t\t\t\t'http://twitter.com/share'\n\t\t\t\t)\n\t\t\t);\n\n\t\t$email_title = str_replace( '&', '%26', $post_title );\n\n\t\t$email_url =\n\t\t\tesc_url(\n\t\t\t\tadd_query_arg(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'subject' => wp_strip_all_tags( $email_title ),\n\t\t\t\t\t\t'body' => $post_link,\n\t\t\t\t\t),\n\t\t\t\t\t'mailto:'\n\t\t\t\t)\n\t\t\t);\n\n\t\t$social_links = '\n <div class=\"col-md-6\">\n <div class=\"entry-social\">\n <a target=\"_blank\" rel=\"tooltip\"\n data-original-title=\"' . esc_attr__( 'Share on Facebook', 'hestia' ) . '\"\n class=\"btn btn-just-icon btn-round btn-facebook\"\n href=\"' . $facebook_url . '\">\n <i class=\"fab fa-facebook-f\"></i>\n </a>\n \n <a target=\"_blank\" rel=\"tooltip\"\n data-original-title=\"' . esc_attr__( 'Share on Twitter', 'hestia' ) . '\"\n class=\"btn btn-just-icon btn-round btn-twitter\"\n href=\"' . $twitter_url . '\">\n <i class=\"fab fa-twitter\"></i>\n </a>\n \n <a rel=\"tooltip\"\n data-original-title=\" ' . esc_attr__( 'Share on Email', 'hestia' ) . '\"\n class=\"btn btn-just-icon btn-round\"\n href=\"' . $email_url . '\">\n <i class=\"fas fa-envelope\"></i>\n </a>\n </div>\n\t\t</div>';\n\t\techo apply_filters( 'hestia_filter_blog_social_icons', $social_links );\n\t}", "function widgets_icons($widgets){\n\t$widgets['SiteOrigin_Panels_Widgets_Layout']['icon'] = 'dashicons dashicons-analytics';\n\t$widgets['button']['icon'] = 'dashicons dashicons-admin-links';\n\t$widgets['SiteOrigin_Widget_GoogleMap_Widget']['icon'] = 'dashicons dashicons-location-alt';\n\treturn $widgets;\n}", "public function setIcon($ext = null, $basename = false, $icon = '')\n\t{\n\t\tif ($this->get('icon') && $this->get('ext') == $ext)\n\t\t{\n\t\t\treturn $this->get('icon');\n\t\t}\n\t\tif ($icon)\n\t\t{\n\t\t\t$this->set('icon', $icon);\n\t\t\treturn $this->get('icon');\n\t\t}\n\t\tif ($this->get('type') == 'folder')\n\t\t{\n\t\t\t$ext = 'folder';\n\t\t}\n\n\t\t$ext = $ext ? $ext : $this->get('ext');\n\t\t$icon = self::getIconImage($ext, $basename);\n\n\t\t$this->set('icon', $icon);\n\t}", "public function icon($icon);", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "protected function registerTCAIcons() {}", "function kvell_edge_register_social_icon_widget( $widgets ) {\n\t\t$widgets[] = 'KvellEdgeSocialIconWidget';\n\t\t\n\t\treturn $widgets;\n\t}", "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfIconPathIsGiven() {}", "public function setEntryPaths($paths);", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}", "function klippe_mikado_register_icon_widget( $widgets ) {\n\t\t$widgets[] = 'KlippeMikadoIconWidget';\n\t\t\n\t\treturn $widgets;\n\t}", "function us_add_callbacks_to_search_used_icons( $config ) {\r\n\t\t/**\r\n\t\t * Saving used icon sets\r\n\t\t *\r\n\t\t * @param array $icons The icons\r\n\t\t * @param WP_Post $post\r\n\t\t */\r\n\t\t$func_save_used_icons = function( $icons, $post ) {\r\n\t\t\tif ( empty( $icons ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tglobal $_us_used_icons;\r\n\t\t\tif ( empty( $_us_used_icons ) ) {\r\n\t\t\t\t$_us_used_icons = array(\r\n\t\t\t\t\t'icons' => array(),\r\n\t\t\t\t\t'posts' => array(),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// The list of icons should always be a unique array, let's check this and,\r\n\t\t\t// if necessary, convert to this format\r\n\t\t\t$icons = is_array( $icons )\r\n\t\t\t\t? array_unique( $icons )\r\n\t\t\t\t: array( $icons );\r\n\r\n\t\t\tforeach( $icons as $i => $icon ) {\r\n\t\t\t\tif (\r\n\t\t\t\t\tstrpos( $icon, '|' ) !== FALSE\r\n\t\t\t\t\tAND ! in_array( $icon, $_us_used_icons['icons'] )\r\n\t\t\t\t) {\r\n\t\t\t\t\t$_us_used_icons['icons'][] = $icon;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$_us_used_icons['icons'] = array_unique( $_us_used_icons['icons'] );\r\n\r\n\t\t\t// Save IDs of posts, where icons were found\r\n\t\t\tif ( property_exists( $post, 'ID' ) ) {\r\n\t\t\t\tforeach( $icons as $icon ) {\r\n\t\t\t\t\t$_us_used_icons['posts'][ $icon ][] = $post->ID;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * Get a list of icons from socials link settings\r\n\t\t *\r\n\t\t * @param array $items The items\r\n\t\t * @return array\r\n\t\t */\r\n\t\t$func_get_socials_icons = function( $items ) {\r\n\t\t\t$icons = array();\r\n\t\t\tif ( ! empty( $items ) AND is_array( $items ) ) {\r\n\t\t\t\tforeach ( $items as $item ) {\r\n\t\t\t\t\t$type = us_arr_path( $item, 'type' );\r\n\t\t\t\t\t$map = array(\r\n\t\t\t\t\t\t's500px' => '500px',\r\n\t\t\t\t\t\t'vimeo' => 'vimeo-v',\r\n\t\t\t\t\t\t'wechat' => 'weixin',\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tif ( $type === 'custom' ) {\r\n\t\t\t\t\t\t$icons[] = us_arr_path( $item, 'icon' );\r\n\r\n\t\t\t\t\t} elseif ( $type === 'email' ) {\r\n\t\t\t\t\t\t$icons[] = ( US_THEMENAME == 'Zephyr' ) ? 'material|email' : 'fas|envelope';\r\n\r\n\t\t\t\t\t} elseif ( $type === 'rss' ) {\r\n\t\t\t\t\t\t$icons[] = ( US_THEMENAME == 'Zephyr' ) ? 'material|rss_feed' : 'fas|rss';\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$icons[] = 'fab|' . us_arr_path( $map, $type, $type );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $icons;\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * Decodes data from an attribute\r\n\t\t *\r\n\t\t * @param string $str The string of encoded data\r\n\t\t * @return string\r\n\t\t */\r\n\t\t$func_decode = function( $str ) {\r\n\t\t\tif ( empty( $str ) ) {\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\treturn rawurldecode( base64_decode( wp_strip_all_tags( $str ) ) );\r\n\t\t};\r\n\r\n\t\t// Sets auto_optimize_callback for finding icons in content\r\n\t\t// item['option'] - Regular expressions to find icon option, example: `fas|home` etc.\r\n\t\t// item['html'] - Regular expressions to find html icon, example: `<i class=\"fas fa-home\"></i>` etc.\r\n\t\t$icon_patterns = array(\r\n\t\t\t'font-awesome' => array(\r\n\t\t\t\t'option' => '/((fa[r|s|l|b|d])\\|([\\w\\-\\_]+))(\\\")/',\r\n\t\t\t\t'html' => '/<i.*?class=(\"|\\').*?(fa[r|s|l|b|d])[\\s]+fa-([\\w\\-\\_]+).*(\"|\\')/',\r\n\t\t\t),\r\n\t\t\t'font-awesome-duotone' => array(\r\n\t\t\t\t'option' => '/(fad\\|([\\w\\-\\_]+))(\\\")/',\r\n\t\t\t\t'html' => '/<i.*?class=(\"|\\').*?(fad)[\\s]+fa-([\\w\\-\\_]+).*(\"|\\')/',\r\n\t\t\t),\r\n\t\t\t'material' => array(\r\n\t\t\t\t'option' => '/(material\\|([\\w\\-\\_]+))(\\\")/',\r\n\t\t\t\t'html' => '/<.*?class=(\"|\\').*?(material).*(\"|\\').*>([\\w\\-\\_]+)<\\//',\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t// Add functions to config\r\n\t\tforeach ( $icon_patterns as $asset => $icon_pattern ) {\r\n\t\t\tif ( ! empty( $config[ $asset ]['search_icons'] ) ) {\r\n\t\t\t\t$config[ $asset ]['auto_optimize_callback'] = array(\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * @return bool Checking icons should certainly return FALSE to be able to collect all icons into an array\r\n\t\t\t\t\t */\r\n\t\t\t\t\t'shortcodes' => function ( $shortcode_name, $atts, $post ) use ( $func_save_used_icons, $func_get_socials_icons, $func_decode, $icon_pattern ) {\r\n\t\t\t\t\t\t$post_content = $post->post_content;\r\n\r\n\t\t\t\t\t\t// Any shortcode attribute with icon-like value\r\n\t\t\t\t\t\tif ( preg_match_all( $icon_pattern['option'], $post_content, $matches ) ) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( $matches[1], $post );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Metabox setting of post\r\n\t\t\t\t\t\tif ( $icon = get_metadata( 'post', $post->ID, 'us_tile_icon', TRUE ) ) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( $icon, $post );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Default IconBox icon\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t$shortcode_name == 'us_iconbox'\r\n\t\t\t\t\t\t\tAND ! isset( $atts['icon'] )\r\n\t\t\t\t\t\t\tAND ! isset( $atts['img'] )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( 'fas|star', $post );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Default Breadcrumbs icon\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t$shortcode_name == 'us_breadcrumbs'\r\n\t\t\t\t\t\t\tAND ! isset( $atts['separator_icon'] )\r\n\t\t\t\t\t\t\tAND ! isset( $atts['separator_type'] )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( 'fas|angle-right', $post );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Default Search icon\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t$shortcode_name == 'us_search'\r\n\t\t\t\t\t\t\tAND ! isset( $atts['icon'] )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( 'fas|search', $post );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Pricing, Contact Form elements\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tin_array( $shortcode_name, array( 'us_cform', 'us_pricing' ) )\r\n\t\t\t\t\t\t\tAND ! empty( $atts['items'] )\r\n\t\t\t\t\t\t\tAND preg_match_all( $icon_pattern['option'], urldecode( $atts['items'] ), $matches )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( $matches[1], $post );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Person element\r\n\t\t\t\t\t\tif ( $shortcode_name == 'us_person' ) {\r\n\t\t\t\t\t\t\t$social_links = array(\r\n\t\t\t\t\t\t\t\t'email' => ( US_THEMENAME == 'Zephyr' ) ? 'material|email' : 'fas|envelope',\r\n\t\t\t\t\t\t\t\t'facebook' => 'fab|facebook',\r\n\t\t\t\t\t\t\t\t'twitter' => 'fab|twitter',\r\n\t\t\t\t\t\t\t\t'google_plus' => 'fab|google',\r\n\t\t\t\t\t\t\t\t'linkedin' => 'fab|linkedin',\r\n\t\t\t\t\t\t\t\t'skype' => 'fab|skype',\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tforeach( $social_links as $type => $icon ) {\r\n\t\t\t\t\t\t\t\tif ( ! empty( $atts[ $type ] ) ) {\r\n\t\t\t\t\t\t\t\t\t$func_save_used_icons( $icon, $post );\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\tif ( ! empty( $atts['custom_icon'] ) ) {\r\n\t\t\t\t\t\t\t\t$func_save_used_icons( $atts['custom_icon'], $post );\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\t\t// Sharing Buttons element\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t$shortcode_name == 'us_sharing'\r\n\t\t\t\t\t\t\tAND ! empty( $atts['providers'] )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tforeach( explode( ',', $atts['providers'] ) as $type ) {\r\n\t\t\t\t\t\t\t\tif ( $type == 'email' ) {\r\n\t\t\t\t\t\t\t\t\t$icon = ( US_THEMENAME == 'Zephyr' ) ? 'material|email' : 'fas|envelope';\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$icon = 'fab|' . $type;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$func_save_used_icons( $icon, $post );\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Add \"Copy\" icon\r\n\t\t\t\t\t\t\tif ( ! empty( $atts['text_selection'] ) ) {\r\n\t\t\t\t\t\t\t\t$icon = ( US_THEMENAME == 'Zephyr' ) ? 'material|file_copy' : 'fas|copy';\r\n\t\t\t\t\t\t\t\t$func_save_used_icons( $icon, $post );\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\t\t// Social Links element\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t$shortcode_name == 'us_socials'\r\n\t\t\t\t\t\t\tAND $items = us_arr_path( $atts, 'items' )\r\n\t\t\t\t\t\t\tAND $items = json_decode( urldecode( $items ), TRUE )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( $func_get_socials_icons( $items ), $post );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Adding content from `vc_raw_html` to $post_content for full search\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t$post_content\r\n\t\t\t\t\t\t\tAND $shortcode_name === 'vc_raw_html'\r\n\t\t\t\t\t\t\tAND preg_match_all( '/' . get_shortcode_regex( array( 'vc_raw_html' ) ) . '/', $post_content, $matches )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tforeach ( us_arr_path( $matches, '5', array() ) as $raw_html ) {\r\n\t\t\t\t\t\t\t\tif ( $raw_html = $func_decode( $raw_html ) ) {\r\n\t\t\t\t\t\t\t\t\t$post_content .= $raw_html;\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}\r\n\t\t\t\t\t\tunset( $matches );\r\n\r\n\t\t\t\t\t\t// Adding content from `marker_text` to $post_content for full search\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t$shortcode_name === 'us_gmaps'\r\n\t\t\t\t\t\t\tAND ! empty( $atts[ 'marker_text' ] )\r\n\t\t\t\t\t\t\tAND $marker_text = $func_decode( $atts[ 'marker_text' ] )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$post_content .= $marker_text;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Icon as a HTML code\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t$post_content\r\n\t\t\t\t\t\t\tAND preg_match_all( $icon_pattern['html'], $post_content, $matches )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$icons = array();\r\n\t\t\t\t\t\t\tif ( in_array( 'material', $matches[/* Sets */2] ) ) {\r\n\t\t\t\t\t\t\t\tforeach ( $matches[/* Icon names */4] as $icon_name ) {\r\n\t\t\t\t\t\t\t\t\t$icons[] = \"material|{$icon_name}\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tforeach ( $matches[/* Icon sets */2] as $index => $icon_set ) {\r\n\t\t\t\t\t\t\t\t\t$icons[] = $icon_set . '|' . $matches[/* Icon names */3][ $index ];\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\tif ( $icons ) {\r\n\t\t\t\t\t\t\t\t$func_save_used_icons( $icons, $post );\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\t\treturn FALSE;\r\n\t\t\t\t\t},\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * @return bool Checking icons should certainly return FALSE to be able to collect all icons into an array\r\n\t\t\t\t\t */\r\n\t\t\t\t\t'headers_or_grid_layouts' => function ( $element_name, $atts, $post ) use ( $func_save_used_icons, $func_get_socials_icons, $func_decode, $icon_pattern ) {\r\n\t\t\t\t\t\t// Social Link element\r\n\t\t\t\t\t\tif ( $element_name === 'socials' AND ! empty( $atts['items'] ) ) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( $func_get_socials_icons( $atts['items'] ), $post );\r\n\r\n\t\t\t\t\t\t\t// Cart, Button, Search, Text elements\r\n\t\t\t\t\t\t\t// Post Date, Taxonomy, Author, Comments and Custom field elements\r\n\t\t\t\t\t\t} elseif (\r\n\t\t\t\t\t\t\tin_array( $element_name, array(\r\n\t\t\t\t\t\t\t\t// Regular elements\r\n\t\t\t\t\t\t\t\t'text',\r\n\t\t\t\t\t\t\t\t'search',\r\n\t\t\t\t\t\t\t\t'btn',\r\n\t\t\t\t\t\t\t\t'cart',\r\n\t\t\t\t\t\t\t\t// Post elements\r\n\t\t\t\t\t\t\t\t'post_date',\r\n\t\t\t\t\t\t\t\t'post_taxonomy',\r\n\t\t\t\t\t\t\t\t'post_author',\r\n\t\t\t\t\t\t\t\t'post_comments',\r\n\t\t\t\t\t\t\t\t'post_custom_field',\r\n\t\t\t\t\t\t\t) )\r\n\t\t\t\t\t\t\tAND ! empty( $atts['icon'] ) ) {\r\n\t\t\t\t\t\t\t$func_save_used_icons( $atts['icon'], $post );\r\n\r\n\t\t\t\t\t\t\t// Dropdown element\r\n\t\t\t\t\t\t} elseif ( $element_name === 'dropdown' ) {\r\n\t\t\t\t\t\t\t$_icons = array();\r\n\t\t\t\t\t\t\tif ( ! empty( $atts['link_icon'] ) ) {\r\n\t\t\t\t\t\t\t\t$_icons[] = $atts['link_icon'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$links = us_arr_path( $atts, 'links' );\r\n\t\t\t\t\t\t\tif ( is_array( $links ) ) {\r\n\t\t\t\t\t\t\t\tforeach ( $links as $link ) {\r\n\t\t\t\t\t\t\t\t\tif ( $_icon = us_arr_path( $link, 'icon' ) ) {\r\n\t\t\t\t\t\t\t\t\t\t$_icons[] = $_icon;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$func_save_used_icons( $_icons, $post );\r\n\r\n\t\t\t\t\t\t\t// Finding icons in custom html\r\n\t\t\t\t\t\t} else if (\r\n\t\t\t\t\t\t\t$element_name === 'html'\r\n\t\t\t\t\t\t\tAND ! empty( $atts['content'] )\r\n\t\t\t\t\t\t\tAND $html_content = $func_decode( $atts['content'] )\r\n\t\t\t\t\t\t\tAND preg_match_all( $icon_pattern['html'], $html_content, $matches )\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$icons = array();\r\n\t\t\t\t\t\t\tif ( in_array( 'material', $matches[/* Sets */2] ) ) {\r\n\t\t\t\t\t\t\t\tforeach ( $matches[/* Icon names */4] as $icon_name ) {\r\n\t\t\t\t\t\t\t\t\t$icons[] = \"material|{$icon_name}\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tforeach ( $matches[/* Icon sets */2] as $index => $icon_set ) {\r\n\t\t\t\t\t\t\t\t\t$icons[] = $icon_set . '|' . $matches[/* Icon names */3][ $index ];\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\tif ( $icons ) {\r\n\t\t\t\t\t\t\t\t$func_save_used_icons( $icons, $post );\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\t\treturn FALSE;\r\n\t\t\t\t\t},\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $config;\r\n\t}", "public function setPaths(array $paths = []);", "public function setPaths()\n\t{\n\t\t$this->componentURL = Request::base() . 'publications/';\n\t\t$this->resourceURL = $this->componentURL . $this->id;\n\n\t\t$database = \\App::get('db');\n\t\t$pub = new \\Components\\Publications\\Tables\\Publication($database);\n\t\t$publication = $pub->getPublication($this->id);\n\t\t$this->resourceSite = \\Components\\Publications\\Helpers\\Html::buildPubPath($this->id, $publication->version_id, '', $publication->secret, 1);\n\t}", "public function icons() {\n\n\t\t$solid_icons = array(\n\t\t\t\"fas-f641\" => \"fas fa-ad\",\n\t\t\t\"fas-f2b9\" => \"fas fa-address-book\",\n\t\t\t\"fas-f2bb\" => \"fas fa-address-card\",\n\t\t\t\"fas-f042\" => \"fas fa-adjust\",\n\t\t\t\"fas-f5d0\" => \"fas fa-air-freshener\",\n\t\t\t\"fas-f037\" => \"fas fa-align-center\",\n\t\t\t\"fas-f039\" => \"fas fa-align-justify\",\n\t\t\t\"fas-f036\" => \"fas fa-align-left\",\n\t\t\t\"fas-f038\" => \"fas fa-align-right\",\n\t\t\t\"fas-f461\" => \"fas fa-allergies\",\n\t\t\t\"fas-f0f9\" => \"fas fa-ambulance\",\n\t\t\t\"fas-f2a3\" => \"fas fa-american-sign-language-interpreting\",\n\t\t\t\"fas-f13d\" => \"fas fa-anchor\",\n\t\t\t\"fas-f103\" => \"fas fa-angle-double-down\",\n\t\t\t\"fas-f100\" => \"fas fa-angle-double-left\",\n\t\t\t\"fas-f101\" => \"fas fa-angle-double-right\",\n\t\t\t\"fas-f102\" => \"fas fa-angle-double-up\",\n\t\t\t\"fas-f107\" => \"fas fa-angle-down\",\n\t\t\t\"fas-f104\" => \"fas fa-angle-left\",\n\t\t\t\"fas-f105\" => \"fas fa-angle-right\",\n\t\t\t\"fas-f106\" => \"fas fa-angle-up\",\n\t\t\t\"fas-f556\" => \"fas fa-angry\",\n\t\t\t\"fas-f644\" => \"fas fa-ankh\",\n\t\t\t\"fas-f5d1\" => \"fas fa-apple-alt\",\n\t\t\t\"fas-f187\" => \"fas fa-archive\",\n\t\t\t\"fas-f557\" => \"fas fa-archway\",\n\t\t\t\"fas-f358\" => \"fas fa-arrow-alt-circle-down\",\n\t\t\t\"fas-f359\" => \"fas fa-arrow-alt-circle-left\",\n\t\t\t\"fas-f35a\" => \"fas fa-arrow-alt-circle-right\",\n\t\t\t\"fas-f35b\" => \"fas fa-arrow-alt-circle-up\",\n\t\t\t\"fas-f0ab\" => \"fas fa-arrow-circle-down\",\n\t\t\t\"fas-f0a8\" => \"fas fa-arrow-circle-left\",\n\t\t\t\"fas-f0a9\" => \"fas fa-arrow-circle-right\",\n\t\t\t\"fas-f0aa\" => \"fas fa-arrow-circle-up\",\n\t\t\t\"fas-f063\" => \"fas fa-arrow-down\",\n\t\t\t\"fas-f060\" => \"fas fa-arrow-left\",\n\t\t\t\"fas-f061\" => \"fas fa-arrow-right\",\n\t\t\t\"fas-f062\" => \"fas fa-arrow-up\",\n\t\t\t\"fas-f0b2\" => \"fas fa-arrows-alt\",\n\t\t\t\"fas-f337\" => \"fas fa-arrows-alt-h\",\n\t\t\t\"fas-f338\" => \"fas fa-arrows-alt-v\",\n\t\t\t\"fas-f2a2\" => \"fas fa-assistive-listening-systems\",\n\t\t\t\"fas-f069\" => \"fas fa-asterisk\",\n\t\t\t\"fas-f1fa\" => \"fas fa-at\",\n\t\t\t\"fas-f558\" => \"fas fa-atlas\",\n\t\t\t\"fas-f5d2\" => \"fas fa-atom\",\n\t\t\t\"fas-f29e\" => \"fas fa-audio-description\",\n\t\t\t\"fas-f559\" => \"fas fa-award\",\n\t\t\t\"fas-f77c\" => \"fas fa-baby\",\n\t\t\t\"fas-f77d\" => \"fas fa-baby-carriage\",\n\t\t\t\"fas-f55a\" => \"fas fa-backspace\",\n\t\t\t\"fas-f04a\" => \"fas fa-backward\",\n\t\t\t\"fas-f7e5\" => \"fas fa-bacon\",\n\t\t\t\"fas-f666\" => \"fas fa-bahai\",\n\t\t\t\"fas-f24e\" => \"fas fa-balance-scale\",\n\t\t\t\"fas-f515\" => \"fas fa-balance-scale-left\",\n\t\t\t\"fas-f516\" => \"fas fa-balance-scale-right\",\n\t\t\t\"fas-f05e\" => \"fas fa-ban\",\n\t\t\t\"fas-f462\" => \"fas fa-band-aid\",\n\t\t\t\"fas-f02a\" => \"fas fa-barcode\",\n\t\t\t\"fas-f0c9\" => \"fas fa-bars\",\n\t\t\t\"fas-f433\" => \"fas fa-baseball-ball\",\n\t\t\t\"fas-f434\" => \"fas fa-basketball-ball\",\n\t\t\t\"fas-f2cd\" => \"fas fa-bath\",\n\t\t\t\"fas-f244\" => \"fas fa-battery-empty\",\n\t\t\t\"fas-f240\" => \"fas fa-battery-full\",\n\t\t\t\"fas-f242\" => \"fas fa-battery-half\",\n\t\t\t\"fas-f243\" => \"fas fa-battery-quarter\",\n\t\t\t\"fas-f241\" => \"fas fa-battery-three-quarters\",\n\t\t\t\"fas-f236\" => \"fas fa-bed\",\n\t\t\t\"fas-f0fc\" => \"fas fa-beer\",\n\t\t\t\"fas-f0f3\" => \"fas fa-bell\",\n\t\t\t\"fas-f1f6\" => \"fas fa-bell-slash\",\n\t\t\t\"fas-f55b\" => \"fas fa-bezier-curve\",\n\t\t\t\"fas-f647\" => \"fas fa-bible\",\n\t\t\t\"fas-f206\" => \"fas fa-bicycle\",\n\t\t\t\"fas-f84a\" => \"fas fa-biking\",\n\t\t\t\"fas-f1e5\" => \"fas fa-binoculars\",\n\t\t\t\"fas-f780\" => \"fas fa-biohazard\",\n\t\t\t\"fas-f1fd\" => \"fas fa-birthday-cake\",\n\t\t\t\"fas-f517\" => \"fas fa-blender\",\n\t\t\t\"fas-f6b6\" => \"fas fa-blender-phone\",\n\t\t\t\"fas-f29d\" => \"fas fa-blind\",\n\t\t\t\"fas-f781\" => \"fas fa-blog\",\n\t\t\t\"fas-f032\" => \"fas fa-bold\",\n\t\t\t\"fas-f0e7\" => \"fas fa-bolt\",\n\t\t\t\"fas-f1e2\" => \"fas fa-bomb\",\n\t\t\t\"fas-f5d7\" => \"fas fa-bone\",\n\t\t\t\"fas-f55c\" => \"fas fa-bong\",\n\t\t\t\"fas-f02d\" => \"fas fa-book\",\n\t\t\t\"fas-f6b7\" => \"fas fa-book-dead\",\n\t\t\t\"fas-f7e6\" => \"fas fa-book-medical\",\n\t\t\t\"fas-f518\" => \"fas fa-book-open\",\n\t\t\t\"fas-f5da\" => \"fas fa-book-reader\",\n\t\t\t\"fas-f02e\" => \"fas fa-bookmark\",\n\t\t\t\"fas-f84c\" => \"fas fa-border-all\",\n\t\t\t\"fas-f850\" => \"fas fa-border-none\",\n\t\t\t\"fas-f853\" => \"fas fa-border-style\",\n\t\t\t\"fas-f436\" => \"fas fa-bowling-ball\",\n\t\t\t\"fas-f466\" => \"fas fa-box\",\n\t\t\t\"fas-f49e\" => \"fas fa-box-open\",\n\t\t\t\"fas-f95b\" => \"fas fa-box-tissue\",\n\t\t\t\"fas-f468\" => \"fas fa-boxes\",\n\t\t\t\"fas-f2a1\" => \"fas fa-braille\",\n\t\t\t\"fas-f5dc\" => \"fas fa-brain\",\n\t\t\t\"fas-f7ec\" => \"fas fa-bread-slice\",\n\t\t\t\"fas-f0b1\" => \"fas fa-briefcase\",\n\t\t\t\"fas-f469\" => \"fas fa-briefcase-medical\",\n\t\t\t\"fas-f519\" => \"fas fa-broadcast-tower\",\n\t\t\t\"fas-f51a\" => \"fas fa-broom\",\n\t\t\t\"fas-f55d\" => \"fas fa-brush\",\n\t\t\t\"fas-f188\" => \"fas fa-bug\",\n\t\t\t\"fas-f1ad\" => \"fas fa-building\",\n\t\t\t\"fas-f0a1\" => \"fas fa-bullhorn\",\n\t\t\t\"fas-f140\" => \"fas fa-bullseye\",\n\t\t\t\"fas-f46a\" => \"fas fa-burn\",\n\t\t\t\"fas-f207\" => \"fas fa-bus\",\n\t\t\t\"fas-f55e\" => \"fas fa-bus-alt\",\n\t\t\t\"fas-f64a\" => \"fas fa-business-time\",\n\t\t\t\"fas-f1ec\" => \"fas fa-calculator\",\n\t\t\t\"fas-f133\" => \"fas fa-calendar\",\n\t\t\t\"fas-f073\" => \"fas fa-calendar-alt\",\n\t\t\t\"fas-f274\" => \"fas fa-calendar-check\",\n\t\t\t\"fas-f783\" => \"fas fa-calendar-day\",\n\t\t\t\"fas-f272\" => \"fas fa-calendar-minus\",\n\t\t\t\"fas-f271\" => \"fas fa-calendar-plus\",\n\t\t\t\"fas-f273\" => \"fas fa-calendar-times\",\n\t\t\t\"fas-f784\" => \"fas fa-calendar-week\",\n\t\t\t\"fas-f030\" => \"fas fa-camera\",\n\t\t\t\"fas-f083\" => \"fas fa-camera-retro\",\n\t\t\t\"fas-f6bb\" => \"fas fa-campground\",\n\t\t\t\"fas-f786\" => \"fas fa-candy-cane\",\n\t\t\t\"fas-f55f\" => \"fas fa-cannabis\",\n\t\t\t\"fas-f46b\" => \"fas fa-capsules\",\n\t\t\t\"fas-f1b9\" => \"fas fa-car\",\n\t\t\t\"fas-f5de\" => \"fas fa-car-alt\",\n\t\t\t\"fas-f5df\" => \"fas fa-car-battery\",\n\t\t\t\"fas-f5e1\" => \"fas fa-car-crash\",\n\t\t\t\"fas-f5e4\" => \"fas fa-car-side\",\n\t\t\t\"fas-f8ff\" => \"fas fa-caravan\",\n\t\t\t\"fas-f0d7\" => \"fas fa-caret-down\",\n\t\t\t\"fas-f0d9\" => \"fas fa-caret-left\",\n\t\t\t\"fas-f0da\" => \"fas fa-caret-right\",\n\t\t\t\"fas-f150\" => \"fas fa-caret-square-down\",\n\t\t\t\"fas-f191\" => \"fas fa-caret-square-left\",\n\t\t\t\"fas-f152\" => \"fas fa-caret-square-right\",\n\t\t\t\"fas-f151\" => \"fas fa-caret-square-up\",\n\t\t\t\"fas-f0d8\" => \"fas fa-caret-up\",\n\t\t\t\"fas-f787\" => \"fas fa-carrot\",\n\t\t\t\"fas-f218\" => \"fas fa-cart-arrow-down\",\n\t\t\t\"fas-f217\" => \"fas fa-cart-plus\",\n\t\t\t\"fas-f788\" => \"fas fa-cash-register\",\n\t\t\t\"fas-f6be\" => \"fas fa-cat\",\n\t\t\t\"fas-f0a3\" => \"fas fa-certificate\",\n\t\t\t\"fas-f6c0\" => \"fas fa-chair\",\n\t\t\t\"fas-f51b\" => \"fas fa-chalkboard\",\n\t\t\t\"fas-f51c\" => \"fas fa-chalkboard-teacher\",\n\t\t\t\"fas-f5e7\" => \"fas fa-charging-station\",\n\t\t\t\"fas-f1fe\" => \"fas fa-chart-area\",\n\t\t\t\"fas-f080\" => \"fas fa-chart-bar\",\n\t\t\t\"fas-f201\" => \"fas fa-chart-line\",\n\t\t\t\"fas-f200\" => \"fas fa-chart-pie\",\n\t\t\t\"fas-f00c\" => \"fas fa-check\",\n\t\t\t\"fas-f058\" => \"fas fa-check-circle\",\n\t\t\t\"fas-f560\" => \"fas fa-check-double\",\n\t\t\t\"fas-f14a\" => \"fas fa-check-square\",\n\t\t\t\"fas-f7ef\" => \"fas fa-cheese\",\n\t\t\t\"fas-f439\" => \"fas fa-chess\",\n\t\t\t\"fas-f43a\" => \"fas fa-chess-bishop\",\n\t\t\t\"fas-f43c\" => \"fas fa-chess-board\",\n\t\t\t\"fas-f43f\" => \"fas fa-chess-king\",\n\t\t\t\"fas-f441\" => \"fas fa-chess-knight\",\n\t\t\t\"fas-f443\" => \"fas fa-chess-pawn\",\n\t\t\t\"fas-f445\" => \"fas fa-chess-queen\",\n\t\t\t\"fas-f447\" => \"fas fa-chess-rook\",\n\t\t\t\"fas-f13a\" => \"fas fa-chevron-circle-down\",\n\t\t\t\"fas-f137\" => \"fas fa-chevron-circle-left\",\n\t\t\t\"fas-f138\" => \"fas fa-chevron-circle-right\",\n\t\t\t\"fas-f139\" => \"fas fa-chevron-circle-up\",\n\t\t\t\"fas-f078\" => \"fas fa-chevron-down\",\n\t\t\t\"fas-f053\" => \"fas fa-chevron-left\",\n\t\t\t\"fas-f054\" => \"fas fa-chevron-right\",\n\t\t\t\"fas-f077\" => \"fas fa-chevron-up\",\n\t\t\t\"fas-f1ae\" => \"fas fa-child\",\n\t\t\t\"fas-f51d\" => \"fas fa-church\",\n\t\t\t\"fas-f111\" => \"fas fa-circle\",\n\t\t\t\"fas-f1ce\" => \"fas fa-circle-notch\",\n\t\t\t\"fas-f64f\" => \"fas fa-city\",\n\t\t\t\"fas-f7f2\" => \"fas fa-clinic-medical\",\n\t\t\t\"fas-f328\" => \"fas fa-clipboard\",\n\t\t\t\"fas-f46c\" => \"fas fa-clipboard-check\",\n\t\t\t\"fas-f46d\" => \"fas fa-clipboard-list\",\n\t\t\t\"fas-f017\" => \"fas fa-clock\",\n\t\t\t\"fas-f24d\" => \"fas fa-clone\",\n\t\t\t\"fas-f20a\" => \"fas fa-closed-captioning\",\n\t\t\t\"fas-f0c2\" => \"fas fa-cloud\",\n\t\t\t\"fas-f381\" => \"fas fa-cloud-download-alt\",\n\t\t\t\"fas-f73b\" => \"fas fa-cloud-meatball\",\n\t\t\t\"fas-f6c3\" => \"fas fa-cloud-moon\",\n\t\t\t\"fas-f73c\" => \"fas fa-cloud-moon-rain\",\n\t\t\t\"fas-f73d\" => \"fas fa-cloud-rain\",\n\t\t\t\"fas-f740\" => \"fas fa-cloud-showers-heavy\",\n\t\t\t\"fas-f6c4\" => \"fas fa-cloud-sun\",\n\t\t\t\"fas-f743\" => \"fas fa-cloud-sun-rain\",\n\t\t\t\"fas-f382\" => \"fas fa-cloud-upload-alt\",\n\t\t\t\"fas-f561\" => \"fas fa-cocktail\",\n\t\t\t\"fas-f121\" => \"fas fa-code\",\n\t\t\t\"fas-f126\" => \"fas fa-code-branch\",\n\t\t\t\"fas-f0f4\" => \"fas fa-coffee\",\n\t\t\t\"fas-f013\" => \"fas fa-cog\",\n\t\t\t\"fas-f085\" => \"fas fa-cogs\",\n\t\t\t\"fas-f51e\" => \"fas fa-coins\",\n\t\t\t\"fas-f0db\" => \"fas fa-columns\",\n\t\t\t\"fas-f075\" => \"fas fa-comment\",\n\t\t\t\"fas-f27a\" => \"fas fa-comment-alt\",\n\t\t\t\"fas-f651\" => \"fas fa-comment-dollar\",\n\t\t\t\"fas-f4ad\" => \"fas fa-comment-dots\",\n\t\t\t\"fas-f7f5\" => \"fas fa-comment-medical\",\n\t\t\t\"fas-f4b3\" => \"fas fa-comment-slash\",\n\t\t\t\"fas-f086\" => \"fas fa-comments\",\n\t\t\t\"fas-f653\" => \"fas fa-comments-dollar\",\n\t\t\t\"fas-f51f\" => \"fas fa-compact-disc\",\n\t\t\t\"fas-f14e\" => \"fas fa-compass\",\n\t\t\t\"fas-f066\" => \"fas fa-compress\",\n\t\t\t\"fas-f422\" => \"fas fa-compress-alt\",\n\t\t\t\"fas-f78c\" => \"fas fa-compress-arrows-alt\",\n\t\t\t\"fas-f562\" => \"fas fa-concierge-bell\",\n\t\t\t\"fas-f563\" => \"fas fa-cookie\",\n\t\t\t\"fas-f564\" => \"fas fa-cookie-bite\",\n\t\t\t\"fas-f0c5\" => \"fas fa-copy\",\n\t\t\t\"fas-f1f9\" => \"fas fa-copyright\",\n\t\t\t\"fas-f4b8\" => \"fas fa-couch\",\n\t\t\t\"fas-f09d\" => \"fas fa-credit-card\",\n\t\t\t\"fas-f125\" => \"fas fa-crop\",\n\t\t\t\"fas-f565\" => \"fas fa-crop-alt\",\n\t\t\t\"fas-f654\" => \"fas fa-cross\",\n\t\t\t\"fas-f05b\" => \"fas fa-crosshairs\",\n\t\t\t\"fas-f520\" => \"fas fa-crow\",\n\t\t\t\"fas-f521\" => \"fas fa-crown\",\n\t\t\t\"fas-f7f7\" => \"fas fa-crutch\",\n\t\t\t\"fas-f1b2\" => \"fas fa-cube\",\n\t\t\t\"fas-f1b3\" => \"fas fa-cubes\",\n\t\t\t\"fas-f0c4\" => \"fas fa-cut\",\n\t\t\t\"fas-f1c0\" => \"fas fa-database\",\n\t\t\t\"fas-f2a4\" => \"fas fa-deaf\",\n\t\t\t\"fas-f747\" => \"fas fa-democrat\",\n\t\t\t\"fas-f108\" => \"fas fa-desktop\",\n\t\t\t\"fas-f655\" => \"fas fa-dharmachakra\",\n\t\t\t\"fas-f470\" => \"fas fa-diagnoses\",\n\t\t\t\"fas-f522\" => \"fas fa-dice\",\n\t\t\t\"fas-f6cf\" => \"fas fa-dice-d20\",\n\t\t\t\"fas-f6d1\" => \"fas fa-dice-d6\",\n\t\t\t\"fas-f523\" => \"fas fa-dice-five\",\n\t\t\t\"fas-f524\" => \"fas fa-dice-four\",\n\t\t\t\"fas-f525\" => \"fas fa-dice-one\",\n\t\t\t\"fas-f526\" => \"fas fa-dice-six\",\n\t\t\t\"fas-f527\" => \"fas fa-dice-three\",\n\t\t\t\"fas-f528\" => \"fas fa-dice-two\",\n\t\t\t\"fas-f566\" => \"fas fa-digital-tachograph\",\n\t\t\t\"fas-f5eb\" => \"fas fa-directions\",\n\t\t\t\"fas-f7fa\" => \"fas fa-disease\",\n\t\t\t\"fas-f529\" => \"fas fa-divide\",\n\t\t\t\"fas-f567\" => \"fas fa-dizzy\",\n\t\t\t\"fas-f471\" => \"fas fa-dna\",\n\t\t\t\"fas-f6d3\" => \"fas fa-dog\",\n\t\t\t\"fas-f155\" => \"fas fa-dollar-sign\",\n\t\t\t\"fas-f472\" => \"fas fa-dolly\",\n\t\t\t\"fas-f474\" => \"fas fa-dolly-flatbed\",\n\t\t\t\"fas-f4b9\" => \"fas fa-donate\",\n\t\t\t\"fas-f52a\" => \"fas fa-door-closed\",\n\t\t\t\"fas-f52b\" => \"fas fa-door-open\",\n\t\t\t\"fas-f192\" => \"fas fa-dot-circle\",\n\t\t\t\"fas-f4ba\" => \"fas fa-dove\",\n\t\t\t\"fas-f019\" => \"fas fa-download\",\n\t\t\t\"fas-f568\" => \"fas fa-drafting-compass\",\n\t\t\t\"fas-f6d5\" => \"fas fa-dragon\",\n\t\t\t\"fas-f5ee\" => \"fas fa-draw-polygon\",\n\t\t\t\"fas-f569\" => \"fas fa-drum\",\n\t\t\t\"fas-f56a\" => \"fas fa-drum-steelpan\",\n\t\t\t\"fas-f6d7\" => \"fas fa-drumstick-bite\",\n\t\t\t\"fas-f44b\" => \"fas fa-dumbbell\",\n\t\t\t\"fas-f793\" => \"fas fa-dumpster\",\n\t\t\t\"fas-f794\" => \"fas fa-dumpster-fire\",\n\t\t\t\"fas-f6d9\" => \"fas fa-dungeon\",\n\t\t\t\"fas-f044\" => \"fas fa-edit\",\n\t\t\t\"fas-f7fb\" => \"fas fa-egg\",\n\t\t\t\"fas-f052\" => \"fas fa-eject\",\n\t\t\t\"fas-f141\" => \"fas fa-ellipsis-h\",\n\t\t\t\"fas-f142\" => \"fas fa-ellipsis-v\",\n\t\t\t\"fas-f0e0\" => \"fas fa-envelope\",\n\t\t\t\"fas-f2b6\" => \"fas fa-envelope-open\",\n\t\t\t\"fas-f658\" => \"fas fa-envelope-open-text\",\n\t\t\t\"fas-f199\" => \"fas fa-envelope-square\",\n\t\t\t\"fas-f52c\" => \"fas fa-equals\",\n\t\t\t\"fas-f12d\" => \"fas fa-eraser\",\n\t\t\t\"fas-f796\" => \"fas fa-ethernet\",\n\t\t\t\"fas-f153\" => \"fas fa-euro-sign\",\n\t\t\t\"fas-f362\" => \"fas fa-exchange-alt\",\n\t\t\t\"fas-f12a\" => \"fas fa-exclamation\",\n\t\t\t\"fas-f06a\" => \"fas fa-exclamation-circle\",\n\t\t\t\"fas-f071\" => \"fas fa-exclamation-triangle\",\n\t\t\t\"fas-f065\" => \"fas fa-expand\",\n\t\t\t\"fas-f424\" => \"fas fa-expand-alt\",\n\t\t\t\"fas-f31e\" => \"fas fa-expand-arrows-alt\",\n\t\t\t\"fas-f35d\" => \"fas fa-external-link-alt\",\n\t\t\t\"fas-f360\" => \"fas fa-external-link-square-alt\",\n\t\t\t\"fas-f06e\" => \"fas fa-eye\",\n\t\t\t\"fas-f1fb\" => \"fas fa-eye-dropper\",\n\t\t\t\"fas-f070\" => \"fas fa-eye-slash\",\n\t\t\t\"fas-f863\" => \"fas fa-fan\",\n\t\t\t\"fas-f049\" => \"fas fa-fast-backward\",\n\t\t\t\"fas-f050\" => \"fas fa-fast-forward\",\n\t\t\t\"fas-f905\" => \"fas fa-faucet\",\n\t\t\t\"fas-f1ac\" => \"fas fa-fax\",\n\t\t\t\"fas-f52d\" => \"fas fa-feather\",\n\t\t\t\"fas-f56b\" => \"fas fa-feather-alt\",\n\t\t\t\"fas-f182\" => \"fas fa-female\",\n\t\t\t\"fas-f0fb\" => \"fas fa-fighter-jet\",\n\t\t\t\"fas-f15b\" => \"fas fa-file\",\n\t\t\t\"fas-f15c\" => \"fas fa-file-alt\",\n\t\t\t\"fas-f1c6\" => \"fas fa-file-archive\",\n\t\t\t\"fas-f1c7\" => \"fas fa-file-audio\",\n\t\t\t\"fas-f1c9\" => \"fas fa-file-code\",\n\t\t\t\"fas-f56c\" => \"fas fa-file-contract\",\n\t\t\t\"fas-f6dd\" => \"fas fa-file-csv\",\n\t\t\t\"fas-f56d\" => \"fas fa-file-download\",\n\t\t\t\"fas-f1c3\" => \"fas fa-file-excel\",\n\t\t\t\"fas-f56e\" => \"fas fa-file-export\",\n\t\t\t\"fas-f1c5\" => \"fas fa-file-image\",\n\t\t\t\"fas-f56f\" => \"fas fa-file-import\",\n\t\t\t\"fas-f570\" => \"fas fa-file-invoice\",\n\t\t\t\"fas-f571\" => \"fas fa-file-invoice-dollar\",\n\t\t\t\"fas-f477\" => \"fas fa-file-medical\",\n\t\t\t\"fas-f478\" => \"fas fa-file-medical-alt\",\n\t\t\t\"fas-f1c1\" => \"fas fa-file-pdf\",\n\t\t\t\"fas-f1c4\" => \"fas fa-file-powerpoint\",\n\t\t\t\"fas-f572\" => \"fas fa-file-prescription\",\n\t\t\t\"fas-f573\" => \"fas fa-file-signature\",\n\t\t\t\"fas-f574\" => \"fas fa-file-upload\",\n\t\t\t\"fas-f1c8\" => \"fas fa-file-video\",\n\t\t\t\"fas-f1c2\" => \"fas fa-file-word\",\n\t\t\t\"fas-f575\" => \"fas fa-fill\",\n\t\t\t\"fas-f576\" => \"fas fa-fill-drip\",\n\t\t\t\"fas-f008\" => \"fas fa-film\",\n\t\t\t\"fas-f0b0\" => \"fas fa-filter\",\n\t\t\t\"fas-f577\" => \"fas fa-fingerprint\",\n\t\t\t\"fas-f06d\" => \"fas fa-fire\",\n\t\t\t\"fas-f7e4\" => \"fas fa-fire-alt\",\n\t\t\t\"fas-f134\" => \"fas fa-fire-extinguisher\",\n\t\t\t\"fas-f479\" => \"fas fa-first-aid\",\n\t\t\t\"fas-f578\" => \"fas fa-fish\",\n\t\t\t\"fas-f6de\" => \"fas fa-fist-raised\",\n\t\t\t\"fas-f024\" => \"fas fa-flag\",\n\t\t\t\"fas-f11e\" => \"fas fa-flag-checkered\",\n\t\t\t\"fas-f74d\" => \"fas fa-flag-usa\",\n\t\t\t\"fas-f0c3\" => \"fas fa-flask\",\n\t\t\t\"fas-f579\" => \"fas fa-flushed\",\n\t\t\t\"fas-f07b\" => \"fas fa-folder\",\n\t\t\t\"fas-f65d\" => \"fas fa-folder-minus\",\n\t\t\t\"fas-f07c\" => \"fas fa-folder-open\",\n\t\t\t\"fas-f65e\" => \"fas fa-folder-plus\",\n\t\t\t\"fas-f031\" => \"fas fa-font\",\n\t\t\t\"fas-f44e\" => \"fas fa-football-ball\",\n\t\t\t\"fas-f04e\" => \"fas fa-forward\",\n\t\t\t\"fas-f52e\" => \"fas fa-frog\",\n\t\t\t\"fas-f119\" => \"fas fa-frown\",\n\t\t\t\"fas-f57a\" => \"fas fa-frown-open\",\n\t\t\t\"fas-f662\" => \"fas fa-funnel-dollar\",\n\t\t\t\"fas-f1e3\" => \"fas fa-futbol\",\n\t\t\t\"fas-f11b\" => \"fas fa-gamepad\",\n\t\t\t\"fas-f52f\" => \"fas fa-gas-pump\",\n\t\t\t\"fas-f0e3\" => \"fas fa-gavel\",\n\t\t\t\"fas-f3a5\" => \"fas fa-gem\",\n\t\t\t\"fas-f22d\" => \"fas fa-genderless\",\n\t\t\t\"fas-f6e2\" => \"fas fa-ghost\",\n\t\t\t\"fas-f06b\" => \"fas fa-gift\",\n\t\t\t\"fas-f79c\" => \"fas fa-gifts\",\n\t\t\t\"fas-f79f\" => \"fas fa-glass-cheers\",\n\t\t\t\"fas-f000\" => \"fas fa-glass-martini\",\n\t\t\t\"fas-f57b\" => \"fas fa-glass-martini-alt\",\n\t\t\t\"fas-f7a0\" => \"fas fa-glass-whiskey\",\n\t\t\t\"fas-f530\" => \"fas fa-glasses\",\n\t\t\t\"fas-f0ac\" => \"fas fa-globe\",\n\t\t\t\"fas-f57c\" => \"fas fa-globe-africa\",\n\t\t\t\"fas-f57d\" => \"fas fa-globe-americas\",\n\t\t\t\"fas-f57e\" => \"fas fa-globe-asia\",\n\t\t\t\"fas-f7a2\" => \"fas fa-globe-europe\",\n\t\t\t\"fas-f450\" => \"fas fa-golf-ball\",\n\t\t\t\"fas-f664\" => \"fas fa-gopuram\",\n\t\t\t\"fas-f19d\" => \"fas fa-graduation-cap\",\n\t\t\t\"fas-f531\" => \"fas fa-greater-than\",\n\t\t\t\"fas-f532\" => \"fas fa-greater-than-equal\",\n\t\t\t\"fas-f57f\" => \"fas fa-grimace\",\n\t\t\t\"fas-f580\" => \"fas fa-grin\",\n\t\t\t\"fas-f581\" => \"fas fa-grin-alt\",\n\t\t\t\"fas-f582\" => \"fas fa-grin-beam\",\n\t\t\t\"fas-f583\" => \"fas fa-grin-beam-sweat\",\n\t\t\t\"fas-f584\" => \"fas fa-grin-hearts\",\n\t\t\t\"fas-f585\" => \"fas fa-grin-squint\",\n\t\t\t\"fas-f586\" => \"fas fa-grin-squint-tears\",\n\t\t\t\"fas-f587\" => \"fas fa-grin-stars\",\n\t\t\t\"fas-f588\" => \"fas fa-grin-tears\",\n\t\t\t\"fas-f589\" => \"fas fa-grin-tongue\",\n\t\t\t\"fas-f58a\" => \"fas fa-grin-tongue-squint\",\n\t\t\t\"fas-f58b\" => \"fas fa-grin-tongue-wink\",\n\t\t\t\"fas-f58c\" => \"fas fa-grin-wink\",\n\t\t\t\"fas-f58d\" => \"fas fa-grip-horizontal\",\n\t\t\t\"fas-f7a4\" => \"fas fa-grip-lines\",\n\t\t\t\"fas-f7a5\" => \"fas fa-grip-lines-vertical\",\n\t\t\t\"fas-f58e\" => \"fas fa-grip-vertical\",\n\t\t\t\"fas-f7a6\" => \"fas fa-guitar\",\n\t\t\t\"fas-f0fd\" => \"fas fa-h-square\",\n\t\t\t\"fas-f805\" => \"fas fa-hamburger\",\n\t\t\t\"fas-f6e3\" => \"fas fa-hammer\",\n\t\t\t\"fas-f665\" => \"fas fa-hamsa\",\n\t\t\t\"fas-f4bd\" => \"fas fa-hand-holding\",\n\t\t\t\"fas-f4be\" => \"fas fa-hand-holding-heart\",\n\t\t\t\"fas-f95c\" => \"fas fa-hand-holding-medical\",\n\t\t\t\"fas-f4c0\" => \"fas fa-hand-holding-usd\",\n\t\t\t\"fas-f4c1\" => \"fas fa-hand-holding-water\",\n\t\t\t\"fas-f258\" => \"fas fa-hand-lizard\",\n\t\t\t\"fas-f806\" => \"fas fa-hand-middle-finger\",\n\t\t\t\"fas-f256\" => \"fas fa-hand-paper\",\n\t\t\t\"fas-f25b\" => \"fas fa-hand-peace\",\n\t\t\t\"fas-f0a7\" => \"fas fa-hand-point-down\",\n\t\t\t\"fas-f0a5\" => \"fas fa-hand-point-left\",\n\t\t\t\"fas-f0a4\" => \"fas fa-hand-point-right\",\n\t\t\t\"fas-f0a6\" => \"fas fa-hand-point-up\",\n\t\t\t\"fas-f25a\" => \"fas fa-hand-pointer\",\n\t\t\t\"fas-f255\" => \"fas fa-hand-rock\",\n\t\t\t\"fas-f257\" => \"fas fa-hand-scissors\",\n\t\t\t\"fas-f95d\" => \"fas fa-hand-sparkles\",\n\t\t\t\"fas-f259\" => \"fas fa-hand-spock\",\n\t\t\t\"fas-f4c2\" => \"fas fa-hands\",\n\t\t\t\"fas-f4c4\" => \"fas fa-hands-helping\",\n\t\t\t\"fas-f95e\" => \"fas fa-hands-wash\",\n\t\t\t\"fas-f2b5\" => \"fas fa-handshake\",\n\t\t\t\"fas-f95f\" => \"fas fa-handshake-alt-slash\",\n\t\t\t\"fas-f960\" => \"fas fa-handshake-slash\",\n\t\t\t\"fas-f6e6\" => \"fas fa-hanukiah\",\n\t\t\t\"fas-f807\" => \"fas fa-hard-hat\",\n\t\t\t\"fas-f292\" => \"fas fa-hashtag\",\n\t\t\t\"fas-f8c0\" => \"fas fa-hat-cowboy\",\n\t\t\t\"fas-f8c1\" => \"fas fa-hat-cowboy-side\",\n\t\t\t\"fas-f6e8\" => \"fas fa-hat-wizard\",\n\t\t\t\"fas-f0a0\" => \"fas fa-hdd\",\n\t\t\t\"fas-f961\" => \"fas fa-head-side-cough\",\n\t\t\t\"fas-f962\" => \"fas fa-head-side-cough-slash\",\n\t\t\t\"fas-f963\" => \"fas fa-head-side-mask\",\n\t\t\t\"fas-f964\" => \"fas fa-head-side-virus\",\n\t\t\t\"fas-f1dc\" => \"fas fa-heading\",\n\t\t\t\"fas-f025\" => \"fas fa-headphones\",\n\t\t\t\"fas-f58f\" => \"fas fa-headphones-alt\",\n\t\t\t\"fas-f590\" => \"fas fa-headset\",\n\t\t\t\"fas-f004\" => \"fas fa-heart\",\n\t\t\t\"fas-f7a9\" => \"fas fa-heart-broken\",\n\t\t\t\"fas-f21e\" => \"fas fa-heartbeat\",\n\t\t\t\"fas-f533\" => \"fas fa-helicopter\",\n\t\t\t\"fas-f591\" => \"fas fa-highlighter\",\n\t\t\t\"fas-f6ec\" => \"fas fa-hiking\",\n\t\t\t\"fas-f6ed\" => \"fas fa-hippo\",\n\t\t\t\"fas-f1da\" => \"fas fa-history\",\n\t\t\t\"fas-f453\" => \"fas fa-hockey-puck\",\n\t\t\t\"fas-f7aa\" => \"fas fa-holly-berry\",\n\t\t\t\"fas-f015\" => \"fas fa-home\",\n\t\t\t\"fas-f6f0\" => \"fas fa-horse\",\n\t\t\t\"fas-f7ab\" => \"fas fa-horse-head\",\n\t\t\t\"fas-f0f8\" => \"fas fa-hospital\",\n\t\t\t\"fas-f47d\" => \"fas fa-hospital-alt\",\n\t\t\t\"fas-f47e\" => \"fas fa-hospital-symbol\",\n\t\t\t\"fas-f80d\" => \"fas fa-hospital-user\",\n\t\t\t\"fas-f593\" => \"fas fa-hot-tub\",\n\t\t\t\"fas-f80f\" => \"fas fa-hotdog\",\n\t\t\t\"fas-f594\" => \"fas fa-hotel\",\n\t\t\t\"fas-f254\" => \"fas fa-hourglass\",\n\t\t\t\"fas-f253\" => \"fas fa-hourglass-end\",\n\t\t\t\"fas-f252\" => \"fas fa-hourglass-half\",\n\t\t\t\"fas-f251\" => \"fas fa-hourglass-start\",\n\t\t\t\"fas-f6f1\" => \"fas fa-house-damage\",\n\t\t\t\"fas-f965\" => \"fas fa-house-user\",\n\t\t\t\"fas-f6f2\" => \"fas fa-hryvnia\",\n\t\t\t\"fas-f246\" => \"fas fa-i-cursor\",\n\t\t\t\"fas-f810\" => \"fas fa-ice-cream\",\n\t\t\t\"fas-f7ad\" => \"fas fa-icicles\",\n\t\t\t\"fas-f86d\" => \"fas fa-icons\",\n\t\t\t\"fas-f2c1\" => \"fas fa-id-badge\",\n\t\t\t\"fas-f2c2\" => \"fas fa-id-card\",\n\t\t\t\"fas-f47f\" => \"fas fa-id-card-alt\",\n\t\t\t\"fas-f7ae\" => \"fas fa-igloo\",\n\t\t\t\"fas-f03e\" => \"fas fa-image\",\n\t\t\t\"fas-f302\" => \"fas fa-images\",\n\t\t\t\"fas-f01c\" => \"fas fa-inbox\",\n\t\t\t\"fas-f03c\" => \"fas fa-indent\",\n\t\t\t\"fas-f275\" => \"fas fa-industry\",\n\t\t\t\"fas-f534\" => \"fas fa-infinity\",\n\t\t\t\"fas-f129\" => \"fas fa-info\",\n\t\t\t\"fas-f05a\" => \"fas fa-info-circle\",\n\t\t\t\"fas-f033\" => \"fas fa-italic\",\n\t\t\t\"fas-f669\" => \"fas fa-jedi\",\n\t\t\t\"fas-f595\" => \"fas fa-joint\",\n\t\t\t\"fas-f66a\" => \"fas fa-journal-whills\",\n\t\t\t\"fas-f66b\" => \"fas fa-kaaba\",\n\t\t\t\"fas-f084\" => \"fas fa-key\",\n\t\t\t\"fas-f11c\" => \"fas fa-keyboard\",\n\t\t\t\"fas-f66d\" => \"fas fa-khanda\",\n\t\t\t\"fas-f596\" => \"fas fa-kiss\",\n\t\t\t\"fas-f597\" => \"fas fa-kiss-beam\",\n\t\t\t\"fas-f598\" => \"fas fa-kiss-wink-heart\",\n\t\t\t\"fas-f535\" => \"fas fa-kiwi-bird\",\n\t\t\t\"fas-f66f\" => \"fas fa-landmark\",\n\t\t\t\"fas-f1ab\" => \"fas fa-language\",\n\t\t\t\"fas-f109\" => \"fas fa-laptop\",\n\t\t\t\"fas-f5fc\" => \"fas fa-laptop-code\",\n\t\t\t\"fas-f966\" => \"fas fa-laptop-house\",\n\t\t\t\"fas-f812\" => \"fas fa-laptop-medical\",\n\t\t\t\"fas-f599\" => \"fas fa-laugh\",\n\t\t\t\"fas-f59a\" => \"fas fa-laugh-beam\",\n\t\t\t\"fas-f59b\" => \"fas fa-laugh-squint\",\n\t\t\t\"fas-f59c\" => \"fas fa-laugh-wink\",\n\t\t\t\"fas-f5fd\" => \"fas fa-layer-group\",\n\t\t\t\"fas-f06c\" => \"fas fa-leaf\",\n\t\t\t\"fas-f094\" => \"fas fa-lemon\",\n\t\t\t\"fas-f536\" => \"fas fa-less-than\",\n\t\t\t\"fas-f537\" => \"fas fa-less-than-equal\",\n\t\t\t\"fas-f3be\" => \"fas fa-level-down-alt\",\n\t\t\t\"fas-f3bf\" => \"fas fa-level-up-alt\",\n\t\t\t\"fas-f1cd\" => \"fas fa-life-ring\",\n\t\t\t\"fas-f0eb\" => \"fas fa-lightbulb\",\n\t\t\t\"fas-f0c1\" => \"fas fa-link\",\n\t\t\t\"fas-f195\" => \"fas fa-lira-sign\",\n\t\t\t\"fas-f03a\" => \"fas fa-list\",\n\t\t\t\"fas-f022\" => \"fas fa-list-alt\",\n\t\t\t\"fas-f0cb\" => \"fas fa-list-ol\",\n\t\t\t\"fas-f0ca\" => \"fas fa-list-ul\",\n\t\t\t\"fas-f124\" => \"fas fa-location-arrow\",\n\t\t\t\"fas-f023\" => \"fas fa-lock\",\n\t\t\t\"fas-f3c1\" => \"fas fa-lock-open\",\n\t\t\t\"fas-f309\" => \"fas fa-long-arrow-alt-down\",\n\t\t\t\"fas-f30a\" => \"fas fa-long-arrow-alt-left\",\n\t\t\t\"fas-f30b\" => \"fas fa-long-arrow-alt-right\",\n\t\t\t\"fas-f30c\" => \"fas fa-long-arrow-alt-up\",\n\t\t\t\"fas-f2a8\" => \"fas fa-low-vision\",\n\t\t\t\"fas-f59d\" => \"fas fa-luggage-cart\",\n\t\t\t\"fas-f604\" => \"fas fa-lungs\",\n\t\t\t\"fas-f967\" => \"fas fa-lungs-virus\",\n\t\t\t\"fas-f0d0\" => \"fas fa-magic\",\n\t\t\t\"fas-f076\" => \"fas fa-magnet\",\n\t\t\t\"fas-f674\" => \"fas fa-mail-bulk\",\n\t\t\t\"fas-f183\" => \"fas fa-male\",\n\t\t\t\"fas-f279\" => \"fas fa-map\",\n\t\t\t\"fas-f59f\" => \"fas fa-map-marked\",\n\t\t\t\"fas-f5a0\" => \"fas fa-map-marked-alt\",\n\t\t\t\"fas-f041\" => \"fas fa-map-marker\",\n\t\t\t\"fas-f3c5\" => \"fas fa-map-marker-alt\",\n\t\t\t\"fas-f276\" => \"fas fa-map-pin\",\n\t\t\t\"fas-f277\" => \"fas fa-map-signs\",\n\t\t\t\"fas-f5a1\" => \"fas fa-marker\",\n\t\t\t\"fas-f222\" => \"fas fa-mars\",\n\t\t\t\"fas-f227\" => \"fas fa-mars-double\",\n\t\t\t\"fas-f229\" => \"fas fa-mars-stroke\",\n\t\t\t\"fas-f22b\" => \"fas fa-mars-stroke-h\",\n\t\t\t\"fas-f22a\" => \"fas fa-mars-stroke-v\",\n\t\t\t\"fas-f6fa\" => \"fas fa-mask\",\n\t\t\t\"fas-f5a2\" => \"fas fa-medal\",\n\t\t\t\"fas-f0fa\" => \"fas fa-medkit\",\n\t\t\t\"fas-f11a\" => \"fas fa-meh\",\n\t\t\t\"fas-f5a4\" => \"fas fa-meh-blank\",\n\t\t\t\"fas-f5a5\" => \"fas fa-meh-rolling-eyes\",\n\t\t\t\"fas-f538\" => \"fas fa-memory\",\n\t\t\t\"fas-f676\" => \"fas fa-menorah\",\n\t\t\t\"fas-f223\" => \"fas fa-mercury\",\n\t\t\t\"fas-f753\" => \"fas fa-meteor\",\n\t\t\t\"fas-f2db\" => \"fas fa-microchip\",\n\t\t\t\"fas-f130\" => \"fas fa-microphone\",\n\t\t\t\"fas-f3c9\" => \"fas fa-microphone-alt\",\n\t\t\t\"fas-f539\" => \"fas fa-microphone-alt-slash\",\n\t\t\t\"fas-f131\" => \"fas fa-microphone-slash\",\n\t\t\t\"fas-f610\" => \"fas fa-microscope\",\n\t\t\t\"fas-f068\" => \"fas fa-minus\",\n\t\t\t\"fas-f056\" => \"fas fa-minus-circle\",\n\t\t\t\"fas-f146\" => \"fas fa-minus-square\",\n\t\t\t\"fas-f7b5\" => \"fas fa-mitten\",\n\t\t\t\"fas-f10b\" => \"fas fa-mobile\",\n\t\t\t\"fas-f3cd\" => \"fas fa-mobile-alt\",\n\t\t\t\"fas-f0d6\" => \"fas fa-money-bill\",\n\t\t\t\"fas-f3d1\" => \"fas fa-money-bill-alt\",\n\t\t\t\"fas-f53a\" => \"fas fa-money-bill-wave\",\n\t\t\t\"fas-f53b\" => \"fas fa-money-bill-wave-alt\",\n\t\t\t\"fas-f53c\" => \"fas fa-money-check\",\n\t\t\t\"fas-f53d\" => \"fas fa-money-check-alt\",\n\t\t\t\"fas-f5a6\" => \"fas fa-monument\",\n\t\t\t\"fas-f186\" => \"fas fa-moon\",\n\t\t\t\"fas-f5a7\" => \"fas fa-mortar-pestle\",\n\t\t\t\"fas-f678\" => \"fas fa-mosque\",\n\t\t\t\"fas-f21c\" => \"fas fa-motorcycle\",\n\t\t\t\"fas-f6fc\" => \"fas fa-mountain\",\n\t\t\t\"fas-f8cc\" => \"fas fa-mouse\",\n\t\t\t\"fas-f245\" => \"fas fa-mouse-pointer\",\n\t\t\t\"fas-f7b6\" => \"fas fa-mug-hot\",\n\t\t\t\"fas-f001\" => \"fas fa-music\",\n\t\t\t\"fas-f6ff\" => \"fas fa-network-wired\",\n\t\t\t\"fas-f22c\" => \"fas fa-neuter\",\n\t\t\t\"fas-f1ea\" => \"fas fa-newspaper\",\n\t\t\t\"fas-f53e\" => \"fas fa-not-equal\",\n\t\t\t\"fas-f481\" => \"fas fa-notes-medical\",\n\t\t\t\"fas-f247\" => \"fas fa-object-group\",\n\t\t\t\"fas-f248\" => \"fas fa-object-ungroup\",\n\t\t\t\"fas-f613\" => \"fas fa-oil-can\",\n\t\t\t\"fas-f679\" => \"fas fa-om\",\n\t\t\t\"fas-f700\" => \"fas fa-otter\",\n\t\t\t\"fas-f03b\" => \"fas fa-outdent\",\n\t\t\t\"fas-f815\" => \"fas fa-pager\",\n\t\t\t\"fas-f1fc\" => \"fas fa-paint-brush\",\n\t\t\t\"fas-f5aa\" => \"fas fa-paint-roller\",\n\t\t\t\"fas-f53f\" => \"fas fa-palette\",\n\t\t\t\"fas-f482\" => \"fas fa-pallet\",\n\t\t\t\"fas-f1d8\" => \"fas fa-paper-plane\",\n\t\t\t\"fas-f0c6\" => \"fas fa-paperclip\",\n\t\t\t\"fas-f4cd\" => \"fas fa-parachute-box\",\n\t\t\t\"fas-f1dd\" => \"fas fa-paragraph\",\n\t\t\t\"fas-f540\" => \"fas fa-parking\",\n\t\t\t\"fas-f5ab\" => \"fas fa-passport\",\n\t\t\t\"fas-f67b\" => \"fas fa-pastafarianism\",\n\t\t\t\"fas-f0ea\" => \"fas fa-paste\",\n\t\t\t\"fas-f04c\" => \"fas fa-pause\",\n\t\t\t\"fas-f28b\" => \"fas fa-pause-circle\",\n\t\t\t\"fas-f1b0\" => \"fas fa-paw\",\n\t\t\t\"fas-f67c\" => \"fas fa-peace\",\n\t\t\t\"fas-f304\" => \"fas fa-pen\",\n\t\t\t\"fas-f305\" => \"fas fa-pen-alt\",\n\t\t\t\"fas-f5ac\" => \"fas fa-pen-fancy\",\n\t\t\t\"fas-f5ad\" => \"fas fa-pen-nib\",\n\t\t\t\"fas-f14b\" => \"fas fa-pen-square\",\n\t\t\t\"fas-f303\" => \"fas fa-pencil-alt\",\n\t\t\t\"fas-f5ae\" => \"fas fa-pencil-ruler\",\n\t\t\t\"fas-f968\" => \"fas fa-people-arrows\",\n\t\t\t\"fas-f4ce\" => \"fas fa-people-carry\",\n\t\t\t\"fas-f816\" => \"fas fa-pepper-hot\",\n\t\t\t\"fas-f295\" => \"fas fa-percent\",\n\t\t\t\"fas-f541\" => \"fas fa-percentage\",\n\t\t\t\"fas-f756\" => \"fas fa-person-booth\",\n\t\t\t\"fas-f095\" => \"fas fa-phone\",\n\t\t\t\"fas-f879\" => \"fas fa-phone-alt\",\n\t\t\t\"fas-f3dd\" => \"fas fa-phone-slash\",\n\t\t\t\"fas-f098\" => \"fas fa-phone-square\",\n\t\t\t\"fas-f87b\" => \"fas fa-phone-square-alt\",\n\t\t\t\"fas-f2a0\" => \"fas fa-phone-volume\",\n\t\t\t\"fas-f87c\" => \"fas fa-photo-video\",\n\t\t\t\"fas-f4d3\" => \"fas fa-piggy-bank\",\n\t\t\t\"fas-f484\" => \"fas fa-pills\",\n\t\t\t\"fas-f818\" => \"fas fa-pizza-slice\",\n\t\t\t\"fas-f67f\" => \"fas fa-place-of-worship\",\n\t\t\t\"fas-f072\" => \"fas fa-plane\",\n\t\t\t\"fas-f5af\" => \"fas fa-plane-arrival\",\n\t\t\t\"fas-f5b0\" => \"fas fa-plane-departure\",\n\t\t\t\"fas-f969\" => \"fas fa-plane-slash\",\n\t\t\t\"fas-f04b\" => \"fas fa-play\",\n\t\t\t\"fas-f144\" => \"fas fa-play-circle\",\n\t\t\t\"fas-f1e6\" => \"fas fa-plug\",\n\t\t\t\"fas-f067\" => \"fas fa-plus\",\n\t\t\t\"fas-f055\" => \"fas fa-plus-circle\",\n\t\t\t\"fas-f0fe\" => \"fas fa-plus-square\",\n\t\t\t\"fas-f2ce\" => \"fas fa-podcast\",\n\t\t\t\"fas-f681\" => \"fas fa-poll\",\n\t\t\t\"fas-f682\" => \"fas fa-poll-h\",\n\t\t\t\"fas-f2fe\" => \"fas fa-poo\",\n\t\t\t\"fas-f75a\" => \"fas fa-poo-storm\",\n\t\t\t\"fas-f619\" => \"fas fa-poop\",\n\t\t\t\"fas-f3e0\" => \"fas fa-portrait\",\n\t\t\t\"fas-f154\" => \"fas fa-pound-sign\",\n\t\t\t\"fas-f011\" => \"fas fa-power-off\",\n\t\t\t\"fas-f683\" => \"fas fa-pray\",\n\t\t\t\"fas-f684\" => \"fas fa-praying-hands\",\n\t\t\t\"fas-f5b1\" => \"fas fa-prescription\",\n\t\t\t\"fas-f485\" => \"fas fa-prescription-bottle\",\n\t\t\t\"fas-f486\" => \"fas fa-prescription-bottle-alt\",\n\t\t\t\"fas-f02f\" => \"fas fa-print\",\n\t\t\t\"fas-f487\" => \"fas fa-procedures\",\n\t\t\t\"fas-f542\" => \"fas fa-project-diagram\",\n\t\t\t\"fas-f96a\" => \"fas fa-pump-medical\",\n\t\t\t\"fas-f96b\" => \"fas fa-pump-soap\",\n\t\t\t\"fas-f12e\" => \"fas fa-puzzle-piece\",\n\t\t\t\"fas-f029\" => \"fas fa-qrcode\",\n\t\t\t\"fas-f128\" => \"fas fa-question\",\n\t\t\t\"fas-f059\" => \"fas fa-question-circle\",\n\t\t\t\"fas-f458\" => \"fas fa-quidditch\",\n\t\t\t\"fas-f10d\" => \"fas fa-quote-left\",\n\t\t\t\"fas-f10e\" => \"fas fa-quote-right\",\n\t\t\t\"fas-f687\" => \"fas fa-quran\",\n\t\t\t\"fas-f7b9\" => \"fas fa-radiation\",\n\t\t\t\"fas-f7ba\" => \"fas fa-radiation-alt\",\n\t\t\t\"fas-f75b\" => \"fas fa-rainbow\",\n\t\t\t\"fas-f074\" => \"fas fa-random\",\n\t\t\t\"fas-f543\" => \"fas fa-receipt\",\n\t\t\t\"fas-f8d9\" => \"fas fa-record-vinyl\",\n\t\t\t\"fas-f1b8\" => \"fas fa-recycle\",\n\t\t\t\"fas-f01e\" => \"fas fa-redo\",\n\t\t\t\"fas-f2f9\" => \"fas fa-redo-alt\",\n\t\t\t\"fas-f25d\" => \"fas fa-registered\",\n\t\t\t\"fas-f87d\" => \"fas fa-remove-format\",\n\t\t\t\"fas-f3e5\" => \"fas fa-reply\",\n\t\t\t\"fas-f122\" => \"fas fa-reply-all\",\n\t\t\t\"fas-f75e\" => \"fas fa-republican\",\n\t\t\t\"fas-f7bd\" => \"fas fa-restroom\",\n\t\t\t\"fas-f079\" => \"fas fa-retweet\",\n\t\t\t\"fas-f4d6\" => \"fas fa-ribbon\",\n\t\t\t\"fas-f70b\" => \"fas fa-ring\",\n\t\t\t\"fas-f018\" => \"fas fa-road\",\n\t\t\t\"fas-f544\" => \"fas fa-robot\",\n\t\t\t\"fas-f135\" => \"fas fa-rocket\",\n\t\t\t\"fas-f4d7\" => \"fas fa-route\",\n\t\t\t\"fas-f09e\" => \"fas fa-rss\",\n\t\t\t\"fas-f143\" => \"fas fa-rss-square\",\n\t\t\t\"fas-f158\" => \"fas fa-ruble-sign\",\n\t\t\t\"fas-f545\" => \"fas fa-ruler\",\n\t\t\t\"fas-f546\" => \"fas fa-ruler-combined\",\n\t\t\t\"fas-f547\" => \"fas fa-ruler-horizontal\",\n\t\t\t\"fas-f548\" => \"fas fa-ruler-vertical\",\n\t\t\t\"fas-f70c\" => \"fas fa-running\",\n\t\t\t\"fas-f156\" => \"fas fa-rupee-sign\",\n\t\t\t\"fas-f5b3\" => \"fas fa-sad-cry\",\n\t\t\t\"fas-f5b4\" => \"fas fa-sad-tear\",\n\t\t\t\"fas-f7bf\" => \"fas fa-satellite\",\n\t\t\t\"fas-f7c0\" => \"fas fa-satellite-dish\",\n\t\t\t\"fas-f0c7\" => \"fas fa-save\",\n\t\t\t\"fas-f549\" => \"fas fa-school\",\n\t\t\t\"fas-f54a\" => \"fas fa-screwdriver\",\n\t\t\t\"fas-f70e\" => \"fas fa-scroll\",\n\t\t\t\"fas-f7c2\" => \"fas fa-sd-card\",\n\t\t\t\"fas-f002\" => \"fas fa-search\",\n\t\t\t\"fas-f688\" => \"fas fa-search-dollar\",\n\t\t\t\"fas-f689\" => \"fas fa-search-location\",\n\t\t\t\"fas-f010\" => \"fas fa-search-minus\",\n\t\t\t\"fas-f00e\" => \"fas fa-search-plus\",\n\t\t\t\"fas-f4d8\" => \"fas fa-seedling\",\n\t\t\t\"fas-f233\" => \"fas fa-server\",\n\t\t\t\"fas-f61f\" => \"fas fa-shapes\",\n\t\t\t\"fas-f064\" => \"fas fa-share\",\n\t\t\t\"fas-f1e0\" => \"fas fa-share-alt\",\n\t\t\t\"fas-f1e1\" => \"fas fa-share-alt-square\",\n\t\t\t\"fas-f14d\" => \"fas fa-share-square\",\n\t\t\t\"fas-f20b\" => \"fas fa-shekel-sign\",\n\t\t\t\"fas-f3ed\" => \"fas fa-shield-alt\",\n\t\t\t\"fas-f96c\" => \"fas fa-shield-virus\",\n\t\t\t\"fas-f21a\" => \"fas fa-ship\",\n\t\t\t\"fas-f48b\" => \"fas fa-shipping-fast\",\n\t\t\t\"fas-f54b\" => \"fas fa-shoe-prints\",\n\t\t\t\"fas-f290\" => \"fas fa-shopping-bag\",\n\t\t\t\"fas-f291\" => \"fas fa-shopping-basket\",\n\t\t\t\"fas-f07a\" => \"fas fa-shopping-cart\",\n\t\t\t\"fas-f2cc\" => \"fas fa-shower\",\n\t\t\t\"fas-f5b6\" => \"fas fa-shuttle-van\",\n\t\t\t\"fas-f4d9\" => \"fas fa-sign\",\n\t\t\t\"fas-f2f6\" => \"fas fa-sign-in-alt\",\n\t\t\t\"fas-f2a7\" => \"fas fa-sign-language\",\n\t\t\t\"fas-f2f5\" => \"fas fa-sign-out-alt\",\n\t\t\t\"fas-f012\" => \"fas fa-signal\",\n\t\t\t\"fas-f5b7\" => \"fas fa-signature\",\n\t\t\t\"fas-f7c4\" => \"fas fa-sim-card\",\n\t\t\t\"fas-f0e8\" => \"fas fa-sitemap\",\n\t\t\t\"fas-f7c5\" => \"fas fa-skating\",\n\t\t\t\"fas-f7c9\" => \"fas fa-skiing\",\n\t\t\t\"fas-f7ca\" => \"fas fa-skiing-nordic\",\n\t\t\t\"fas-f54c\" => \"fas fa-skull\",\n\t\t\t\"fas-f714\" => \"fas fa-skull-crossbones\",\n\t\t\t\"fas-f715\" => \"fas fa-slash\",\n\t\t\t\"fas-f7cc\" => \"fas fa-sleigh\",\n\t\t\t\"fas-f1de\" => \"fas fa-sliders-h\",\n\t\t\t\"fas-f118\" => \"fas fa-smile\",\n\t\t\t\"fas-f5b8\" => \"fas fa-smile-beam\",\n\t\t\t\"fas-f4da\" => \"fas fa-smile-wink\",\n\t\t\t\"fas-f75f\" => \"fas fa-smog\",\n\t\t\t\"fas-f48d\" => \"fas fa-smoking\",\n\t\t\t\"fas-f54d\" => \"fas fa-smoking-ban\",\n\t\t\t\"fas-f7cd\" => \"fas fa-sms\",\n\t\t\t\"fas-f7ce\" => \"fas fa-snowboarding\",\n\t\t\t\"fas-f2dc\" => \"fas fa-snowflake\",\n\t\t\t\"fas-f7d0\" => \"fas fa-snowman\",\n\t\t\t\"fas-f7d2\" => \"fas fa-snowplow\",\n\t\t\t\"fas-f96e\" => \"fas fa-soap\",\n\t\t\t\"fas-f696\" => \"fas fa-socks\",\n\t\t\t\"fas-f5ba\" => \"fas fa-solar-panel\",\n\t\t\t\"fas-f0dc\" => \"fas fa-sort\",\n\t\t\t\"fas-f15d\" => \"fas fa-sort-alpha-down\",\n\t\t\t\"fas-f881\" => \"fas fa-sort-alpha-down-alt\",\n\t\t\t\"fas-f15e\" => \"fas fa-sort-alpha-up\",\n\t\t\t\"fas-f882\" => \"fas fa-sort-alpha-up-alt\",\n\t\t\t\"fas-f160\" => \"fas fa-sort-amount-down\",\n\t\t\t\"fas-f884\" => \"fas fa-sort-amount-down-alt\",\n\t\t\t\"fas-f161\" => \"fas fa-sort-amount-up\",\n\t\t\t\"fas-f885\" => \"fas fa-sort-amount-up-alt\",\n\t\t\t\"fas-f0dd\" => \"fas fa-sort-down\",\n\t\t\t\"fas-f162\" => \"fas fa-sort-numeric-down\",\n\t\t\t\"fas-f886\" => \"fas fa-sort-numeric-down-alt\",\n\t\t\t\"fas-f163\" => \"fas fa-sort-numeric-up\",\n\t\t\t\"fas-f887\" => \"fas fa-sort-numeric-up-alt\",\n\t\t\t\"fas-f0de\" => \"fas fa-sort-up\",\n\t\t\t\"fas-f5bb\" => \"fas fa-spa\",\n\t\t\t\"fas-f197\" => \"fas fa-space-shuttle\",\n\t\t\t\"fas-f891\" => \"fas fa-spell-check\",\n\t\t\t\"fas-f717\" => \"fas fa-spider\",\n\t\t\t\"fas-f110\" => \"fas fa-spinner\",\n\t\t\t\"fas-f5bc\" => \"fas fa-splotch\",\n\t\t\t\"fas-f5bd\" => \"fas fa-spray-can\",\n\t\t\t\"fas-f0c8\" => \"fas fa-square\",\n\t\t\t\"fas-f45c\" => \"fas fa-square-full\",\n\t\t\t\"fas-f698\" => \"fas fa-square-root-alt\",\n\t\t\t\"fas-f5bf\" => \"fas fa-stamp\",\n\t\t\t\"fas-f005\" => \"fas fa-star\",\n\t\t\t\"fas-f699\" => \"fas fa-star-and-crescent\",\n\t\t\t\"fas-f089\" => \"fas fa-star-half\",\n\t\t\t\"fas-f5c0\" => \"fas fa-star-half-alt\",\n\t\t\t\"fas-f69a\" => \"fas fa-star-of-david\",\n\t\t\t\"fas-f621\" => \"fas fa-star-of-life\",\n\t\t\t\"fas-f048\" => \"fas fa-step-backward\",\n\t\t\t\"fas-f051\" => \"fas fa-step-forward\",\n\t\t\t\"fas-f0f1\" => \"fas fa-stethoscope\",\n\t\t\t\"fas-f249\" => \"fas fa-sticky-note\",\n\t\t\t\"fas-f04d\" => \"fas fa-stop\",\n\t\t\t\"fas-f28d\" => \"fas fa-stop-circle\",\n\t\t\t\"fas-f2f2\" => \"fas fa-stopwatch\",\n\t\t\t\"fas-f96f\" => \"fas fa-stopwatch-20\",\n\t\t\t\"fas-f54e\" => \"fas fa-store\",\n\t\t\t\"fas-f54f\" => \"fas fa-store-alt\",\n\t\t\t\"fas-f970\" => \"fas fa-store-alt-slash\",\n\t\t\t\"fas-f971\" => \"fas fa-store-slash\",\n\t\t\t\"fas-f550\" => \"fas fa-stream\",\n\t\t\t\"fas-f21d\" => \"fas fa-street-view\",\n\t\t\t\"fas-f0cc\" => \"fas fa-strikethrough\",\n\t\t\t\"fas-f551\" => \"fas fa-stroopwafel\",\n\t\t\t\"fas-f12c\" => \"fas fa-subscript\",\n\t\t\t\"fas-f239\" => \"fas fa-subway\",\n\t\t\t\"fas-f0f2\" => \"fas fa-suitcase\",\n\t\t\t\"fas-f5c1\" => \"fas fa-suitcase-rolling\",\n\t\t\t\"fas-f185\" => \"fas fa-sun\",\n\t\t\t\"fas-f12b\" => \"fas fa-superscript\",\n\t\t\t\"fas-f5c2\" => \"fas fa-surprise\",\n\t\t\t\"fas-f5c3\" => \"fas fa-swatchbook\",\n\t\t\t\"fas-f5c4\" => \"fas fa-swimmer\",\n\t\t\t\"fas-f5c5\" => \"fas fa-swimming-pool\",\n\t\t\t\"fas-f69b\" => \"fas fa-synagogue\",\n\t\t\t\"fas-f021\" => \"fas fa-sync\",\n\t\t\t\"fas-f2f1\" => \"fas fa-sync-alt\",\n\t\t\t\"fas-f48e\" => \"fas fa-syringe\",\n\t\t\t\"fas-f0ce\" => \"fas fa-table\",\n\t\t\t\"fas-f45d\" => \"fas fa-table-tennis\",\n\t\t\t\"fas-f10a\" => \"fas fa-tablet\",\n\t\t\t\"fas-f3fa\" => \"fas fa-tablet-alt\",\n\t\t\t\"fas-f490\" => \"fas fa-tablets\",\n\t\t\t\"fas-f3fd\" => \"fas fa-tachometer-alt\",\n\t\t\t\"fas-f02b\" => \"fas fa-tag\",\n\t\t\t\"fas-f02c\" => \"fas fa-tags\",\n\t\t\t\"fas-f4db\" => \"fas fa-tape\",\n\t\t\t\"fas-f0ae\" => \"fas fa-tasks\",\n\t\t\t\"fas-f1ba\" => \"fas fa-taxi\",\n\t\t\t\"fas-f62e\" => \"fas fa-teeth\",\n\t\t\t\"fas-f62f\" => \"fas fa-teeth-open\",\n\t\t\t\"fas-f769\" => \"fas fa-temperature-high\",\n\t\t\t\"fas-f76b\" => \"fas fa-temperature-low\",\n\t\t\t\"fas-f7d7\" => \"fas fa-tenge\",\n\t\t\t\"fas-f120\" => \"fas fa-terminal\",\n\t\t\t\"fas-f034\" => \"fas fa-text-height\",\n\t\t\t\"fas-f035\" => \"fas fa-text-width\",\n\t\t\t\"fas-f00a\" => \"fas fa-th\",\n\t\t\t\"fas-f009\" => \"fas fa-th-large\",\n\t\t\t\"fas-f00b\" => \"fas fa-th-list\",\n\t\t\t\"fas-f630\" => \"fas fa-theater-masks\",\n\t\t\t\"fas-f491\" => \"fas fa-thermometer\",\n\t\t\t\"fas-f2cb\" => \"fas fa-thermometer-empty\",\n\t\t\t\"fas-f2c7\" => \"fas fa-thermometer-full\",\n\t\t\t\"fas-f2c9\" => \"fas fa-thermometer-half\",\n\t\t\t\"fas-f2ca\" => \"fas fa-thermometer-quarter\",\n\t\t\t\"fas-f2c8\" => \"fas fa-thermometer-three-quarters\",\n\t\t\t\"fas-f165\" => \"fas fa-thumbs-down\",\n\t\t\t\"fas-f164\" => \"fas fa-thumbs-up\",\n\t\t\t\"fas-f08d\" => \"fas fa-thumbtack\",\n\t\t\t\"fas-f3ff\" => \"fas fa-ticket-alt\",\n\t\t\t\"fas-f00d\" => \"fas fa-times\",\n\t\t\t\"fas-f057\" => \"fas fa-times-circle\",\n\t\t\t\"fas-f043\" => \"fas fa-tint\",\n\t\t\t\"fas-f5c7\" => \"fas fa-tint-slash\",\n\t\t\t\"fas-f5c8\" => \"fas fa-tired\",\n\t\t\t\"fas-f204\" => \"fas fa-toggle-off\",\n\t\t\t\"fas-f205\" => \"fas fa-toggle-on\",\n\t\t\t\"fas-f7d8\" => \"fas fa-toilet\",\n\t\t\t\"fas-f71e\" => \"fas fa-toilet-paper\",\n\t\t\t\"fas-f972\" => \"fas fa-toilet-paper-slash\",\n\t\t\t\"fas-f552\" => \"fas fa-toolbox\",\n\t\t\t\"fas-f7d9\" => \"fas fa-tools\",\n\t\t\t\"fas-f5c9\" => \"fas fa-tooth\",\n\t\t\t\"fas-f6a0\" => \"fas fa-torah\",\n\t\t\t\"fas-f6a1\" => \"fas fa-torii-gate\",\n\t\t\t\"fas-f722\" => \"fas fa-tractor\",\n\t\t\t\"fas-f25c\" => \"fas fa-trademark\",\n\t\t\t\"fas-f637\" => \"fas fa-traffic-light\",\n\t\t\t\"fas-f941\" => \"fas fa-trailer\",\n\t\t\t\"fas-f238\" => \"fas fa-train\",\n\t\t\t\"fas-f7da\" => \"fas fa-tram\",\n\t\t\t\"fas-f224\" => \"fas fa-transgender\",\n\t\t\t\"fas-f225\" => \"fas fa-transgender-alt\",\n\t\t\t\"fas-f1f8\" => \"fas fa-trash\",\n\t\t\t\"fas-f2ed\" => \"fas fa-trash-alt\",\n\t\t\t\"fas-f829\" => \"fas fa-trash-restore\",\n\t\t\t\"fas-f82a\" => \"fas fa-trash-restore-alt\",\n\t\t\t\"fas-f1bb\" => \"fas fa-tree\",\n\t\t\t\"fas-f091\" => \"fas fa-trophy\",\n\t\t\t\"fas-f0d1\" => \"fas fa-truck\",\n\t\t\t\"fas-f4de\" => \"fas fa-truck-loading\",\n\t\t\t\"fas-f63b\" => \"fas fa-truck-monster\",\n\t\t\t\"fas-f4df\" => \"fas fa-truck-moving\",\n\t\t\t\"fas-f63c\" => \"fas fa-truck-pickup\",\n\t\t\t\"fas-f553\" => \"fas fa-tshirt\",\n\t\t\t\"fas-f1e4\" => \"fas fa-tty\",\n\t\t\t\"fas-f26c\" => \"fas fa-tv\",\n\t\t\t\"fas-f0e9\" => \"fas fa-umbrella\",\n\t\t\t\"fas-f5ca\" => \"fas fa-umbrella-beach\",\n\t\t\t\"fas-f0cd\" => \"fas fa-underline\",\n\t\t\t\"fas-f0e2\" => \"fas fa-undo\",\n\t\t\t\"fas-f2ea\" => \"fas fa-undo-alt\",\n\t\t\t\"fas-f29a\" => \"fas fa-universal-access\",\n\t\t\t\"fas-f19c\" => \"fas fa-university\",\n\t\t\t\"fas-f127\" => \"fas fa-unlink\",\n\t\t\t\"fas-f09c\" => \"fas fa-unlock\",\n\t\t\t\"fas-f13e\" => \"fas fa-unlock-alt\",\n\t\t\t\"fas-f093\" => \"fas fa-upload\",\n\t\t\t\"fas-f007\" => \"fas fa-user\",\n\t\t\t\"fas-f406\" => \"fas fa-user-alt\",\n\t\t\t\"fas-f4fa\" => \"fas fa-user-alt-slash\",\n\t\t\t\"fas-f4fb\" => \"fas fa-user-astronaut\",\n\t\t\t\"fas-f4fc\" => \"fas fa-user-check\",\n\t\t\t\"fas-f2bd\" => \"fas fa-user-circle\",\n\t\t\t\"fas-f4fd\" => \"fas fa-user-clock\",\n\t\t\t\"fas-f4fe\" => \"fas fa-user-cog\",\n\t\t\t\"fas-f4ff\" => \"fas fa-user-edit\",\n\t\t\t\"fas-f500\" => \"fas fa-user-friends\",\n\t\t\t\"fas-f501\" => \"fas fa-user-graduate\",\n\t\t\t\"fas-f728\" => \"fas fa-user-injured\",\n\t\t\t\"fas-f502\" => \"fas fa-user-lock\",\n\t\t\t\"fas-f0f0\" => \"fas fa-user-md\",\n\t\t\t\"fas-f503\" => \"fas fa-user-minus\",\n\t\t\t\"fas-f504\" => \"fas fa-user-ninja\",\n\t\t\t\"fas-f82f\" => \"fas fa-user-nurse\",\n\t\t\t\"fas-f234\" => \"fas fa-user-plus\",\n\t\t\t\"fas-f21b\" => \"fas fa-user-secret\",\n\t\t\t\"fas-f505\" => \"fas fa-user-shield\",\n\t\t\t\"fas-f506\" => \"fas fa-user-slash\",\n\t\t\t\"fas-f507\" => \"fas fa-user-tag\",\n\t\t\t\"fas-f508\" => \"fas fa-user-tie\",\n\t\t\t\"fas-f235\" => \"fas fa-user-times\",\n\t\t\t\"fas-f0c0\" => \"fas fa-users\",\n\t\t\t\"fas-f509\" => \"fas fa-users-cog\",\n\t\t\t\"fas-f2e5\" => \"fas fa-utensil-spoon\",\n\t\t\t\"fas-f2e7\" => \"fas fa-utensils\",\n\t\t\t\"fas-f5cb\" => \"fas fa-vector-square\",\n\t\t\t\"fas-f221\" => \"fas fa-venus\",\n\t\t\t\"fas-f226\" => \"fas fa-venus-double\",\n\t\t\t\"fas-f228\" => \"fas fa-venus-mars\",\n\t\t\t\"fas-f492\" => \"fas fa-vial\",\n\t\t\t\"fas-f493\" => \"fas fa-vials\",\n\t\t\t\"fas-f03d\" => \"fas fa-video\",\n\t\t\t\"fas-f4e2\" => \"fas fa-video-slash\",\n\t\t\t\"fas-f6a7\" => \"fas fa-vihara\",\n\t\t\t\"fas-f974\" => \"fas fa-virus\",\n\t\t\t\"fas-f975\" => \"fas fa-virus-slash\",\n\t\t\t\"fas-f976\" => \"fas fa-viruses\",\n\t\t\t\"fas-f897\" => \"fas fa-voicemail\",\n\t\t\t\"fas-f45f\" => \"fas fa-volleyball-ball\",\n\t\t\t\"fas-f027\" => \"fas fa-volume-down\",\n\t\t\t\"fas-f6a9\" => \"fas fa-volume-mute\",\n\t\t\t\"fas-f026\" => \"fas fa-volume-off\",\n\t\t\t\"fas-f028\" => \"fas fa-volume-up\",\n\t\t\t\"fas-f772\" => \"fas fa-vote-yea\",\n\t\t\t\"fas-f729\" => \"fas fa-vr-cardboard\",\n\t\t\t\"fas-f554\" => \"fas fa-walking\",\n\t\t\t\"fas-f555\" => \"fas fa-wallet\",\n\t\t\t\"fas-f494\" => \"fas fa-warehouse\",\n\t\t\t\"fas-f773\" => \"fas fa-water\",\n\t\t\t\"fas-f83e\" => \"fas fa-wave-square\",\n\t\t\t\"fas-f496\" => \"fas fa-weight\",\n\t\t\t\"fas-f5cd\" => \"fas fa-weight-hanging\",\n\t\t\t\"fas-f193\" => \"fas fa-wheelchair\",\n\t\t\t\"fas-f1eb\" => \"fas fa-wifi\",\n\t\t\t\"fas-f72e\" => \"fas fa-wind\",\n\t\t\t\"fas-f410\" => \"fas fa-window-close\",\n\t\t\t\"fas-f2d0\" => \"fas fa-window-maximize\",\n\t\t\t\"fas-f2d1\" => \"fas fa-window-minimize\",\n\t\t\t\"fas-f2d2\" => \"fas fa-window-restore\",\n\t\t\t\"fas-f72f\" => \"fas fa-wine-bottle\",\n\t\t\t\"fas-f4e3\" => \"fas fa-wine-glass\",\n\t\t\t\"fas-f5ce\" => \"fas fa-wine-glass-alt\",\n\t\t\t\"fas-f159\" => \"fas fa-won-sign\",\n\t\t\t\"fas-f0ad\" => \"fas fa-wrench\",\n\t\t\t\"fas-f497\" => \"fas fa-x-ray\",\n\t\t\t\"fas-f157\" => \"fas fa-yen-sign\",\n\t\t\t\"fas-f6ad\" => \"fas fa-yin-y\"\n\t\t);\n\n\t\t$regular_icons = array(\t\n\t\t\t\"far-f2b9\" => \"far fa-address-book\",\n\t\t\t\"far-f2bb\" => \"far fa-address-card\",\n\t\t\t\"far-f556\" => \"far fa-angry\",\n\t\t\t\"far-f358\" => \"far fa-arrow-alt-circle-down\",\n\t\t\t\"far-f359\" => \"far fa-arrow-alt-circle-left\",\n\t\t\t\"far-f35a\" => \"far fa-arrow-alt-circle-right\",\n\t\t\t\"far-f35b\" => \"far fa-arrow-alt-circle-up\",\n\t\t\t\"far-f0f3\" => \"far fa-bell\",\n\t\t\t\"far-f1f6\" => \"far fa-bell-slash\",\n\t\t\t\"far-f02e\" => \"far fa-bookmark\",\n\t\t\t\"far-f1ad\" => \"far fa-building\",\n\t\t\t\"far-f133\" => \"far fa-calendar\",\n\t\t\t\"far-f073\" => \"far fa-calendar-alt\",\n\t\t\t\"far-f274\" => \"far fa-calendar-check\",\n\t\t\t\"far-f272\" => \"far fa-calendar-minus\",\n\t\t\t\"far-f271\" => \"far fa-calendar-plus\",\n\t\t\t\"far-f273\" => \"far fa-calendar-times\",\n\t\t\t\"far-f150\" => \"far fa-caret-square-down\",\n\t\t\t\"far-f191\" => \"far fa-caret-square-left\",\n\t\t\t\"far-f152\" => \"far fa-caret-square-right\",\n\t\t\t\"far-f151\" => \"far fa-caret-square-up\",\n\t\t\t\"far-f080\" => \"far fa-chart-bar\",\n\t\t\t\"far-f058\" => \"far fa-check-circle\",\n\t\t\t\"far-f14a\" => \"far fa-check-square\",\n\t\t\t\"far-f111\" => \"far fa-circle\",\n\t\t\t\"far-f328\" => \"far fa-clipboard\",\n\t\t\t\"far-f017\" => \"far fa-clock\",\n\t\t\t\"far-f24d\" => \"far fa-clone\",\n\t\t\t\"far-f20a\" => \"far fa-closed-captioning\",\n\t\t\t\"far-f075\" => \"far fa-comment\",\n\t\t\t\"far-f27a\" => \"far fa-comment-alt\",\n\t\t\t\"far-f4ad\" => \"far fa-comment-dots\",\n\t\t\t\"far-f086\" => \"far fa-comments\",\n\t\t\t\"far-f14e\" => \"far fa-compass\",\n\t\t\t\"far-f0c5\" => \"far fa-copy\",\n\t\t\t\"far-f1f9\" => \"far fa-copyright\",\n\t\t\t\"far-f09d\" => \"far fa-credit-card\",\n\t\t\t\"far-f567\" => \"far fa-dizzy\",\n\t\t\t\"far-f192\" => \"far fa-dot-circle\",\n\t\t\t\"far-f044\" => \"far fa-edit\",\n\t\t\t\"far-f0e0\" => \"far fa-envelope\",\n\t\t\t\"far-f2b6\" => \"far fa-envelope-open\",\n\t\t\t\"far-f06e\" => \"far fa-eye\",\n\t\t\t\"far-f070\" => \"far fa-eye-slash\",\n\t\t\t\"far-f15b\" => \"far fa-file\",\n\t\t\t\"far-f15c\" => \"far fa-file-alt\",\n\t\t\t\"far-f1c6\" => \"far fa-file-archive\",\n\t\t\t\"far-f1c7\" => \"far fa-file-audio\",\n\t\t\t\"far-f1c9\" => \"far fa-file-code\",\n\t\t\t\"far-f1c3\" => \"far fa-file-excel\",\n\t\t\t\"far-f1c5\" => \"far fa-file-image\",\n\t\t\t\"far-f1c1\" => \"far fa-file-pdf\",\n\t\t\t\"far-f1c4\" => \"far fa-file-powerpoint\",\n\t\t\t\"far-f1c8\" => \"far fa-file-video\",\n\t\t\t\"far-f1c2\" => \"far fa-file-word\",\n\t\t\t\"far-f024\" => \"far fa-flag\",\n\t\t\t\"far-f579\" => \"far fa-flushed\",\n\t\t\t\"far-f07b\" => \"far fa-folder\",\n\t\t\t\"far-f07c\" => \"far fa-folder-open\",\n\t\t\t\"far-f119\" => \"far fa-frown\",\n\t\t\t\"far-f57a\" => \"far fa-frown-open\",\n\t\t\t\"far-f1e3\" => \"far fa-futbol\",\n\t\t\t\"far-f3a5\" => \"far fa-gem\",\n\t\t\t\"far-f57f\" => \"far fa-grimace\",\n\t\t\t\"far-f580\" => \"far fa-grin\",\n\t\t\t\"far-f581\" => \"far fa-grin-alt\",\n\t\t\t\"far-f582\" => \"far fa-grin-beam\",\n\t\t\t\"far-f583\" => \"far fa-grin-beam-sweat\",\n\t\t\t\"far-f584\" => \"far fa-grin-hearts\",\n\t\t\t\"far-f585\" => \"far fa-grin-squint\",\n\t\t\t\"far-f586\" => \"far fa-grin-squint-tears\",\n\t\t\t\"far-f587\" => \"far fa-grin-stars\",\n\t\t\t\"far-f588\" => \"far fa-grin-tears\",\n\t\t\t\"far-f589\" => \"far fa-grin-tongue\",\n\t\t\t\"far-f58a\" => \"far fa-grin-tongue-squint\",\n\t\t\t\"far-f58b\" => \"far fa-grin-tongue-wink\",\n\t\t\t\"far-f58c\" => \"far fa-grin-wink\",\n\t\t\t\"far-f258\" => \"far fa-hand-lizard\",\n\t\t\t\"far-f256\" => \"far fa-hand-paper\",\n\t\t\t\"far-f25b\" => \"far fa-hand-peace\",\n\t\t\t\"far-f0a7\" => \"far fa-hand-point-down\",\n\t\t\t\"far-f0a5\" => \"far fa-hand-point-left\",\n\t\t\t\"far-f0a4\" => \"far fa-hand-point-right\",\n\t\t\t\"far-f0a6\" => \"far fa-hand-point-up\",\n\t\t\t\"far-f25a\" => \"far fa-hand-pointer\",\n\t\t\t\"far-f255\" => \"far fa-hand-rock\",\n\t\t\t\"far-f257\" => \"far fa-hand-scissors\",\n\t\t\t\"far-f259\" => \"far fa-hand-spock\",\n\t\t\t\"far-f2b5\" => \"far fa-handshake\",\n\t\t\t\"far-f0a0\" => \"far fa-hdd\",\n\t\t\t\"far-f004\" => \"far fa-heart\",\n\t\t\t\"far-f0f8\" => \"far fa-hospital\",\n\t\t\t\"far-f254\" => \"far fa-hourglass\",\n\t\t\t\"far-f2c1\" => \"far fa-id-badge\",\n\t\t\t\"far-f2c2\" => \"far fa-id-card\",\n\t\t\t\"far-f03e\" => \"far fa-image\",\n\t\t\t\"far-f302\" => \"far fa-images\",\n\t\t\t\"far-f11c\" => \"far fa-keyboard\",\n\t\t\t\"far-f596\" => \"far fa-kiss\",\n\t\t\t\"far-f597\" => \"far fa-kiss-beam\",\n\t\t\t\"far-f598\" => \"far fa-kiss-wink-heart\",\n\t\t\t\"far-f599\" => \"far fa-laugh\",\n\t\t\t\"far-f59a\" => \"far fa-laugh-beam\",\n\t\t\t\"far-f59b\" => \"far fa-laugh-squint\",\n\t\t\t\"far-f59c\" => \"far fa-laugh-wink\",\n\t\t\t\"far-f094\" => \"far fa-lemon\",\n\t\t\t\"far-f1cd\" => \"far fa-life-ring\",\n\t\t\t\"far-f0eb\" => \"far fa-lightbulb\",\n\t\t\t\"far-f022\" => \"far fa-list-alt\",\n\t\t\t\"far-f279\" => \"far fa-map\",\n\t\t\t\"far-f11a\" => \"far fa-meh\",\n\t\t\t\"far-f5a4\" => \"far fa-meh-blank\",\n\t\t\t\"far-f5a5\" => \"far fa-meh-rolling-eyes\",\n\t\t\t\"far-f146\" => \"far fa-minus-square\",\n\t\t\t\"far-f3d1\" => \"far fa-money-bill-alt\",\n\t\t\t\"far-f186\" => \"far fa-moon\",\n\t\t\t\"far-f1ea\" => \"far fa-newspaper\",\n\t\t\t\"far-f247\" => \"far fa-object-group\",\n\t\t\t\"far-f248\" => \"far fa-object-ungroup\",\n\t\t\t\"far-f1d8\" => \"far fa-paper-plane\",\n\t\t\t\"far-f28b\" => \"far fa-pause-circle\",\n\t\t\t\"far-f144\" => \"far fa-play-circle\",\n\t\t\t\"far-f0fe\" => \"far fa-plus-square\",\n\t\t\t\"far-f059\" => \"far fa-question-circle\",\n\t\t\t\"far-f25d\" => \"far fa-registered\",\n\t\t\t\"far-f5b3\" => \"far fa-sad-cry\",\n\t\t\t\"far-f5b4\" => \"far fa-sad-tear\",\n\t\t\t\"far-f0c7\" => \"far fa-save\",\n\t\t\t\"far-f14d\" => \"far fa-share-square\",\n\t\t\t\"far-f118\" => \"far fa-smile\",\n\t\t\t\"far-f5b8\" => \"far fa-smile-beam\",\n\t\t\t\"far-f4da\" => \"far fa-smile-wink\",\n\t\t\t\"far-f2dc\" => \"far fa-snowflake\",\n\t\t\t\"far-f0c8\" => \"far fa-square\",\n\t\t\t\"far-f005\" => \"far fa-star\",\n\t\t\t\"far-f089\" => \"far fa-star-half\",\n\t\t\t\"far-f249\" => \"far fa-sticky-note\",\n\t\t\t\"far-f28d\" => \"far fa-stop-circle\",\n\t\t\t\"far-f185\" => \"far fa-sun\",\n\t\t\t\"far-f5c2\" => \"far fa-surprise\",\n\t\t\t\"far-f165\" => \"far fa-thumbs-down\",\n\t\t\t\"far-f164\" => \"far fa-thumbs-up\",\n\t\t\t\"far-f057\" => \"far fa-times-circle\",\n\t\t\t\"far-f5c8\" => \"far fa-tired\",\n\t\t\t\"far-f2ed\" => \"far fa-trash-alt\",\n\t\t\t\"far-f007\" => \"far fa-user\",\n\t\t\t\"far-f2bd\" => \"far fa-user-circle\",\n\t\t\t\"far-f410\" => \"far fa-window-close\",\n\t\t\t\"far-f2d0\" => \"far fa-window-maximize\",\n\t\t\t\"far-f2d1\" => \"far fa-window-minimize\",\n\t\t\t\"far-f2d2\" => \"far fa-window-rest\"\n\t\t);\n\n\t\t$brand_icons = array(\n\t\t\t\"fab-f26e\" => \"fab fa-500px\",\n\t\t\t\"fab-f368\" => \"fab fa-accessible-icon\",\n\t\t\t\"fab-f369\" => \"fab fa-accusoft\",\n\t\t\t\"fab-f6af\" => \"fab fa-acquisitions-incorporated\",\n\t\t\t\"fab-f170\" => \"fab fa-adn\",\n\t\t\t\"fab-f778\" => \"fab fa-adobe\",\n\t\t\t\"fab-f36a\" => \"fab fa-adversal\",\n\t\t\t\"fab-f36b\" => \"fab fa-affiliatetheme\",\n\t\t\t\"fab-f834\" => \"fab fa-airbnb\",\n\t\t\t\"fab-f36c\" => \"fab fa-algolia\",\n\t\t\t\"fab-f642\" => \"fab fa-alipay\",\n\t\t\t\"fab-f270\" => \"fab fa-amazon\",\n\t\t\t\"fab-f42c\" => \"fab fa-amazon-pay\",\n\t\t\t\"fab-f36d\" => \"fab fa-amilia\",\n\t\t\t\"fab-f17b\" => \"fab fa-android\",\n\t\t\t\"fab-f209\" => \"fab fa-angellist\",\n\t\t\t\"fab-f36e\" => \"fab fa-angrycreative\",\n\t\t\t\"fab-f420\" => \"fab fa-angular\",\n\t\t\t\"fab-f36f\" => \"fab fa-app-store\",\n\t\t\t\"fab-f370\" => \"fab fa-app-store-ios\",\n\t\t\t\"fab-f371\" => \"fab fa-apper\",\n\t\t\t\"fab-f179\" => \"fab fa-apple\",\n\t\t\t\"fab-f415\" => \"fab fa-apple-pay\",\n\t\t\t\"fab-f77a\" => \"fab fa-artstation\",\n\t\t\t\"fab-f372\" => \"fab fa-asymmetrik\",\n\t\t\t\"fab-f77b\" => \"fab fa-atlassian\",\n\t\t\t\"fab-f373\" => \"fab fa-audible\",\n\t\t\t\"fab-f41c\" => \"fab fa-autoprefixer\",\n\t\t\t\"fab-f374\" => \"fab fa-avianex\",\n\t\t\t\"fab-f421\" => \"fab fa-aviato\",\n\t\t\t\"fab-f375\" => \"fab fa-aws\",\n\t\t\t\"fab-f2d5\" => \"fab fa-bandcamp\",\n\t\t\t\"fab-f835\" => \"fab fa-battle-net\",\n\t\t\t\"fab-f1b4\" => \"fab fa-behance\",\n\t\t\t\"fab-f1b5\" => \"fab fa-behance-square\",\n\t\t\t\"fab-f378\" => \"fab fa-bimobject\",\n\t\t\t\"fab-f171\" => \"fab fa-bitbucket\",\n\t\t\t\"fab-f379\" => \"fab fa-bitcoin\",\n\t\t\t\"fab-f37a\" => \"fab fa-bity\",\n\t\t\t\"fab-f27e\" => \"fab fa-black-tie\",\n\t\t\t\"fab-f37b\" => \"fab fa-blackberry\",\n\t\t\t\"fab-f37c\" => \"fab fa-blogger\",\n\t\t\t\"fab-f37d\" => \"fab fa-blogger-b\",\n\t\t\t\"fab-f293\" => \"fab fa-bluetooth\",\n\t\t\t\"fab-f294\" => \"fab fa-bluetooth-b\",\n\t\t\t\"fab-f836\" => \"fab fa-bootstrap\",\n\t\t\t\"fab-f15a\" => \"fab fa-btc\",\n\t\t\t\"fab-f837\" => \"fab fa-buffer\",\n\t\t\t\"fab-f37f\" => \"fab fa-buromobelexperte\",\n\t\t\t\"fab-f8a6\" => \"fab fa-buy-n-large\",\n\t\t\t\"fab-f20d\" => \"fab fa-buysellads\",\n\t\t\t\"fab-f785\" => \"fab fa-canadian-maple-leaf\",\n\t\t\t\"fab-f42d\" => \"fab fa-cc-amazon-pay\",\n\t\t\t\"fab-f1f3\" => \"fab fa-cc-amex\",\n\t\t\t\"fab-f416\" => \"fab fa-cc-apple-pay\",\n\t\t\t\"fab-f24c\" => \"fab fa-cc-diners-club\",\n\t\t\t\"fab-f1f2\" => \"fab fa-cc-discover\",\n\t\t\t\"fab-f24b\" => \"fab fa-cc-jcb\",\n\t\t\t\"fab-f1f1\" => \"fab fa-cc-mastercard\",\n\t\t\t\"fab-f1f4\" => \"fab fa-cc-paypal\",\n\t\t\t\"fab-f1f5\" => \"fab fa-cc-stripe\",\n\t\t\t\"fab-f1f0\" => \"fab fa-cc-visa\",\n\t\t\t\"fab-f380\" => \"fab fa-centercode\",\n\t\t\t\"fab-f789\" => \"fab fa-centos\",\n\t\t\t\"fab-f268\" => \"fab fa-chrome\",\n\t\t\t\"fab-f838\" => \"fab fa-chromecast\",\n\t\t\t\"fab-f383\" => \"fab fa-cloudscale\",\n\t\t\t\"fab-f384\" => \"fab fa-cloudsmith\",\n\t\t\t\"fab-f385\" => \"fab fa-cloudversify\",\n\t\t\t\"fab-f1cb\" => \"fab fa-codepen\",\n\t\t\t\"fab-f284\" => \"fab fa-codiepie\",\n\t\t\t\"fab-f78d\" => \"fab fa-confluence\",\n\t\t\t\"fab-f20e\" => \"fab fa-connectdevelop\",\n\t\t\t\"fab-f26d\" => \"fab fa-contao\",\n\t\t\t\"fab-f89e\" => \"fab fa-cotton-bureau\",\n\t\t\t\"fab-f388\" => \"fab fa-cpanel\",\n\t\t\t\"fab-f25e\" => \"fab fa-creative-commons\",\n\t\t\t\"fab-f4e7\" => \"fab fa-creative-commons-by\",\n\t\t\t\"fab-f4e8\" => \"fab fa-creative-commons-nc\",\n\t\t\t\"fab-f4e9\" => \"fab fa-creative-commons-nc-eu\",\n\t\t\t\"fab-f4ea\" => \"fab fa-creative-commons-nc-jp\",\n\t\t\t\"fab-f4eb\" => \"fab fa-creative-commons-nd\",\n\t\t\t\"fab-f4ec\" => \"fab fa-creative-commons-pd\",\n\t\t\t\"fab-f4ed\" => \"fab fa-creative-commons-pd-alt\",\n\t\t\t\"fab-f4ee\" => \"fab fa-creative-commons-remix\",\n\t\t\t\"fab-f4ef\" => \"fab fa-creative-commons-sa\",\n\t\t\t\"fab-f4f0\" => \"fab fa-creative-commons-sampling\",\n\t\t\t\"fab-f4f1\" => \"fab fa-creative-commons-sampling-plus\",\n\t\t\t\"fab-f4f2\" => \"fab fa-creative-commons-share\",\n\t\t\t\"fab-f4f3\" => \"fab fa-creative-commons-zero\",\n\t\t\t\"fab-f6c9\" => \"fab fa-critical-role\",\n\t\t\t\"fab-f13c\" => \"fab fa-css3\",\n\t\t\t\"fab-f38b\" => \"fab fa-css3-alt\",\n\t\t\t\"fab-f38c\" => \"fab fa-cuttlefish\",\n\t\t\t\"fab-f38d\" => \"fab fa-d-and-d\",\n\t\t\t\"fab-f6ca\" => \"fab fa-d-and-d-beyond\",\n\t\t\t\"fab-f952\" => \"fab fa-dailymotion\",\n\t\t\t\"fab-f210\" => \"fab fa-dashcube\",\n\t\t\t\"fab-f1a5\" => \"fab fa-delicious\",\n\t\t\t\"fab-f38e\" => \"fab fa-deploydog\",\n\t\t\t\"fab-f38f\" => \"fab fa-deskpro\",\n\t\t\t\"fab-f6cc\" => \"fab fa-dev\",\n\t\t\t\"fab-f1bd\" => \"fab fa-deviantart\",\n\t\t\t\"fab-f790\" => \"fab fa-dhl\",\n\t\t\t\"fab-f791\" => \"fab fa-diaspora\",\n\t\t\t\"fab-f1a6\" => \"fab fa-digg\",\n\t\t\t\"fab-f391\" => \"fab fa-digital-ocean\",\n\t\t\t\"fab-f392\" => \"fab fa-discord\",\n\t\t\t\"fab-f393\" => \"fab fa-discourse\",\n\t\t\t\"fab-f394\" => \"fab fa-dochub\",\n\t\t\t\"fab-f395\" => \"fab fa-docker\",\n\t\t\t\"fab-f396\" => \"fab fa-draft2digital\",\n\t\t\t\"fab-f17d\" => \"fab fa-dribbble\",\n\t\t\t\"fab-f397\" => \"fab fa-dribbble-square\",\n\t\t\t\"fab-f16b\" => \"fab fa-dropbox\",\n\t\t\t\"fab-f1a9\" => \"fab fa-drupal\",\n\t\t\t\"fab-f399\" => \"fab fa-dyalog\",\n\t\t\t\"fab-f39a\" => \"fab fa-earlybirds\",\n\t\t\t\"fab-f4f4\" => \"fab fa-ebay\",\n\t\t\t\"fab-f282\" => \"fab fa-edge\",\n\t\t\t\"fab-f430\" => \"fab fa-elementor\",\n\t\t\t\"fab-f5f1\" => \"fab fa-ello\",\n\t\t\t\"fab-f423\" => \"fab fa-ember\",\n\t\t\t\"fab-f1d1\" => \"fab fa-empire\",\n\t\t\t\"fab-f299\" => \"fab fa-envira\",\n\t\t\t\"fab-f39d\" => \"fab fa-erlang\",\n\t\t\t\"fab-f42e\" => \"fab fa-ethereum\",\n\t\t\t\"fab-f2d7\" => \"fab fa-etsy\",\n\t\t\t\"fab-f839\" => \"fab fa-evernote\",\n\t\t\t\"fab-f23e\" => \"fab fa-expeditedssl\",\n\t\t\t\"fab-f09a\" => \"fab fa-facebook\",\n\t\t\t\"fab-f39e\" => \"fab fa-facebook-f\",\n\t\t\t\"fab-f39f\" => \"fab fa-facebook-messenger\",\n\t\t\t\"fab-f082\" => \"fab fa-facebook-square\",\n\t\t\t\"fab-f6dc\" => \"fab fa-fantasy-flight-games\",\n\t\t\t\"fab-f797\" => \"fab fa-fedex\",\n\t\t\t\"fab-f798\" => \"fab fa-fedora\",\n\t\t\t\"fab-f799\" => \"fab fa-figma\",\n\t\t\t\"fab-f269\" => \"fab fa-firefox\",\n\t\t\t\"fab-f907\" => \"fab fa-firefox-browser\",\n\t\t\t\"fab-f2b0\" => \"fab fa-first-order\",\n\t\t\t\"fab-f50a\" => \"fab fa-first-order-alt\",\n\t\t\t\"fab-f3a1\" => \"fab fa-firstdraft\",\n\t\t\t\"fab-f16e\" => \"fab fa-flickr\",\n\t\t\t\"fab-f44d\" => \"fab fa-flipboard\",\n\t\t\t\"fab-f417\" => \"fab fa-fly\",\n\t\t\t\"fab-f2b4\" => \"fab fa-font-awesome\",\n\t\t\t\"fab-f35c\" => \"fab fa-font-awesome-alt\",\n\t\t\t\"fab-f425\" => \"fab fa-font-awesome-flag\",\n\t\t\t\"fab-f280\" => \"fab fa-fonticons\",\n\t\t\t\"fab-f3a2\" => \"fab fa-fonticons-fi\",\n\t\t\t\"fab-f286\" => \"fab fa-fort-awesome\",\n\t\t\t\"fab-f3a3\" => \"fab fa-fort-awesome-alt\",\n\t\t\t\"fab-f211\" => \"fab fa-forumbee\",\n\t\t\t\"fab-f180\" => \"fab fa-foursquare\",\n\t\t\t\"fab-f2c5\" => \"fab fa-free-code-camp\",\n\t\t\t\"fab-f3a4\" => \"fab fa-freebsd\",\n\t\t\t\"fab-f50b\" => \"fab fa-fulcrum\",\n\t\t\t\"fab-f50c\" => \"fab fa-galactic-republic\",\n\t\t\t\"fab-f50d\" => \"fab fa-galactic-senate\",\n\t\t\t\"fab-f265\" => \"fab fa-get-pocket\",\n\t\t\t\"fab-f260\" => \"fab fa-gg\",\n\t\t\t\"fab-f261\" => \"fab fa-gg-circle\",\n\t\t\t\"fab-f1d3\" => \"fab fa-git\",\n\t\t\t\"fab-f841\" => \"fab fa-git-alt\",\n\t\t\t\"fab-f1d2\" => \"fab fa-git-square\",\n\t\t\t\"fab-f09b\" => \"fab fa-github\",\n\t\t\t\"fab-f113\" => \"fab fa-github-alt\",\n\t\t\t\"fab-f092\" => \"fab fa-github-square\",\n\t\t\t\"fab-f3a6\" => \"fab fa-gitkraken\",\n\t\t\t\"fab-f296\" => \"fab fa-gitlab\",\n\t\t\t\"fab-f426\" => \"fab fa-gitter\",\n\t\t\t\"fab-f2a5\" => \"fab fa-glide\",\n\t\t\t\"fab-f2a6\" => \"fab fa-glide-g\",\n\t\t\t\"fab-f3a7\" => \"fab fa-gofore\",\n\t\t\t\"fab-f3a8\" => \"fab fa-goodreads\",\n\t\t\t\"fab-f3a9\" => \"fab fa-goodreads-g\",\n\t\t\t\"fab-f1a0\" => \"fab fa-google\",\n\t\t\t\"fab-f3aa\" => \"fab fa-google-drive\",\n\t\t\t\"fab-f3ab\" => \"fab fa-google-play\",\n\t\t\t\"fab-f2b3\" => \"fab fa-google-plus\",\n\t\t\t\"fab-f0d5\" => \"fab fa-google-plus-g\",\n\t\t\t\"fab-f0d4\" => \"fab fa-google-plus-square\",\n\t\t\t\"fab-f1ee\" => \"fab fa-google-wallet\",\n\t\t\t\"fab-f184\" => \"fab fa-gratipay\",\n\t\t\t\"fab-f2d6\" => \"fab fa-grav\",\n\t\t\t\"fab-f3ac\" => \"fab fa-gripfire\",\n\t\t\t\"fab-f3ad\" => \"fab fa-grunt\",\n\t\t\t\"fab-f3ae\" => \"fab fa-gulp\",\n\t\t\t\"fab-f1d4\" => \"fab fa-hacker-news\",\n\t\t\t\"fab-f3af\" => \"fab fa-hacker-news-square\",\n\t\t\t\"fab-f5f7\" => \"fab fa-hackerrank\",\n\t\t\t\"fab-f452\" => \"fab fa-hips\",\n\t\t\t\"fab-f3b0\" => \"fab fa-hire-a-helper\",\n\t\t\t\"fab-f427\" => \"fab fa-hooli\",\n\t\t\t\"fab-f592\" => \"fab fa-hornbill\",\n\t\t\t\"fab-f3b1\" => \"fab fa-hotjar\",\n\t\t\t\"fab-f27c\" => \"fab fa-houzz\",\n\t\t\t\"fab-f13b\" => \"fab fa-html5\",\n\t\t\t\"fab-f3b2\" => \"fab fa-hubspot\",\n\t\t\t\"fab-f913\" => \"fab fa-ideal\",\n\t\t\t\"fab-f2d8\" => \"fab fa-imdb\",\n\t\t\t\"fab-f16d\" => \"fab fa-instagram\",\n\t\t\t\"fab-f955\" => \"fab fa-instagram-square\",\n\t\t\t\"fab-f7af\" => \"fab fa-intercom\",\n\t\t\t\"fab-f26b\" => \"fab fa-internet-explorer\",\n\t\t\t\"fab-f7b0\" => \"fab fa-invision\",\n\t\t\t\"fab-f208\" => \"fab fa-ioxhost\",\n\t\t\t\"fab-f83a\" => \"fab fa-itch-io\",\n\t\t\t\"fab-f3b4\" => \"fab fa-itunes\",\n\t\t\t\"fab-f3b5\" => \"fab fa-itunes-note\",\n\t\t\t\"fab-f4e4\" => \"fab fa-java\",\n\t\t\t\"fab-f50e\" => \"fab fa-jedi-order\",\n\t\t\t\"fab-f3b6\" => \"fab fa-jenkins\",\n\t\t\t\"fab-f7b1\" => \"fab fa-jira\",\n\t\t\t\"fab-f3b7\" => \"fab fa-joget\",\n\t\t\t\"fab-f1aa\" => \"fab fa-joomla\",\n\t\t\t\"fab-f3b8\" => \"fab fa-js\",\n\t\t\t\"fab-f3b9\" => \"fab fa-js-square\",\n\t\t\t\"fab-f1cc\" => \"fab fa-jsfiddle\",\n\t\t\t\"fab-f5fa\" => \"fab fa-kaggle\",\n\t\t\t\"fab-f4f5\" => \"fab fa-keybase\",\n\t\t\t\"fab-f3ba\" => \"fab fa-keycdn\",\n\t\t\t\"fab-f3bb\" => \"fab fa-kickstarter\",\n\t\t\t\"fab-f3bc\" => \"fab fa-kickstarter-k\",\n\t\t\t\"fab-f42f\" => \"fab fa-korvue\",\n\t\t\t\"fab-f3bd\" => \"fab fa-laravel\",\n\t\t\t\"fab-f202\" => \"fab fa-lastfm\",\n\t\t\t\"fab-f203\" => \"fab fa-lastfm-square\",\n\t\t\t\"fab-f212\" => \"fab fa-leanpub\",\n\t\t\t\"fab-f41d\" => \"fab fa-less\",\n\t\t\t\"fab-f3c0\" => \"fab fa-line\",\n\t\t\t\"fab-f08c\" => \"fab fa-linkedin\",\n\t\t\t\"fab-f0e1\" => \"fab fa-linkedin-in\",\n\t\t\t\"fab-f2b8\" => \"fab fa-linode\",\n\t\t\t\"fab-f17c\" => \"fab fa-linux\",\n\t\t\t\"fab-f3c3\" => \"fab fa-lyft\",\n\t\t\t\"fab-f3c4\" => \"fab fa-magento\",\n\t\t\t\"fab-f59e\" => \"fab fa-mailchimp\",\n\t\t\t\"fab-f50f\" => \"fab fa-mandalorian\",\n\t\t\t\"fab-f60f\" => \"fab fa-markdown\",\n\t\t\t\"fab-f4f6\" => \"fab fa-mastodon\",\n\t\t\t\"fab-f136\" => \"fab fa-maxcdn\",\n\t\t\t\"fab-f8ca\" => \"fab fa-mdb\",\n\t\t\t\"fab-f3c6\" => \"fab fa-medapps\",\n\t\t\t\"fab-f23a\" => \"fab fa-medium\",\n\t\t\t\"fab-f3c7\" => \"fab fa-medium-m\",\n\t\t\t\"fab-f3c8\" => \"fab fa-medrt\",\n\t\t\t\"fab-f2e0\" => \"fab fa-meetup\",\n\t\t\t\"fab-f5a3\" => \"fab fa-megaport\",\n\t\t\t\"fab-f7b3\" => \"fab fa-mendeley\",\n\t\t\t\"fab-f91a\" => \"fab fa-microblog\",\n\t\t\t\"fab-f3ca\" => \"fab fa-microsoft\",\n\t\t\t\"fab-f3cb\" => \"fab fa-mix\",\n\t\t\t\"fab-f289\" => \"fab fa-mixcloud\",\n\t\t\t\"fab-f956\" => \"fab fa-mixer\",\n\t\t\t\"fab-f3cc\" => \"fab fa-mizuni\",\n\t\t\t\"fab-f285\" => \"fab fa-modx\",\n\t\t\t\"fab-f3d0\" => \"fab fa-monero\",\n\t\t\t\"fab-f3d2\" => \"fab fa-napster\",\n\t\t\t\"fab-f612\" => \"fab fa-neos\",\n\t\t\t\"fab-f5a8\" => \"fab fa-nimblr\",\n\t\t\t\"fab-f419\" => \"fab fa-node\",\n\t\t\t\"fab-f3d3\" => \"fab fa-node-js\",\n\t\t\t\"fab-f3d4\" => \"fab fa-npm\",\n\t\t\t\"fab-f3d5\" => \"fab fa-ns8\",\n\t\t\t\"fab-f3d6\" => \"fab fa-nutritionix\",\n\t\t\t\"fab-f263\" => \"fab fa-odnoklassniki\",\n\t\t\t\"fab-f264\" => \"fab fa-odnoklassniki-square\",\n\t\t\t\"fab-f510\" => \"fab fa-old-republic\",\n\t\t\t\"fab-f23d\" => \"fab fa-opencart\",\n\t\t\t\"fab-f19b\" => \"fab fa-openid\",\n\t\t\t\"fab-f26a\" => \"fab fa-opera\",\n\t\t\t\"fab-f23c\" => \"fab fa-optin-monster\",\n\t\t\t\"fab-f8d2\" => \"fab fa-orcid\",\n\t\t\t\"fab-f41a\" => \"fab fa-osi\",\n\t\t\t\"fab-f3d7\" => \"fab fa-page4\",\n\t\t\t\"fab-f18c\" => \"fab fa-pagelines\",\n\t\t\t\"fab-f3d8\" => \"fab fa-palfed\",\n\t\t\t\"fab-f3d9\" => \"fab fa-patreon\",\n\t\t\t\"fab-f1ed\" => \"fab fa-paypal\",\n\t\t\t\"fab-f704\" => \"fab fa-penny-arcade\",\n\t\t\t\"fab-f3da\" => \"fab fa-periscope\",\n\t\t\t\"fab-f3db\" => \"fab fa-phabricator\",\n\t\t\t\"fab-f3dc\" => \"fab fa-phoenix-framework\",\n\t\t\t\"fab-f511\" => \"fab fa-phoenix-squadron\",\n\t\t\t\"fab-f457\" => \"fab fa-php\",\n\t\t\t\"fab-f2ae\" => \"fab fa-pied-piper\",\n\t\t\t\"fab-f1a8\" => \"fab fa-pied-piper-alt\",\n\t\t\t\"fab-f4e5\" => \"fab fa-pied-piper-hat\",\n\t\t\t\"fab-f1a7\" => \"fab fa-pied-piper-pp\",\n\t\t\t\"fab-f91e\" => \"fab fa-pied-piper-square\",\n\t\t\t\"fab-f0d2\" => \"fab fa-pinterest\",\n\t\t\t\"fab-f231\" => \"fab fa-pinterest-p\",\n\t\t\t\"fab-f0d3\" => \"fab fa-pinterest-square\",\n\t\t\t\"fab-f3df\" => \"fab fa-playstation\",\n\t\t\t\"fab-f288\" => \"fab fa-product-hunt\",\n\t\t\t\"fab-f3e1\" => \"fab fa-pushed\",\n\t\t\t\"fab-f3e2\" => \"fab fa-python\",\n\t\t\t\"fab-f1d6\" => \"fab fa-qq\",\n\t\t\t\"fab-f459\" => \"fab fa-quinscape\",\n\t\t\t\"fab-f2c4\" => \"fab fa-quora\",\n\t\t\t\"fab-f4f7\" => \"fab fa-r-project\",\n\t\t\t\"fab-f7bb\" => \"fab fa-raspberry-pi\",\n\t\t\t\"fab-f2d9\" => \"fab fa-ravelry\",\n\t\t\t\"fab-f41b\" => \"fab fa-react\",\n\t\t\t\"fab-f75d\" => \"fab fa-reacteurope\",\n\t\t\t\"fab-f4d5\" => \"fab fa-readme\",\n\t\t\t\"fab-f1d0\" => \"fab fa-rebel\",\n\t\t\t\"fab-f3e3\" => \"fab fa-red-river\",\n\t\t\t\"fab-f1a1\" => \"fab fa-reddit\",\n\t\t\t\"fab-f281\" => \"fab fa-reddit-alien\",\n\t\t\t\"fab-f1a2\" => \"fab fa-reddit-square\",\n\t\t\t\"fab-f7bc\" => \"fab fa-redhat\",\n\t\t\t\"fab-f18b\" => \"fab fa-renren\",\n\t\t\t\"fab-f3e6\" => \"fab fa-replyd\",\n\t\t\t\"fab-f4f8\" => \"fab fa-researchgate\",\n\t\t\t\"fab-f3e7\" => \"fab fa-resolving\",\n\t\t\t\"fab-f5b2\" => \"fab fa-rev\",\n\t\t\t\"fab-f3e8\" => \"fab fa-rocketchat\",\n\t\t\t\"fab-f3e9\" => \"fab fa-rockrms\",\n\t\t\t\"fab-f267\" => \"fab fa-safari\",\n\t\t\t\"fab-f83b\" => \"fab fa-salesforce\",\n\t\t\t\"fab-f41e\" => \"fab fa-sass\",\n\t\t\t\"fab-f3ea\" => \"fab fa-schlix\",\n\t\t\t\"fab-f28a\" => \"fab fa-scribd\",\n\t\t\t\"fab-f3eb\" => \"fab fa-searchengin\",\n\t\t\t\"fab-f2da\" => \"fab fa-sellcast\",\n\t\t\t\"fab-f213\" => \"fab fa-sellsy\",\n\t\t\t\"fab-f3ec\" => \"fab fa-servicestack\",\n\t\t\t\"fab-f214\" => \"fab fa-shirtsinbulk\",\n\t\t\t\"fab-f957\" => \"fab fa-shopify\",\n\t\t\t\"fab-f5b5\" => \"fab fa-shopware\",\n\t\t\t\"fab-f215\" => \"fab fa-simplybuilt\",\n\t\t\t\"fab-f3ee\" => \"fab fa-sistrix\",\n\t\t\t\"fab-f512\" => \"fab fa-sith\",\n\t\t\t\"fab-f7c6\" => \"fab fa-sketch\",\n\t\t\t\"fab-f216\" => \"fab fa-skyatlas\",\n\t\t\t\"fab-f17e\" => \"fab fa-skype\",\n\t\t\t\"fab-f198\" => \"fab fa-slack\",\n\t\t\t\"fab-f3ef\" => \"fab fa-slack-hash\",\n\t\t\t\"fab-f1e7\" => \"fab fa-slideshare\",\n\t\t\t\"fab-f2ab\" => \"fab fa-snapchat\",\n\t\t\t\"fab-f2ac\" => \"fab fa-snapchat-ghost\",\n\t\t\t\"fab-f2ad\" => \"fab fa-snapchat-square\",\n\t\t\t\"fab-f1be\" => \"fab fa-soundcloud\",\n\t\t\t\"fab-f7d3\" => \"fab fa-sourcetree\",\n\t\t\t\"fab-f3f3\" => \"fab fa-speakap\",\n\t\t\t\"fab-f83c\" => \"fab fa-speaker-deck\",\n\t\t\t\"fab-f1bc\" => \"fab fa-spotify\",\n\t\t\t\"fab-f5be\" => \"fab fa-squarespace\",\n\t\t\t\"fab-f18d\" => \"fab fa-stack-exchange\",\n\t\t\t\"fab-f16c\" => \"fab fa-stack-overflow\",\n\t\t\t\"fab-f842\" => \"fab fa-stackpath\",\n\t\t\t\"fab-f3f5\" => \"fab fa-staylinked\",\n\t\t\t\"fab-f1b6\" => \"fab fa-steam\",\n\t\t\t\"fab-f1b7\" => \"fab fa-steam-square\",\n\t\t\t\"fab-f3f6\" => \"fab fa-steam-symbol\",\n\t\t\t\"fab-f3f7\" => \"fab fa-sticker-mule\",\n\t\t\t\"fab-f428\" => \"fab fa-strava\",\n\t\t\t\"fab-f429\" => \"fab fa-stripe\",\n\t\t\t\"fab-f42a\" => \"fab fa-stripe-s\",\n\t\t\t\"fab-f3f8\" => \"fab fa-studiovinari\",\n\t\t\t\"fab-f1a4\" => \"fab fa-stumbleupon\",\n\t\t\t\"fab-f1a3\" => \"fab fa-stumbleupon-circle\",\n\t\t\t\"fab-f2dd\" => \"fab fa-superpowers\",\n\t\t\t\"fab-f3f9\" => \"fab fa-supple\",\n\t\t\t\"fab-f7d6\" => \"fab fa-suse\",\n\t\t\t\"fab-f8e1\" => \"fab fa-swift\",\n\t\t\t\"fab-f83d\" => \"fab fa-symfony\",\n\t\t\t\"fab-f4f9\" => \"fab fa-teamspeak\",\n\t\t\t\"fab-f2c6\" => \"fab fa-telegram\",\n\t\t\t\"fab-f3fe\" => \"fab fa-telegram-plane\",\n\t\t\t\"fab-f1d5\" => \"fab fa-tencent-weibo\",\n\t\t\t\"fab-f69d\" => \"fab fa-the-red-yeti\",\n\t\t\t\"fab-f5c6\" => \"fab fa-themeco\",\n\t\t\t\"fab-f2b2\" => \"fab fa-themeisle\",\n\t\t\t\"fab-f731\" => \"fab fa-think-peaks\",\n\t\t\t\"fab-f513\" => \"fab fa-trade-federation\",\n\t\t\t\"fab-f181\" => \"fab fa-trello\",\n\t\t\t\"fab-f262\" => \"fab fa-tripadvisor\",\n\t\t\t\"fab-f173\" => \"fab fa-tumblr\",\n\t\t\t\"fab-f174\" => \"fab fa-tumblr-square\",\n\t\t\t\"fab-f1e8\" => \"fab fa-twitch\",\n\t\t\t\"fab-f099\" => \"fab fa-twitter\",\n\t\t\t\"fab-f081\" => \"fab fa-twitter-square\",\n\t\t\t\"fab-f42b\" => \"fab fa-typo3\",\n\t\t\t\"fab-f402\" => \"fab fa-uber\",\n\t\t\t\"fab-f7df\" => \"fab fa-ubuntu\",\n\t\t\t\"fab-f403\" => \"fab fa-uikit\",\n\t\t\t\"fab-f8e8\" => \"fab fa-umbraco\",\n\t\t\t\"fab-f404\" => \"fab fa-uniregistry\",\n\t\t\t\"fab-f949\" => \"fab fa-unity\",\n\t\t\t\"fab-f405\" => \"fab fa-untappd\",\n\t\t\t\"fab-f7e0\" => \"fab fa-ups\",\n\t\t\t\"fab-f287\" => \"fab fa-usb\",\n\t\t\t\"fab-f7e1\" => \"fab fa-usps\",\n\t\t\t\"fab-f407\" => \"fab fa-ussunnah\",\n\t\t\t\"fab-f408\" => \"fab fa-vaadin\",\n\t\t\t\"fab-f237\" => \"fab fa-viacoin\",\n\t\t\t\"fab-f2a9\" => \"fab fa-viadeo\",\n\t\t\t\"fab-f2aa\" => \"fab fa-viadeo-square\",\n\t\t\t\"fab-f409\" => \"fab fa-viber\",\n\t\t\t\"fab-f40a\" => \"fab fa-vimeo\",\n\t\t\t\"fab-f194\" => \"fab fa-vimeo-square\",\n\t\t\t\"fab-f27d\" => \"fab fa-vimeo-v\",\n\t\t\t\"fab-f1ca\" => \"fab fa-vine\",\n\t\t\t\"fab-f189\" => \"fab fa-vk\",\n\t\t\t\"fab-f40b\" => \"fab fa-vnv\",\n\t\t\t\"fab-f41f\" => \"fab fa-vuejs\",\n\t\t\t\"fab-f83f\" => \"fab fa-waze\",\n\t\t\t\"fab-f5cc\" => \"fab fa-weebly\",\n\t\t\t\"fab-f18a\" => \"fab fa-weibo\",\n\t\t\t\"fab-f1d7\" => \"fab fa-weixin\",\n\t\t\t\"fab-f232\" => \"fab fa-whatsapp\",\n\t\t\t\"fab-f40c\" => \"fab fa-whatsapp-square\",\n\t\t\t\"fab-f40d\" => \"fab fa-whmcs\",\n\t\t\t\"fab-f266\" => \"fab fa-wikipedia-w\",\n\t\t\t\"fab-f17a\" => \"fab fa-windows\",\n\t\t\t\"fab-f5cf\" => \"fab fa-wix\",\n\t\t\t\"fab-f730\" => \"fab fa-wizards-of-the-coast\",\n\t\t\t\"fab-f514\" => \"fab fa-wolf-pack-battalion\",\n\t\t\t\"fab-f19a\" => \"fab fa-wordpress\",\n\t\t\t\"fab-f411\" => \"fab fa-wordpress-simple\",\n\t\t\t\"fab-f297\" => \"fab fa-wpbeginner\",\n\t\t\t\"fab-f2de\" => \"fab fa-wpexplorer\",\n\t\t\t\"fab-f298\" => \"fab fa-wpforms\",\n\t\t\t\"fab-f3e4\" => \"fab fa-wpressr\",\n\t\t\t\"fab-f412\" => \"fab fa-xbox\",\n\t\t\t\"fab-f168\" => \"fab fa-xing\",\n\t\t\t\"fab-f169\" => \"fab fa-xing-square\",\n\t\t\t\"fab-f23b\" => \"fab fa-y-combinator\",\n\t\t\t\"fab-f19e\" => \"fab fa-yahoo\",\n\t\t\t\"fab-f840\" => \"fab fa-yammer\",\n\t\t\t\"fab-f413\" => \"fab fa-yandex\",\n\t\t\t\"fab-f414\" => \"fab fa-yandex-international\",\n\t\t\t\"fab-f7e3\" => \"fab fa-yarn\",\n\t\t\t\"fab-f1e9\" => \"fab fa-yelp\",\n\t\t\t\"fab-f2b1\" => \"fab fa-yoast\",\n\t\t\t\"fab-f167\" => \"fab fa-youtube\",\n\t\t\t\"fab-f431\" => \"fab fa-youtube-square\",\n\t\t\t\"fab-f63f\" => \"fab fa-zhihu\"\n\t\t);\n\n\t\t$icons = array_merge( $solid_icons, $regular_icons, $brand_icons );\n\n\t\t$icons = apply_filters( \"megamenu_fontawesome_5_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "public function updateHomeIcon()\n {\n if(! array_key_exists( 'home_icon', $this->options['paths'] )) {\n return;\n }\n $target = base_path($this->options['paths']['home_icon']);\n $hook = '<!-- bread_home_icon -->';\n $file = base_path($this->options['paths']['stubs']) . '/views/components/home_icon.blade.php';\n $this->updateFileContent($target, $hook, $file);\n\n //If no home path defined return\n if(! array_key_exists( 'home_icon_css', $this->options['paths'] )) {\n return;\n }\n $target = base_path($this->options['paths']['home_icon_css']);\n $hook = '/* bread_home_icon_css */';\n $file = base_path($this->options['paths']['stubs']) . '/views/components/home_icon_css.blade.php';\n $this->updateFileContent($target, $hook, $file);\n }", "function bethel_add_favicons() {\n\techo \"<link rel=\\\"shortcut icon\\\" href=\\\"\".get_stylesheet_directory_uri().\"/images/favicons/favicon.ico\\\">\\r\\n\";\n\techo \"<link rel=\\\"icon\\\" sizes=\\\"16x16 32x32 64x64\\\" href=\\\"\".get_stylesheet_directory_uri().\"/images/favicons/favicon.ico\\\">\\r\\n\";\n\t$sizes = array(196, 160, 96, 64, 32, 16);\n\tforeach ($sizes as $size) {\n\t\techo \"<link rel=\\\"icon\\\" type=\\\"image/png\\\" sizes=\\\"{$size}x{$size}\\\" href=\\\"\".get_stylesheet_directory_uri().\"/images/favicons/favicon-{$size}.png\\\">\\r\\n\";\n\t}\n\t//iOS images can't have alpha transparency\n\t$sizes = array (152,144,120,114,76,72);\n\tforeach ($sizes as $size) {\n\t\techo \"<link rel=\\\"apple-touch-icon\\\" sizes=\\\"{$size}x{$size}\\\" href=\\\"\".get_stylesheet_directory_uri().\"/images/favicons/favicon-{$size}.png\\\">\\r\\n\";\n\t}\n\techo \"<link rel=\\\"apple-touch-icon\\\" href=\\\"\".get_stylesheet_directory_uri().\"/images/favicons/favicon-57.png\\\">\\r\\n\";\n\techo \"<meta name=\\\"msapplication-TileColor\\\" content=\\\"#FFFFFF\\\">\\r\\n\";\n\techo \"<meta name=\\\"msapplication-TileImage\\\" content=\\\"\".get_stylesheet_directory_uri().\"/images/favicons/favicon-144.png\\\">\\r\\n\";\n\techo \"<meta name=\\\"msapplication-config\\\" content=\\\"\".get_stylesheet_directory_uri().\"/images/favicons/browserconfig.xml\\\">\\r\\n\";\n}", "public function setFavicon(string $href, array $attributes = []);", "function rss2_site_icon()\n {\n }", "function brthemeoptions_backofficeCallback_iconset() {\n\t$options = get_option('brthemeoptions', themeoptionsGet_default());\n\t$sets = array(\n\t\tarray('id'=>'disabled','label'=>'Désactivé'),\n\t\tarray('id'=>'myicon','label'=>'Manuel (.myicon)'),\n\t\tarray('id'=>'glyphicon','label'=>'Glyphicon','url'=>'<a href=\"http://getbootstrap.com/components/#glyphicons\" target=\"_blank\">afficher</a>'),\n\t\tarray('id'=>'font-awesome','label'=>'Font-Awesome','url'=>'<a href=\"http://fortawesome.github.io/Font-Awesome/icons/\" target=\"_blank\">afficher</a>'),\n\t\tarray('id'=>'elusive','label'=>'Elusive','url'=>'<a href=\"http://shoestrap.org/downloads/elusive-icons-webfont/\" target=\"_blank\">afficher</a>')\n\t\t);\n\n\tforeach ($sets as $S) {\n\t\techo '<input '.checked( $options['iconset'], $S['id'] , false).' name=\"brthemeoptions[iconset]\" type=\"radio\" value=\"'.$S['id'].'\" id=\"brthemeoptions[iconset]\" /> '.$S['label'];\n\t\techo (isset($S['url']) ? ' '.$S['url'] : false);\n\t\techo '<br>';\n\t}\n}", "static private function register_custom_sets() {\n\t\t// Get uploaded sets.\n\t\t$enabled_icons = FLBuilderModel::get_enabled_icons();\n\t\t$upload_info = FLBuilderModel::get_cache_dir( 'icons' );\n\t\t$folders\t = glob( $upload_info['path'] . '*' );\n\n\t\t// Make sure we have an array.\n\t\tif ( ! is_array( $folders ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Loop through uploaded sets.\n\t\tforeach ( $folders as $folder ) {\n\n\t\t\t// Make sure we have a directory.\n\t\t\tif ( ! fl_builder_filesystem()->is_dir( $folder ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$folder = trailingslashit( $folder );\n\n\t\t\t// This is an Icomoon font.\n\t\t\tif ( fl_builder_filesystem()->file_exists( $folder . 'selection.json' ) ) {\n\n\t\t\t\t$data = json_decode( fl_builder_filesystem()->file_get_contents( $folder . 'selection.json' ) );\n\t\t\t\t$key = basename( $folder );\n\t\t\t\t$url = str_ireplace( $upload_info['path'], $upload_info['url'], $folder );\n\n\t\t\t\tif ( isset( $data->icons ) ) {\n\n\t\t\t\t\tif ( is_admin() || in_array( $key, $enabled_icons ) ) {\n\n\t\t\t\t\t\tself::$sets[ $key ] = array(\n\t\t\t\t\t\t\t'name'\t\t => $data->metadata->name,\n\t\t\t\t\t\t\t'prefix'\t => '',\n\t\t\t\t\t\t\t'type'\t\t => 'icomoon',\n\t\t\t\t\t\t\t'path'\t\t => $folder,\n\t\t\t\t\t\t\t'url'\t\t => $url,\n\t\t\t\t\t\t\t'stylesheet' => $url . 'style.css',\n\t\t\t\t\t\t\t'icons'\t\t => array(),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ( $data->icons as $icon ) {\n\n\t\t\t\t\t\t\t$prefs\t = $data->preferences->fontPref;\n\t\t\t\t\t\t\t$postfix = isset( $prefs->postfix ) ? $prefs->postfix : '';\n\n\t\t\t\t\t\t\tif ( isset( $prefs->selector ) && 'class' == $prefs->selector ) {\n\t\t\t\t\t\t\t\t// @codingStandardsIgnoreLine\n\t\t\t\t\t\t\t\t$selector = trim( str_replace( '.', ' ', $prefs->classSelector ) ) . ' ';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$selector = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tself::$sets[ $key ]['icons'][] = $selector . $prefs->prefix . $icon->properties->name . $postfix;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif ( fl_builder_filesystem()->file_exists( $folder . 'config.json' ) ) {\n\n\t\t\t\t$data = json_decode( fl_builder_filesystem()->file_get_contents( $folder . 'config.json' ) );\n\t\t\t\t$key = basename( $folder );\n\t\t\t\t$name = empty( $data->name ) ? 'Fontello' : $data->name;\n\t\t\t\t$url = str_ireplace( $upload_info['path'], $upload_info['url'], $folder );\n\t\t\t\t$style = empty( $data->name ) ? 'fontello' : $data->name;\n\n\t\t\t\t// Append the date to the name?\n\t\t\t\tif ( empty( $data->name ) ) {\n\t\t\t\t\t$time\t\t\t= str_replace( 'icon-', '', $key );\n\t\t\t\t\t$date_format\t= get_option( 'date_format' );\n\t\t\t\t\t$time_format\t= get_option( 'time_format' );\n\t\t\t\t\t$date\t\t\t= date( $date_format . ' ' . $time_format );\n\t\t\t\t\t$name\t\t .= ' (' . $date . ')';\n\t\t\t\t}\n\n\t\t\t\tif ( isset( $data->glyphs ) ) {\n\n\t\t\t\t\tif ( is_admin() || in_array( $key, $enabled_icons ) ) {\n\n\t\t\t\t\t\tself::$sets[ $key ] = array(\n\t\t\t\t\t\t\t'name'\t\t => $name,\n\t\t\t\t\t\t\t'prefix'\t => '',\n\t\t\t\t\t\t\t'type'\t\t => 'fontello',\n\t\t\t\t\t\t\t'path'\t\t => $folder,\n\t\t\t\t\t\t\t'url'\t\t => $url,\n\t\t\t\t\t\t\t'stylesheet' => $url . 'css/' . $style . '.css',\n\t\t\t\t\t\t\t'icons'\t\t => array(),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ( $data->glyphs as $icon ) {\n\t\t\t\t\t\t\tif ( $data->css_use_suffix ) {\n\t\t\t\t\t\t\t\tself::$sets[ $key ]['icons'][] = $icon->css . $data->css_prefix_text;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tself::$sets[ $key ]['icons'][] = $data->css_prefix_text . $icon->css;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function studeon_vc_iconpicker_type_fontawesome($icons) {\n\t\t$list = studeon_get_list_icons();\n\t\tif (!is_array($list) || count($list) == 0) return $icons;\n\t\t$rez = array();\n\t\tforeach ($list as $icon)\n\t\t\t$rez[] = array($icon => str_replace('icon-', '', $icon));\n\t\treturn array_merge( $icons, array(esc_html__('Theme Icons', 'studeon') => $rez) );\n\t}", "function pxlz_edgtf_register_social_icon_widget($widgets) {\n $widgets[] = 'PxlzEdgefSocialIconWidget';\n\n return $widgets;\n }", "public function run()\n {\n SocialIcon::truncate();\n\n SocialIcon::create([\n 'name' => 'Instagram',\n 'url' => 'https://instagram.com/',\n 'icon' => '<span><i class=\"fab fa-instagram fa-1x\" style=\"font-size: 1.5em; color: rgb(79, 91, 100); margin-right: 15px;\"></i></span>',\n 'icon_name' => 'default_icon_theme'\n ]);\n\n SocialIcon::create([\n 'name' => 'Twitter',\n 'url' => 'https://twitter.com/',\n 'icon' => '<span><i style=\"font-size: 1.5em; color: rgb(79, 91, 100); margin-right: 15px;\" class=\"fab fa-twitter fa-1x\"></i></span>',\n 'icon_name' => 'default_icon_theme'\n ]);\n\n SocialIcon::create([\n 'name' => 'Facebook',\n 'url' => 'https://facebook.com/',\n 'icon' => '<span><i class=\"fab fa-facebook-f fa-1x\" style=\"font-size: 1.5em; color: rgb(79, 91, 100); margin-right: 15px;\"></i></span>',\n 'icon_name' => 'default_icon_theme'\n ]);\n\n\n SocialIcon::create([\n 'name' => 'Youtube',\n 'url' => 'https://youtube.com/',\n 'icon' => '<span><i class=\"fab fa-youtube fa-1x\" style=\"font-size: 1.5em; color: rgb(79, 91, 100); margin-right: 15px;\"></i></span>',\n 'icon_name' => 'default_icon_theme'\n ]);\n\n SocialIcon::create([\n 'name' => 'Whatsapp',\n 'url' => 'https://wa.me/',\n 'icon' => '<span><i style=\"font-size: 1.5em; color: rgb(79, 91, 100); margin-right: 15px;\" class=\"fab fa-whatsapp\"></i></span>',\n 'icon_name' => 'default_icon_theme'\n ]);\n\n }", "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfUsingUnderscoredExtensionNameAndIconPathNotGiven() {}", "function geopost_icon_dir() {\r\n return plugins_url('/icons', __FILE__);\r\n}", "public function setIconName($iconName) {}", "public function setIconName($iconName) {}", "public function setIconName($iconName) {}", "private function get_svg_files_path() {\n\t\t$custom_svg_path_icons = apply_filters( 'acf_svg_icon_filepath', array() );\n\n\t\treturn array_map( function ( $val ) {\n\t\t\treturn [\n\t\t\t\t'type' => 'custom',\n\t\t\t\t'file' => $val,\n\t\t\t];\n\t\t}, (array) $custom_svg_path_icons );\n\t}", "protected static function collectIcons() {\n\t\t$settings = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_jstassets.']['settings.'];\n\t\t$paths = array_merge(static::$iconPaths, array_values($settings['icons.'] ?: []));\n\t\t\n\t\t$collection = [];\n\t\tforeach ($paths as $path) {\n\t\t\t$absPath = GeneralUtility::getFileAbsFileName($path);\n\t\t\tforeach (GeneralUtility::getFilesInDir($absPath, 'svg', true) as $iconFile) {\n\t\t\t\t$iconName = strtolower(pathinfo($iconFile, PATHINFO_FILENAME));\n\t\t\t\t$collection[$iconName] = $iconFile;\n\t\t\t}\n\t\t}\n\t\treturn $collection;\n\t}", "function wpsight_options_social() {\n\t\n\t\tif( ! current_theme_supports( 'options-social' ) )\n\t\t\treturn;\n\t\t\n\t\t/** Create options array */\n\t\t\t\n\t\t$options_social = array();\n\t\t\t\n\t\t$options_social['heading_social'] = array(\n\t\t\t'name' => __( 'Social', 'wpsight' ),\n\t\t\t'id' => 'heading_social',\n\t\t\t'type' => 'heading'\n\t\t);\n\t\t\n\t\t/** Loop through social icons for info */\n\t\t\n\t\t$social_icons = array();\n\t\tforeach( wpsight_social_icons() as $k => $v ) {\n\t\t\t$social_icons[$k] = '<img src=\"' . $v['icon'] . '\" alt=\"\" />';\n\t\t}\n\t\t\n\t\t$social_icons = implode( '&nbsp;&nbsp;', $social_icons );\n\t\t\n\t\t$options_social['icon_info'] = array( \n\t\t 'name' => __( 'Available Icons', 'wpsight' ),\n\t\t 'desc' => $social_icons,\n\t\t 'type' => 'info'\n\t\t);\n\t\t\n\t\t/** Loop through social icons for icons and links */\n\t\t\n\t\t$social_icons = array();\n\t\tforeach( wpsight_social_icons() as $k => $v ) {\n\t\t\t$social_icons[$k] = $v['name'];\n\t\t}\n\t\t\n\t\tarray_unshift( $social_icons, '' );\n\t\t\n\t\t$nr = apply_filters( 'wpsight_social_icons_nr', 5 );\n\t\t\n\t\tfor( $i = 1; $i <= $nr; $i++ ) {\n\t\t\n\t\t\t$std_icon = '';\n\t\t\t$std_link = '';\n\t\t\n\t\t\t/** Set first default to RSS */\t\n\t\t\t\n\t\t\tif( $i == 1 ) {\n\t\t\t\t$std_icon = 'rss';\n\t\t\t\t$std_link = get_bloginfo_rss( 'rss2_url' );\n\t\t\t}\n\t\t\n\t\t\t$options_social['icon_' . $i] = array( \n\t\t\t\t'name' \t => __( 'Social', 'wpsight' ) . ' #' . $i . ' ' . __( 'Icon', 'wpsight' ),\n\t\t\t\t'desc' \t => __( 'Please select an icon.', 'wpsight' ),\n\t\t\t\t'std' \t => $std_icon,\n\t\t\t\t'id' \t => 'icon_' . $i,\n\t\t\t\t'type' \t => 'select',\n\t\t\t\t'options' => $social_icons\n\t\t\t);\n\t\t\t\n\t\t\t$options_social['icon_' . $i . '_link'] = array( \n\t\t\t\t'name' => __( 'Social', 'wpsight' ) . ' #' . $i . ' ' . __( 'Link', 'wpsight' ),\n\t\t\t\t'desc' => __( 'Please enter the URL to your social account.', 'wpsight' ),\n\t\t\t\t'std' => $std_link,\n\t\t\t\t'id' => 'icon_' . $i . '_link',\n\t\t\t\t'type' => 'text'\n\t\t\t);\t\n\t\t\n\t\t}\n\t\t\t\t\n\t\treturn apply_filters( 'wpsight_options_social', $options_social );\n\t\t\n\t}", "public function setPaths($paths)\n {\n $this->__paths = $paths;\n }", "function bwsocial_get_icons() {\n\t// Supported social links icons.\n\t$social_links_icons = array(\n\t\t'a.co' => 'amazon',\n\t\t'amazon.com' => 'amazon',\n\t\t'behance.net' => 'behance',\n\t\t'blogger.com' => 'blogger',\n\t\t'codepen.io' => 'codepen',\n\t\t'dribbble.com' => 'dribble',\n\t\t'dropbox.com' => 'dropbox',\n\t\t'eventbrite.com' => 'eventbrite',\n\t\t'facebook.com' => 'facebook',\n\t\t'flickr.com' => 'flickr',\n\t\t'foursquare.com' => 'foursquare',\n\t\t'ghost.org' => 'ghost',\n\t\t'github.com' => 'github',\n\t\t'github.io' => 'github',\n\t\t'plus.google.com' => 'google-plus',\n\t\t'instagram.com' => 'instagram',\n\t\t'linkedin.com' => 'linkedin',\n\t\t'medium.com' => 'medium',\n\t\t'path.com' => 'path',\n\t\t'pinterest.com' => 'pinterest-alt',\n\t\t'getpocket.com' => 'pocket',\n\t\t'polldaddy.com' => 'polldaddy',\n\t\t'reddit.com' => 'reddit',\n\t\t'skype.com' => 'skype',\n\t\t'spotify.com' => 'spotify',\n\t\t'squarespace.com' => 'squarespace',\n\t\t'stumbleupon.com' => 'stumbleupon',\n\t\t'telegram.org' => 'telegram',\n\t\t'tumblr.com' => 'tumblr-alt',\n\t\t'twitch.tv' => 'twitch',\n\t\t'twitter.com' => 'twitter-alt',\n\t\t'vimeo.com' => 'vimeo',\n\t\t'wordpress.org' => 'wordpress',\n\t\t'wordpress.com' => 'wordpress',\n\t\t'youtu.be' => 'youtube',\n\t\t'youtube.com' => 'youtube'\n\t);\n\n\t/**\n\t * Filter BW Social Icons.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @param array $social_links_icons\n\t */\n\treturn apply_filters( 'bigwing/bigwing_social/icons', $social_links_icons );\n}", "function wp_site_icon()\n {\n }", "function si_custom_elements_icon_map( $icon_map ) {\n\t\t$icon_map['si_custom_elements'] = EXTENSION_URL . '/assets/svg/icons.svg';\n\t\treturn $icon_map;\n\t}", "public function setButtonsIcons() {\n $defaultSettings = $this->getDefaultSettings();\n $this->settings['labels']['start'] = $defaultSettings['labels']['start'];\n $this->settings['labels']['previous'] = $defaultSettings['labels']['previous'];\n $this->settings['labels']['next'] = $defaultSettings['labels']['next'];\n $this->settings['labels']['end'] = $defaultSettings['labels']['end'];\n return $this;\n }", "private function init() {\n $options = $this->options;\n if ($options === false) $options = array();\n if (isset($options['defaultFolder'])) {\n $this->defaultIconsFolder = $options['defaultFolder'];\n }\n }", "function admin_setup() {\n\t\t//wp_enqueue_media();\n\t\twp_enqueue_style( 'dtbaker-social-icons', plugins_url('webicons.css', __FILE__) );\n\t\twp_enqueue_script( 'dtbaker-social-icons-admin', plugins_url('webicons-admin.js', __FILE__) );\n\t}", "function fusion_element_social_links() {\n\t$social_options = array(\n\t\t'name' => esc_attr__( 'Social Links', 'fusion-builder' ),\n\t\t'shortcode' => 'fusion_social_links',\n\t\t'icon' => 'fusiona-link',\n\t\t'params' => array(\n\t\t\tarray(\n\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t'heading' => esc_attr__( 'Boxed Social Icons', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Choose to get a boxed icons. Choose default for theme option selection.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'icons_boxed',\n\t\t\t\t'value' => array(\n\t\t\t\t\tesc_attr__( 'Default', 'fusion-builder' ) => '',\n\t\t\t\t\tesc_attr__( 'Yes', 'fusion-builder' ) => 'yes',\n\t\t\t\t\tesc_attr__( 'No', 'fusion-builder' ) => 'no',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Social Icon Box Radius', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Choose the radius of the boxed icons. In pixels (px), ex: 1px, or \"round\". ', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'icons_boxed_radius',\n\t\t\t\t'value' => '',\n\t\t\t\t'dependency' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'element' => 'icons_boxed',\n\t\t\t\t\t\t'value' => 'no',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t'heading' => esc_attr__( 'Social Icons Color Type', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Choose to get a boxed icons. Choose default for theme option selection.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'color_type',\n\t\t\t\t'value' => array(\n\t\t\t\t\tesc_attr__( 'Default', 'fusion-builder' ) => '',\n\t\t\t\t\tesc_attr__( 'Custom Colors', 'fusion-builder' ) => 'custom',\n\t\t\t\t\tesc_attr__( 'Brand Colors', 'fusion-builder' ) => 'brand',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'heading' => esc_attr__( 'Social Icon Custom Colors', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Specify the color of social icons. ', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'icon_colors',\n\t\t\t\t'value' => '',\n\t\t\t\t'dependency' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'element' => 'color_type',\n\t\t\t\t\t\t'value' => 'brand',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'heading' => esc_attr__( 'Social Icon Custom Box Colors', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Specify the box color of social icons. ', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'box_colors',\n\t\t\t\t'value' => '',\n\t\t\t\t'dependency' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'element' => 'icons_boxed',\n\t\t\t\t\t\t'value' => 'no',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'element' => 'color_type',\n\t\t\t\t\t\t'value' => 'brand',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t'heading' => esc_attr__( 'Social Icon Tooltip Position', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Choose the display position for tooltips. Choose default for theme option selection.' ),\n\t\t\t\t'param_name' => 'tooltip_placement',\n\t\t\t\t'value' => array(\n\t\t\t\t\tesc_attr__( 'Default', 'fusion-builder' ) => '',\n\t\t\t\t\tesc_attr__( 'Top', 'fusion-builder' ) => 'top',\n\t\t\t\t\tesc_attr__( 'Bottom', 'fusion-builder' ) => 'bottom',\n\t\t\t\t\tesc_attr__( 'Left', 'fusion-builder' ) => 'left',\n\t\t\t\t\tesc_attr__( 'Right', 'fusion-builder' ) => 'Right',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Blogger Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Blogger link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'blogger',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Deviantart Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Deviantart link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'deviantart',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Digg Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Digg link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'digg',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Dribbble Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Dribbble link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'dribbble',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Dropbox Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Dropbox link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'dropbox',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Facebook Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Facebook link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'facebook',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Flickr Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Flickr link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'flickr',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Forrst Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Forrst link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'forrst',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Google+ Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Google+ link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'googleplus',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Instagram Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Instagram link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'instagram',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'LinkedIn Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom LinkedIn link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'linkedin',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Myspace Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Myspace link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'myspace',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'PayPal Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom PayPal link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'paypal',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Pinterest Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Pinterest link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'pinterest',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Reddit Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Reddit link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'reddit',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'RSS Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom RSS link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'rss',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Skype Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Skype link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'skype',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'SoundCloud Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom SoundCloud link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'soundcloud',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Spotify Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Spotify link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'spotify',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Tumblr Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Tumblr link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'tumblr',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Twitter Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Twitter link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'twitter',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Vimeo Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Vimeo link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'vimeo',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'VK Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom VK link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'vk',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Xing Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Xing link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'xing',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Yahoo Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Yahoo link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'yahoo',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Yelp Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Yelp link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'yelp',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Youtube Link', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom Youtube link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'youtube',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => esc_attr__( 'Email Address', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Insert an email address to display the email icon.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'email',\n\t\t\t\t'value' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t'heading' => esc_attr__( 'Show Custom Social Icon', 'fusion-builder' ),\n\t\t\t\t'description' => esc_attr__( 'Show the custom social icon specified in Theme Options.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'show_custom',\n\t\t\t\t'value' => array(\n\t\t\t\t\tesc_attr__( 'Yes', 'fusion-builder' ) => 'yes',\n\t\t\t\t\tesc_attr__( 'No', 'fusion-builder' ) => 'no',\n\t\t\t\t),\n\t\t\t\t'default' => 'no',\n\t\t\t),\n\t\t),\n\t);\n\t$custom_social_networks = fusion_builder_get_custom_social_networks();\n\tif ( is_array( $custom_social_networks ) ) {\n\t\t$custom_networks = array();\n\t\tforeach ( $custom_social_networks as $key => $custom_network ) {\n\t\t\t$social_options['params'][] = array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'heading' => sprintf( esc_attr__( 'Custom %s Link', 'fusion-builder' ), $key + 1 ),\n\t\t\t\t'description' => esc_attr__( 'Insert your custom social link.', 'fusion-builder' ),\n\t\t\t\t'param_name' => 'custom_' . $key,\n\t\t\t\t'value' => '',\n\t\t\t\t'dependency' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'element' => 'show_custom',\n\t\t\t\t\t\t'value' => 'yes',\n\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}\n\t$social_options['params'][] = array(\n\t\t'type' => 'radio_button_set',\n\t\t'heading' => esc_attr__( 'Alignment', 'fusion-builder' ),\n\t\t'description' => esc_attr__( \"Select the icon's alignment.\", 'fusion-builder' ),\n\t\t'param_name' => 'alignment',\n\t\t'value' => array(\n\t\t\tesc_attr__( 'Text Flow', 'fusion-builder' ) => '',\n\t\t\tesc_attr__( 'Left', 'fusion-builder' ) => 'left',\n\t\t\tesc_attr__( 'Center', 'fusion-builder' ) => 'center',\n\t\t\tesc_attr__( 'Right', 'fusion-builder' ) => 'right',\n\t\t),\n\t\t'default' => '',\n\t);\n\t$social_options['params'][] = array(\n\t\t'type' => 'checkbox_button_set',\n\t\t'heading' => esc_attr__( 'Element Visibility', 'fusion-builder' ),\n\t\t'param_name' => 'hide_on_mobile',\n\t\t'value' => fusion_builder_visibility_options( 'full' ),\n\t\t'default' => fusion_builder_default_visibility( 'array' ),\n\t\t'description' => esc_attr__( 'Choose to show or hide the element on small, medium or large screens. You can choose more than one at a time.', 'fusion-builder' ),\n\t);\n\t$social_options['params'][] = array(\n\t\t'type' => 'textfield',\n\t\t'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ),\n\t\t'param_name' => 'class',\n\t\t'value' => '',\n\t\t'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ),\n\t);\n\t$social_options['params'][] = array(\n\t\t'type' => 'textfield',\n\t\t'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ),\n\t\t'param_name' => 'id',\n\t\t'value' => '',\n\t\t'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ),\n\t);\n\tfusion_builder_map( $social_options );\n}", "public function setIconMaps(array $map)\n {\n $this->iconMap = $map;\n return $this;\n }", "public function setAvatarUrl($value)\n {\n $this->avatar = end(explode('/', $value));\n }", "public function setGlobalPaths($paths);", "public function setIcon($value)\n {\n return $this->set(self::_ICON, $value);\n }", "private function initializeSocialMedia()\n {\n $this->ch->addSection($this->slug . '_social_media', 'Social Media', 130);\n foreach ($this->social as $media => $label) {\n $this->ch->addControl(\"social_{$media}\", $this->slug . '_social_media', $label);\n }\n }", "static public function enqueue_all_custom_icons_styles() {\n\t\t$sets = self::get_sets();\n\n\t\tforeach ( (array) $sets as $key => $data ) {\n\n\t\t\t// Don't enqueue core icons.\n\t\t\tif ( 'core' == $data['type'] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Enqueue the custom icon styles.\n\t\t\tself::enqueue_custom_styles_by_key( $key );\n\t\t}\n\t}", "public function getIconPathAttribute()\n {\n return !empty($this->attributes['icon']) ? config('ptuchik-core-utilities.images_folder').DIRECTORY_SEPARATOR.\n $this->getTable().DIRECTORY_SEPARATOR.$this->attributes['icon'] : null;\n }", "public function setPaths($paths) {\n $this->paths = $paths;\n }", "public function setPaths($paths) {\n $this->paths = $paths;\n }", "function icon_attr( $args ) {\n\n\t\t$attr = array(\n\t\t\t'class' => '',\n\t\t\t'style' => '',\n\t\t);\n\n\t\t$tooltip = ucfirst( $args['social_network'] );\n\t\tif ( 'custom_' === substr( $args['social_network'], 0, 7 ) ) {\n\t\t\t$attr['class'] .= 'custom ';\n\t\t\t$tooltip = str_replace( 'custom_', '', $args['social_network'] );\n\t\t\t$args['social_network'] = strtolower( $tooltip );\n\t\t}\n\n\t\t$attr['class'] .= 'fusion-social-network-icon fusion-tooltip fusion-' . $args['social_network'] . ' fusion-icon-' . $args['social_network'];\n\n\t\t$link = $args['social_link'];\n\n\t\t$attr['target'] = self::$args['linktarget'];\n\n\t\tif ( '_blank' == $attr['target'] ) {\n\t\t\t$attr['rel'] = 'noopener noreferrer';\n\t\t}\n\n\t\tif ( 'mail' === $args['social_network'] ) {\n\t\t\t$link = ( 'http' === substr( $args['social_link'], 0, 4 ) ) ? $args['social_link'] : 'mailto:' . antispambot( str_replace( 'mailto:', '', $args['social_link'] ) );\n\t\t\t$attr['target'] = '_self';\n\t\t}\n\n\t\t$attr['href'] = $link;\n\n\t\tif ( FusionBuilder::get_theme_option( 'nofollow_social_links' ) ) {\n\t\t\t$attr['rel'] = 'nofollow';\n\t\t}\n\n\t\tif ( $args['icon_color'] ) {\n\t\t\t$attr['style'] = 'color:' . $args['icon_color'] . ';';\n\t\t}\n\n\t\tif ( 'yes' == self::$args['icons_boxed'] && $args['box_color'] ) {\n\t\t\t$attr['style'] .= 'background-color:' . $args['box_color'] . ';border-color:' . $args['box_color'] . ';';\n\t\t}\n\n\t\tif ( 'yes' == self::$args['icons_boxed'] && self::$args['icons_boxed_radius'] || '0' === self::$args['icons_boxed_radius'] ) {\n\t\t\tif ( 'round' == self::$args['icons_boxed_radius'] ) {\n\t\t\t\tself::$args['icons_boxed_radius'] = '50%';\n\t\t\t}\n\t\t\t$attr['style'] .= 'border-radius:' . self::$args['icons_boxed_radius'] . ';';\n\t\t}\n\n\t\tif ( 'none' != strtolower( self::$args['tooltip_placement'] ) ) {\n\t\t\t$attr['data-placement'] = strtolower( self::$args['tooltip_placement'] );\n\t\t\tif ( 'Googleplus' == $tooltip ) {\n\t\t\t\t$tooltip = 'Google+';\n\t\t\t}\n\t\t\t$attr['data-title'] = $tooltip;\n\t\t\t$attr['data-toggle'] = 'tooltip';\n\t\t}\n\n\t\t$attr['title'] = $tooltip;\n\n\t\treturn $attr;\n\n\t}", "public function replace_icon() {\r\n\t\tglobal $wpdb;\r\n\t\t$db = Maps_Marker_Pro::get_instance('MMP\\DB');\r\n\r\n\t\tif (!isset($_POST['nonce']) || wp_verify_nonce($_POST['nonce'], 'mmp-tools-replace-icon') === false) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Security check failed', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\tif (!isset($_POST['source']) || !isset($_POST['target'])) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Source or target missing', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\t$source = ($_POST['source'] === plugins_url('images/leaflet/marker.png', __DIR__)) ? '' : basename($_POST['source']);\r\n\t\t$target = ($_POST['target'] === plugins_url('images/leaflet/marker.png', __DIR__)) ? '' : basename($_POST['target']);\r\n\r\n\t\t$wpdb->update(\r\n\t\t\t$db->markers,\r\n\t\t\tarray('icon' => $target),\r\n\t\t\tarray('icon' => $source),\r\n\t\t\tarray('%s'),\r\n\t\t\tarray('%s')\r\n\t\t);\r\n\r\n\t\twp_send_json(array(\r\n\t\t\t'success' => true,\r\n\t\t\t'message' => esc_html__('Icon replaced successfully', 'mmp')\r\n\t\t));\r\n\t}", "protected function register_style_team_member_icon() {\n\t\t$this->start_controls_section(\n\t\t\t'section_social_style',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Social Icons', 'uael' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icons_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Size', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 6,\n\t\t\t\t\t\t'max' => 50,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'font-size: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon svg' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_padding',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Padding', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'padding: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => 'em',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => 'em',\n\t\t\t\t),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'em' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 5,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$icon_spacing = is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};';\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_spacing',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Spacing', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:last-child)' => $icon_spacing,\n\t\t\t\t),\n\t\t\t\t'separator' => 'after',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'default',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Official Color', 'uael' ),\n\t\t\t\t\t'custom' => __( 'Custom', 'uael' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs(\n\t\t\t'icon_style_tabs'\n\t\t);\n\n\t\t$this->start_controls_tab(\n\t\t\t'icon_style_normal_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'uael' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_primary_color_normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover), {{WRAPPER}} .elementor-social-icon:not(:hover) svg' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_secondary_color_normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover) i' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover) svg' => 'fill: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'icon_style_hover_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'uael' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_primary_color_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover, {{WRAPPER}} .elementor-social-icon:hover svg' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_secondary_color_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover i' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover svg' => 'fill: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\n\t\t$this->add_control(\n\t\t\t'social_icon_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'uael' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'uael' ),\n\t\t\t\t\t'double' => __( 'Double', 'uael' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'uael' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'social_icon_border_size',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Width', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t'top' => '1',\n\t\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t\t'left' => '1',\n\t\t\t\t\t\t'right' => '1',\n\t\t\t\t\t\t'unit' => 'px',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; box-sizing:content-box;',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'social_icon_border_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_1,\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icon_border_hover_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Hover Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "protected function collectTcaSpriteIcons() {}", "public function setIcon($name, $instance) {\n // # See if component has an icon\n // return if not instance.getIcon or instance.getIcon()\n if (!$instance->getIcon() || $instance->getIcon()) {\n return;\n }\n\n // # See if library has an icon\n // [library, componentName] = name.split '/'\n list($library, $componentName) = explode('/', $name);\n // if componentName and @getLibraryIcon library\n if ($componentName && $this->getLibraryIcon($library)) {\n // instance.setIcon @getLibraryIcon library\n $instance->setIcon($this->getLibraryIcon($library));\n // return\n return;\n }\n\n // # See if instance is a subgraph\n // if instance.isSubgraph()\n if ($instance->isSubgraph()) {\n // instance.setIcon 'sitemap'\n $instance->setIcon('sitmap');\n // return\n return;\n }\n\n // instance.setIcon 'square'\n $instance->setIcon('square');\n // return\n return;\n }", "public static function iconsList()\n {\n $icons = [\n 'build',\n 'add_shopping_cart',\n 'settings_phone',\n 'assignment_turned_in',\n 'check_circle_outline',\n 'theaters',\n 'airplay',\n 'cached',\n 'calendar_today',\n 'check_circle',\n 'credit_card',\n 'dashboard',\n 'description',\n 'exit_to_app',\n 'extension',\n 'feedback',\n 'grade',\n 'group_work',\n 'help',\n 'help_outline',\n 'home',\n 'https',\n 'info',\n 'language',\n 'lock',\n 'open_in_browser',\n 'pageview',\n 'payment',\n 'perm_identity',\n 'record_voice_over',\n 'question_answer',\n 'redeem',\n 'restore_from_trash',\n 'shop',\n 'shopping_basket',\n 'shopping_cart',\n 'settings_voice',\n 'speaker_notes',\n 'stars',\n 'supervised_user_circle',\n 'system_update_alt',\n 'verified_user',\n 'add_alert',\n 'featured_play_list',\n 'queue',\n 'video_library',\n 'contact_mail',\n 'ring_volume',\n 'save',\n 'devices',\n 'widgets',\n 'insert_invitation',\n ];\n \n return $icons;\n }", "function honeycomb_social_icons() {\n\t\tif ( class_exists( 'Subscribe_And_Connect' ) ) {\n\t\t\techo '<div class=\"subscribe-and-connect-connect\">';\n\t\t\tsubscribe_and_connect_connect();\n\t\t\techo '</div>';\n\t\t}\n\t}", "public function setMenuIcon($urlIcon = NULL){\n\t\t$this->menuIcon = $urlIcon;\n\t}", "public function setPaths($paths)\n {\n $this->_paths = (array) $paths;\n }", "public function get_social_icon_list()\r\n {\r\n $social = get_option('cht_numb_slug'.$this->widget_number); // get saved social media list\r\n $social = explode(\",\", $social);\r\n\r\n $arr = array();\r\n foreach ($social as $key_soc):\r\n foreach ($this->socials as $key => $social) : // compare with Default Social media list\r\n if ($social['slug'] != $key_soc) {\r\n continue; // return if slug is not equal\r\n }\r\n $value = get_option('cht_social'.$this->widget_number.'_' . $social['slug']); // get saved settings for button\r\n if ($value) {\r\n $slug = strtolower($social['slug']);\r\n $channel_id = \"cht-channel-0\";\r\n $channel_id = trim($channel_id, \"_\");\r\n if (!empty($value['value']) || $slug == \"contact_us\") {\r\n $slug = strtolower($social['slug']);\r\n $url = \"\";\r\n $mobile_url = \"\";\r\n $desktop_target = \"\";\r\n $mobile_target = \"\";\r\n $qr_code_image = \"\";\r\n\r\n $channel_type = $slug;\r\n\r\n if(!isset($value['value'])) {\r\n $value['value'] = \"\";\r\n }\r\n\r\n $svg_icon = $social['svg'];\r\n if($slug == \"link\" || $slug == \"custom_link\" || $slug == \"custom_link_3\" || $slug == \"custom_link_4\" || $slug == \"custom_link_5\") {\r\n if(isset($value['channel_type']) && !empty($value['channel_type'])) {\r\n $channel_type = $value['channel_type'];\r\n\r\n foreach($this->socials as $icon) {\r\n if($icon['slug'] == $channel_type) {\r\n $svg_icon = $icon['svg'];\r\n }\r\n }\r\n }\r\n }\r\n\r\n $channel_type = strtolower($channel_type);\r\n\r\n if($channel_type == \"viber\") {\r\n /* Viber change to exclude + from number for desktop */\r\n $val = $value['value'];\r\n if(is_numeric($val)) {\r\n $fc = substr($val, 0, 1);\r\n if($fc == \"+\") {\r\n $length = -1*(strlen($val)-1);\r\n $val = substr($val, $length);\r\n }\r\n if(!wp_is_mobile()) {\r\n /* Viber change to include + from number for mobile */\r\n $val = \"+\".$val;\r\n }\r\n }\r\n } else if($channel_type == \"whatsapp\") {\r\n /* Whatspp change to exclude + from phone number */\r\n $val = $value['value'];\r\n $val = str_replace(\"+\",\"\", $val);\r\n $val = str_replace(\"-\",\"\", $val);\r\n $val = str_replace(\" \",\"\", $val);\r\n } else if($channel_type == \"facebook_messenger\") {\r\n /* Facebook change to change URL from facebook.com to m.me version 2.1.0 change */\r\n $val = $value['value'];\r\n $val = str_replace(\"facebook.com\",\"m.me\", $val); // Replace facebook.com with m.me version 2.0.1 change\r\n $val = str_replace(\"www.\",\"\", $val); // Replace www. with blank version 2.0.1 change\r\n $value['value'] = $val;\r\n\r\n $val = trim($val, \"/\");\r\n $val_array = explode(\"/\", $val);\r\n $total = count($val_array)-1;\r\n $last_value = $val_array[$total];\r\n $last_value = explode(\"-\", $last_value);\r\n $total_text = count($last_value)-1;\r\n $total_text = $last_value[$total_text];\r\n\r\n if(is_numeric($total_text)) {\r\n $val_array[$total] = $total_text;\r\n $val = implode(\"/\", $val_array);\r\n }\r\n } else {\r\n $val = $value['value'];\r\n }\r\n if(!isset($value['title'])) {\r\n $value['title'] = $social['title']; // Initialize title with default title if not exists. version 2.1.0 change\r\n }\r\n $image_url = \"\";\r\n\r\n /* get custom image URL if uploaded. version 2.1.0 change */\r\n if(isset($value['image_id']) && !empty($value['image_id'])) {\r\n $image_id = $value['image_id'];\r\n if(!empty($image_id)) {\r\n $image_data = wp_get_attachment_image_src($image_id, \"full\");\r\n if(!empty($image_data) && is_array($image_data)) {\r\n $image_url = $image_data[0];\r\n }\r\n }\r\n }\r\n\r\n $on_click_fn = \"\";\r\n $popup_html = \"\";\r\n $has_custom_popup = 0;\r\n $is_default_open = 0;\r\n /* get custom icon background color if exists. version 2.1.0 change */\r\n if(!isset($value['bg_color']) || empty($value['bg_color'])) {\r\n $value['bg_color'] = '';\r\n }\r\n if($channel_type == \"whatsapp\") {\r\n /* setting for Whatsapp URL */\r\n $val = str_replace(\"+\",\"\",$val);\r\n\t if(isset($value['use_whatsapp_web']) && $value['use_whatsapp_web'] == \"no\") {\r\n\t\t $url = \"https://wa.me/\".$val;\r\n\t } else {\r\n\t\t $url = \"https://web.whatsapp.com/send?phone=\" . $val;\r\n\t }\r\n $mobile_url = \"https://wa.me/\".$val;\r\n // https://wa.me/$number?text=$test\r\n if(isset($value['pre_set_message']) && !empty($value['pre_set_message'])) {\r\n\t if(isset($value['use_whatsapp_web']) && $value['use_whatsapp_web'] == \"no\") {\r\n\t\t $url .= \"?text=\".rawurlencode($value['pre_set_message']);\r\n\t } else {\r\n\t\t $url .= \"&text=\".rawurlencode($value['pre_set_message']);\r\n\t }\r\n $mobile_url .= \"?text=\".rawurlencode($value['pre_set_message']);\r\n }\r\n if(wp_is_mobile()) {\r\n $mobile_target = \"\";\r\n } else {\r\n $desktop_target = \"_blank\";\r\n }\r\n if(isset($value['embedded_window']) && $value['embedded_window'] == \"yes\") {\r\n $embedded_message = isset($value['embedded_message'])?$value['embedded_message']:\"\";\r\n $pre_set_message = isset($value['pre_set_message'])?$value['pre_set_message']:\"\";\r\n $is_default_open = (isset($value['is_default_open'])&&$value['is_default_open']==\"yes\")?1:0;\r\n $has_custom_popup = 1;\r\n $mobile_url = \"javascript:;\";\r\n $url = \"javascript:;\";\r\n $url = \"javascript:;\";\r\n $close_button = \"<div role='button' class='close-chaty-popup is-whatsapp-btn'><div class='chaty-close-button'></div></div>\";\r\n $popup_html = \"<div class='chaty-whatsapp-popup'>\";\r\n $popup_html .= \"<span class='default-value' style='display:none'>\".esc_attr($pre_set_message).\"</span>\";\r\n $popup_html .= \"<span class='default-msg-value' style='display:none'>\".esc_attr($embedded_message).\"</span>\";\r\n $popup_html .= \"<span class='default-msg-phone' style='display:none'>\".esc_attr($val).\"</span>\";\r\n $popup_html .= \"<div class='chaty-whatsapp-body'>\".$close_button.\"<div class='chaty-whatsapp-message'></div></div>\";\r\n $popup_html .= \"<div class='chaty-whatsapp-footer'>\";\r\n\t if(isset($value['use_whatsapp_web']) && $value['use_whatsapp_web'] == \"no\") {\r\n\t\t $popup_html .= \"<form class='whatsapp-chaty-form' autocomplete='off' target='_blank' action='https://wa.me/\".$val.\"' method='get'>\";\r\n\t } else {\r\n\t\t $popup_html .= \"<form class='whatsapp-chaty-form' autocomplete='off' target='_blank' action='https://web.whatsapp.com/send' method='get'>\";\r\n\t }\r\n $popup_html .= \"<div class='chaty-whatsapp-field'><input autocomplete='off' class='chaty-whatsapp-msg' name='text' value='' /></div>\";\r\n $popup_html .= \"<input type='hidden' name='phone' class='chaty-whatsapp-phone' value='' />\";\r\n $popup_html .= \"<input type='hidden' class='is-default-open' value='\".esc_attr($is_default_open).\"' />\";\r\n $popup_html .= \"<input type='hidden' class='channel-id' value='\".esc_attr($channel_id).\"' />\";\r\n $popup_html .= \"<button type='submit' class='chaty-whatsapp-submit-btn'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'><path fill='#ffffff' d='M1.101 21.757L23.8 12.028 1.101 2.3l.011 7.912 13.623 1.816-13.623 1.817-.011 7.912z'></path></svg></button><div style='clear:both'></div>\";\r\n $popup_html .= \"</form>\";\r\n $popup_html .= \"</div>\";\r\n $popup_html .= \"</div>\";\r\n }\r\n } else if($channel_type == \"phone\") {\r\n /* setting for Phone */\r\n $url = \"tel:\".$val;\r\n } else if($channel_type == \"sms\") {\r\n /* setting for SMS */\r\n $url = \"sms:\".$val;\r\n } else if($channel_type == \"telegram\") {\r\n /* setting for Telegram */\r\n\t $val = ltrim($val, \"@\");\r\n $url = \"https://telegram.me/\".$val;\r\n $desktop_target = \"_blank\";\r\n $mobile_target = \"_blank\";\r\n } else if($channel_type == \"line\" || $channel_type == \"google_maps\" || $channel_type == \"poptin\" || $channel_type == \"waze\" ) {\r\n /* setting for Line, Google Map, Link, Poptin, Waze, Custom Link */\r\n $url = esc_url($val);\r\n $desktop_target = \"_blank\";\r\n $mobile_target = \"_blank\";\r\n } else if($channel_type == \"link\" || $channel_type == \"custom_link\" || $channel_type == \"custom_link_3\" || $channel_type == \"custom_link_4\" || $channel_type == \"custom_link_5\") {\r\n $is_exist = strpos($val, \"javascript\");\r\n $is_viber = strpos($val, \"viber\");\r\n if($is_viber !== false) {\r\n $url = $val;\r\n } else if($is_exist === false) {\r\n $url = esc_url($val);\r\n if($channel_type == \"custom_link\" || $channel_type == \"link\" || $channel_type == \"custom_link_3\" || $channel_type == \"custom_link_4\" || $channel_type == \"custom_link_5\") {\r\n $desktop_target = (isset($value['new_window']) && $value['new_window'] == 0)?\"\":\"_blank\";\r\n $mobile_target = (isset($value['new_window']) && $value['new_window'] == 0)?\"\":\"_blank\";\r\n }\r\n } else {\r\n $url = \"javascript:;\";\r\n $on_click_fn = str_replace('\"',\"'\",$val);\r\n }\r\n }else if($channel_type == \"wechat\") {\r\n /* setting for WeChat */\r\n $url = \"javascript:;\";\r\n if(!empty($value['title'])) {\r\n\t $value['title'] .= \": \".$val;\r\n } else {\r\n\t $value['title'] = $val;\r\n }\r\n $qr_code = isset($value['qr_code'])?$value['qr_code']:\"\";\r\n if(!empty($qr_code)) {\r\n $image_data = wp_get_attachment_image_src($qr_code, \"full\");\r\n if(!empty($image_data) && is_array($image_data)) {\r\n $qr_code_image = $image_data[0];\r\n }\r\n }\r\n } else if($channel_type == \"viber\") {\r\n /* setting for Viber */\r\n $url = $val;\r\n } else if($channel_type == \"snapchat\") {\r\n /* setting for SnapChat */\r\n $url = \"https://www.snapchat.com/add/\".$val;\r\n $desktop_target = \"_blank\";\r\n $mobile_target = \"_blank\";\r\n } else if($channel_type == \"waze\") {\r\n /* setting for Waze */\r\n $url = \"javascript:;\";\r\n $value['title'] .= \": \".$val;\r\n } else if($channel_type == \"vkontakte\") {\r\n /* setting for vkontakte */\r\n $url = \"https://vk.me/\".$val;\r\n $desktop_target = \"_blank\";\r\n $mobile_target = \"_blank\";\r\n } else if($channel_type == \"skype\") {\r\n /* setting for Skype */\r\n $url = \"skype:\".$val.\"?chat\";\r\n } else if($channel_type == \"email\") {\r\n /* setting for Email */\r\n $url = \"mailto:\".$val;\r\n $mail_subject = (isset($value['mail_subject']) && !empty($value['mail_subject']))?$value['mail_subject']:\"\";\r\n if($mail_subject != \"\") {\r\n $url .= \"?subject=\".urlencode($mail_subject);\r\n }\r\n } else if($channel_type == \"facebook_messenger\") {\r\n /* setting for facebook URL */\r\n $url = esc_url($val);\r\n $url = str_replace(\"http:\", \"https:\", $url);\r\n if(wp_is_mobile()) {\r\n $mobile_target = \"\";\r\n } else {\r\n $desktop_target = \"_blank\";\r\n }\r\n } else if($channel_type == \"twitter\") {\r\n /* setting for Twitter */\r\n $url = \"https://twitter.com/\".$val;\r\n $desktop_target = \"_blank\";\r\n $mobile_target = \"_blank\";\r\n } else if($channel_type == \"instagram\") {\r\n /* setting for Instagram */\r\n $url = \"https://www.instagram.com/\".$val;\r\n $desktop_target = \"_blank\";\r\n $mobile_target = \"_blank\";\r\n } else if($channel_type == \"linkedin\") {\r\n /* setting for Linkedin */\r\n $link_type = !isset($value['link_type']) || $value['link_type'] == \"company\"?\"company\":\"personal\";\r\n if($link_type == \"personal\") {\r\n $url = \"https://www.linkedin.com/in/\".$val;\r\n } else {\r\n $url = \"https://www.linkedin.com/company/\".$val;\r\n }\r\n $desktop_target = \"_blank\";\r\n $mobile_target = \"_blank\";\r\n } else if($channel_type == \"slack\") {\r\n /* setting for slack */\r\n $url = esc_url($val);\r\n $desktop_target = \"_blank\";\r\n $mobile_target = \"_blank\";\r\n } else if($channel_type == \"contact_us\") {\r\n $url = \"javascript:;\";\r\n $desktop_target = \"\";\r\n $mobile_target = \"\";\r\n $input_fields = \"\";\r\n if(isset($value['name']) || isset($value['email']) || isset($value['message'])) {\r\n $field_setting = $value['name'];\r\n if(isset($field_setting['is_active']) && $field_setting['is_active'] == \"yes\") {\r\n $is_required = (isset($field_setting['is_required']) && $field_setting['is_required'] == \"yes\")?\"is-required\":\"\";\r\n $placeholder = isset($field_setting['placeholder'])?$field_setting['placeholder']:\"Enter your name\";\r\n $input_fields .= \"<div class='chaty-input-area'>\";\r\n $input_fields .= \"<input autocomplete='off' class='chaty-input-field chaty-field-name {$is_required}' name='name' type='text' id='chaty-name' placeholder='{$placeholder}' />\";\r\n $input_fields .= \"</div>\";\r\n }\r\n $field_setting = $value['email'];\r\n if(isset($field_setting['is_active']) && $field_setting['is_active'] == \"yes\") {\r\n $is_required = (isset($field_setting['is_required']) && $field_setting['is_required'] == \"yes\")?\"is-required\":\"\";\r\n $placeholder = isset($field_setting['placeholder'])?$field_setting['placeholder']:\"Enter your email address\";\r\n $input_fields .= \"<div class='chaty-input-area'>\";\r\n $input_fields .= \"<input autocomplete='off' class='chaty-input-field chaty-field-email {$is_required}' name='email' type='email' id='chaty-name' placeholder='{$placeholder}' />\";\r\n $input_fields .= \"</div>\";\r\n }\r\n\t $field_setting = $value['phone'];\r\n\t if(isset($field_setting['is_active']) && $field_setting['is_active'] == \"yes\") {\r\n\t\t $is_required = (isset($field_setting['is_required']) && $field_setting['is_required'] == \"yes\")?\"is-required\":\"\";\r\n\t\t $placeholder = isset($field_setting['placeholder'])?$field_setting['placeholder']:\"Enter your phone number\";\r\n\t\t $input_fields .= \"<div class='chaty-input-area'>\";\r\n\t\t $input_fields .= \"<input autocomplete='off' class='chaty-input-field chaty-field-phone {$is_required}' name='name' type='text' id='chaty-phone' placeholder='{$placeholder}' />\";\r\n\t\t $input_fields .= \"</div>\";\r\n\t }\r\n $field_setting = $value['message'];\r\n if(isset($field_setting['is_active']) && $field_setting['is_active'] == \"yes\") {\r\n $is_required = (isset($field_setting['is_required']) && $field_setting['is_required'] == \"yes\")?\"is-required\":\"\";\r\n $placeholder = isset($field_setting['placeholder'])?$field_setting['placeholder']:\"Enter your message\";\r\n $input_fields .= \"<div class='chaty-input-area'>\";\r\n $input_fields .= \"<textarea autocomplete='off' class='chaty-input-field chaty-field-message {$is_required}' name='name' id='chaty-name' placeholder='{$placeholder}' ></textarea>\";\r\n $input_fields .= \"</div>\";\r\n }\r\n }\r\n if(!empty($input_fields)) {\r\n $has_custom_popup = 1;\r\n $button_text = isset($value['button_text']) && !empty($value['button_text'])?$value['button_text']:\"Submit\";\r\n $button_bg_color = isset($value['button_bg_color']) && !empty($value['button_bg_color'])?$value['button_bg_color']:\"#A886CD\";\r\n $button_text_color = isset($value['button_text_color']) && !empty($value['button_text_color'])?$value['button_text_color']:\"#ffffff\";\r\n $contact_form_title = isset($value['contact_form_title'])?$value['contact_form_title']:\"\";\r\n $popup_html = \"<div class='chaty-contact-form'>\";\r\n $popup_html .= \"<form action='#' method='post' class='chaty-contact-form-data' autocomplete='off'>\";\r\n $popup_html .= \"<div class='chaty-contact-header'>\".esc_attr($contact_form_title).\" <div role='button' class='close-chaty-popup'><div class='chaty-close-button'></div></div><div style='clear:both'></div></div>\";\r\n $popup_html .= \"<div class='chaty-contact-body'>\";\r\n $popup_html .= $input_fields;\r\n $popup_html .= \"<input type='hidden' class='chaty-field-widget' name='widget_id' value='' />\";\r\n $popup_html .= \"<input type='hidden' class='chaty-field-channel' name='channel' value='{$social['slug']}' />\";\r\n $nonce = wp_create_nonce(\"chaty-front-form\");\r\n $popup_html .= \"<input type='hidden' class='chaty-field-nonce' name='nonce' value='{$nonce}' />\";\r\n $popup_html .= \"</div>\";\r\n $popup_html .= \"<div class='chaty-contact-footer'>\";\r\n $popup_html .= \"<button style='color: {$button_text_color}; background: {$button_bg_color}' type='submit' class='chaty-contact-submit-btn' data-text='{$button_text}'>{$button_text}</div>\";\r\n $popup_html .= \"</div>\";\r\n $popup_html .= \"</form>\";\r\n $popup_html .= \"</div>\";\r\n }\r\n } else if($channel_type == \"tiktok\") {\r\n\t $val = $value['value'];\r\n\t $firstCharacter = substr($val, 0, 1);\r\n\t if($firstCharacter != \"@\") {\r\n\t\t $val = \"@\".$val;\r\n\t }\r\n\t $url = esc_url(\"https://www.tiktok.com/\".$val);\r\n\t $desktop_target = $mobile_target = \"_blank\";\r\n }\r\n\r\n /* Instagram checking for custom color */\r\n if($channel_type == \"instagram\" && $value['bg_color'] == \"#ffffff\") {\r\n $value['bg_color'] = \"\";\r\n }\r\n\r\n $svg = trim(preg_replace('/\\s\\s+/', '', $svg_icon));\r\n\r\n $is_mobile = isset($value['is_mobile']) ? 1 : 0;\r\n $is_desktop = isset($value['is_desktop']) ? 1 : 0;\r\n\r\n if(empty($mobile_url)) {\r\n $mobile_url = $url;\r\n }\r\n\r\n $svg_class = ($channel_type == \"contact_us\")?\"color-element\":\"\";\r\n\r\n $svg = '<svg class=\"ico_d '.$svg_class.'\" width=\"39\" height=\"39\" viewBox=\"0 0 39 39\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"transform: rotate(0deg);\">'.$svg.'</svg>';\r\n\r\n\t $rgb_color = $this->getRGBColor($value['bg_color']);\r\n $data = array(\r\n 'val' => esc_attr__(wp_unslash($val)),\r\n 'default_icon' => $svg,\r\n 'bg_color' => $value['bg_color'],\r\n 'rbg_color' => $rgb_color,\r\n 'title' => esc_attr__(wp_unslash($value['title'])),\r\n 'img_url' => esc_url($image_url),\r\n 'social_channel' => $slug,\r\n 'channel_type' => $channel_type,\r\n 'href_url' => $url,\r\n 'desktop_target' => $desktop_target,\r\n 'mobile_target' => $mobile_target,\r\n 'qr_code_image' => esc_url($qr_code_image),\r\n 'channel' => $social['slug'],\r\n 'is_mobile' => $is_mobile,\r\n 'is_desktop' => $is_desktop,\r\n 'mobile_url' => $mobile_url,\r\n 'on_click' => $on_click_fn,\r\n \"has_font\" => 0,\r\n \"popup_html\" => $popup_html,\r\n \"has_custom_popup\" => $has_custom_popup,\r\n \"is_default_open\" => $is_default_open\r\n );\r\n $arr[] = $data;\r\n }\r\n }\r\n endforeach;\r\n endforeach;\r\n return $arr;\r\n }", "protected function auto_register_paths()\r\n\t\t{\r\n\t\t\t// prepend all the ignore paths\r\n\t\t\t$n = count( $this->path_ignore );\r\n\t\t\tfor ( $i = 0; $i < $n; $i++ )\r\n\t\t\t\t$this->path_ignore[ $i ] = $this->local . $this->path_ignore[ $i ];\r\n\t\t\t\r\n\t\t\t$dirs = glob( $this->local . \"*\", GLOB_ONLYDIR );\r\n\t\t\t\r\n\t\t\t// setup all valid web directories\r\n\t\t\t$this->paths[ self::ROOT_PATH ] = $this->local;\r\n\t\t\tforeach( $dirs as $d )\r\n\t\t\t\tif ( !in_array( $d, $this->path_ignore ) )\r\n\t\t\t\t\t$this->paths[ basename( $d ) ] = $d . DIRECTORY_SEPARATOR;\r\n\t\t}", "public static function iconPath()\n {\n return Craft::getAlias('@seibertio/elasticsearch/icon.svg');\n }", "public function icon($value)\n {\n $this->icon = $value;\n\n return $this;\n }", "public static function iconPath()\n {\n return Craft::getAlias(\"@julianmjones/schedapiintegration/assetbundles/schedapiintegrationutilityutility/dist/img/SchedApiIntegrationUtility-icon.svg\");\n }", "public function set_path() {\n\t\t\t\n\t\t\t// pick up the path types\n\t\t\t$path_types = include_once(CONFIGPATH . 'path-types.php' );\n\n\t\t\t// get the base path for the deploy type\n\t\t\t$base_path = $path_types[ $this->repo[ 'type' ] ];\n\n\t\t\t// check if it is a valid path\n\t\t\t$this->is_path_valid( $base_path );\n\n\t\t\t// append the repositories name to get the final deploy path\n\t\t\t$this->repo[ 'path' ] = $base_path . '/' . $this->repo[ 'name' ];\n\t\t}", "public function override_svg_icons() {\n\t\tglobal $menu;\n\n\t\t// Only do this if we're not in an API request, as we override the $menu global.\n\t\tif ( $this->is_api_request ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$svg_items = array();\n\t\tforeach ( $menu as $idx => $menu_item ) {\n\t\t\t// Menu items that don't have icons, for example separators, have less than 7\n\t\t\t// elements, partly because the 7th is the icon. So, if we have less than 7,\n\t\t\t// let's skip it.\n\t\t\tif ( count( $menu_item ) < 7 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If the hookname contain a URL than sanitize it by replacing invalid characters.\n\t\t\tif ( false !== strpos( $menu_item[5], '://' ) ) {\n\t\t\t\t$menu_item[5] = preg_replace( '![:/.]+!', '_', $menu_item[5] );\n\t\t\t}\n\n\t\t\tif ( 0 === strpos( $menu_item[6], 'data:image/svg+xml' ) && 'site-card' !== $menu_item[3] ) {\n\t\t\t\t$svg_items[] = array(\n\t\t\t\t\t'icon' => $menu_item[6],\n\t\t\t\t\t'id' => $menu_item[5],\n\t\t\t\t);\n\t\t\t\t$menu_item[4] .= ' menu-svg-icon';\n\t\t\t\t$menu_item[6] = 'none';\n\t\t\t}\n\t\t\t// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited\n\t\t\t$menu[ $idx ] = $menu_item;\n\t\t}\n\t\tif ( count( $svg_items ) > 0 ) {\n\t\t\t$styles = '.menu-svg-icon .wp-menu-image { background-repeat: no-repeat; background-position: center center } ';\n\t\t\tforeach ( $svg_items as $svg_item ) {\n\t\t\t\t$styles .= sprintf( '#%s .wp-menu-image { background-image: url( \"%s\" ) }', $svg_item['id'], $svg_item['icon'] );\n\t\t\t}\n\t\t\t$styles .= '@supports ( mask-image: none ) or ( -webkit-mask-image: none ) { ';\n\t\t\t$styles .= '.menu-svg-icon .wp-menu-image { background-image: none; } ';\n\t\t\t$styles .= '.menu-svg-icon .wp-menu-image::before { background-color: currentColor; ';\n\t\t\t$styles .= 'mask-size: contain; mask-position: center center; mask-repeat: no-repeat; ';\n\t\t\t$styles .= '-webkit-mask-size: contain; -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; content:\"\" } ';\n\t\t\tforeach ( $svg_items as $svg_item ) {\n\t\t\t\t$styles .= sprintf(\n\t\t\t\t\t'#%s .wp-menu-image { background-image: none; } #%s .wp-menu-image::before{ mask-image: url( \"%s\" ); -webkit-mask-image: url( \"%s\" ) }',\n\t\t\t\t\t$svg_item['id'],\n\t\t\t\t\t$svg_item['id'],\n\t\t\t\t\t$svg_item['icon'],\n\t\t\t\t\t$svg_item['icon']\n\t\t\t\t);\n\t\t\t}\n\t\t\t$styles .= '}';\n\n\t\t\twp_register_style( 'svg-menu-overrides', false, array(), '20210331' );\n\t\t\twp_enqueue_style( 'svg-menu-overrides' );\n\t\t\twp_add_inline_style( 'svg-menu-overrides', $styles );\n\t\t}\n\t}", "public function __initPath()\n\t{\n\t\tdefine('IMG_PATH', STATIC_PATH . '/img');\n define('UPLOAD_PATH', STATIC_PATH . '/upload');\n define('CSS_PATH', STATIC_PATH . '/css');\n define('JS_PATH', STATIC_PATH . '/js');\n define('UPLOAD_THUMBAIL_PATH', UPLOAD_PATH . '/thumbnails');\n // Define url to image directory\n define('IMG_URL', STATIC_URL . '/img');\n define('UPLOAD_URL', STATIC_URL . '/upload');\n define('CSS_URL', STATIC_URL . '/css');\n define('JS_URL', STATIC_URL . '/js');\n define('UPLOAD_THUMBAIL_URL', UPLOAD_URL . '/thumbnails');\n\t}", "public function setIcon(Icon $icon) {\n\t\t$this->icon = $icon;\n\t}", "public function get_icon()\n {\n return 'fa fa-image';\n }", "protected function handle_social_images( Indexable $indexable ) {\n\t\t// When the image or image id is set.\n\t\tif ( $indexable->open_graph_image || $indexable->open_graph_image_id ) {\n\t\t\t$indexable->open_graph_image_source = 'set-by-user';\n\n\t\t\t$this->set_open_graph_image_meta_data( $indexable );\n\t\t}\n\n\t\tif ( $indexable->twitter_image || $indexable->twitter_image_id ) {\n\t\t\t$indexable->twitter_image_source = 'set-by-user';\n\t\t}\n\n\t\tif ( $indexable->twitter_image_id ) {\n\t\t\t$indexable->twitter_image = $this->twitter_image->get_by_id( $indexable->twitter_image_id );\n\t\t}\n\n\t\t// When image sources are set already.\n\t\tif ( $indexable->open_graph_image_source && $indexable->twitter_image_source ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$alternative_image = $this->find_alternative_image( $indexable );\n\t\tif ( ! empty( $alternative_image ) ) {\n\t\t\t$this->set_alternative_image( $alternative_image, $indexable );\n\t\t}\n\t}", "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfUsingUpperCameCasedExtensionNameAndIconPathNotGiven() {}", "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n if ($this->iconClass) {\n $this->addAssetInfo(\n \"font-awesome.css\", \n $this->getCommonAssetDir()\n );\n }\n \n $this->addAssetInfo(\n \"titleHeader.css\",\n dirname(__FILE__) . \"/assets\"\n );\n }", "function get_topic_icons() {\n $dir = TOPIC_ICON_DIR;\n\n $icons = glob($dir . '/*.png');\n $new_icons = '';\n foreach ($icons as $icon) {\n $icon_parts = explode('/', $icon);\n $icon_file = $icon_parts[count($icon_parts) - 1];\n $new_icons[] = array('file' => $icon_file, 'path' => $icon, 'url' => TOPIC_ICON_URL . '/' . $icon_file);\n }\n\n if (count($new_icons) > 0)\n return $new_icons;\n else\n return false;\n }", "function twenty_twenty_one_nav_menu_social_icons( $item_output, $item, $depth, $args ) {\n\t// Change SVG icon inside social links menu if there is supported URL.\n\tif ( 'footer' === $args->theme_location ) {\n\t\t$svg = twenty_twenty_one_get_social_link_svg( $item->url, 24 );\n\t\tif ( ! empty( $svg ) ) {\n\t\t\t$item_output = str_replace( $args->link_before, $svg, $item_output );\n\t\t}\n\t}\n\n\treturn $item_output;\n}", "protected function setCachedDefinitions(array $icons) {\n $this->cacheSet($this->cacheKey, $icons, Cache::PERMANENT, $this->cacheTags);\n $this->icons = $icons;\n }", "public function setFaviconAttribute($value){\n\n \t\t $this->attributes['favicon']= $value;\n \t}", "function block_core_social_link_get_icon($service)\n {\n }", "public function get_icon() {\n\t\treturn parent::get_widget_icon( 'SocialShare' );\n\t}", "function sl_add_toolbar_site_icon() {\n\t\tif ( ! is_admin_bar_showing() ) {\n\t\t\treturn;\n\t\t}\n\t\techo '<style>\n\t\t\t#wp-admin-bar-site-name > a.ab-item:before {\n\t\t\t\tfloat: left;\n\t\t\t\twidth: 16px;\n\t\t\t\theight: 16px;\n\t\t\t\tmargin: 5px 5px 0 -1px;\n\t\t\t\tdisplay: block;\n\t\t\t\tcontent: \"\";\n\t\t\t\topacity: 0.4;\n\t\t\t\tbackground: #000 url(\"http://www.google.com/s2/u/0/favicons?domain=' . parse_url( home_url(), PHP_URL_HOST ). '\");\n\t\t\t\tborder-radius: 16px;\n\t\t\t}\n\t\t\t#wp-admin-bar-site-name:hover > a.ab-item:before {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t</style>';\n\t}", "function wprt_topbar_social_options() {\n\treturn apply_filters ( 'wprt_topbar_social_options', array(\n\t\t'facebook' => array(\n\t\t\t'label' => esc_html__( 'Facebook', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-facebook',\n\t\t),\n\t\t'twitter' => array(\n\t\t\t'label' => esc_html__( 'Twitter', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-twitter',\n\t\t),\n\t\t'googleplus' => array(\n\t\t\t'label' => esc_html__( 'Google Plus', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-google-plus',\n\t\t),\n\t\t'youtube' => array(\n\t\t\t'label' => esc_html__( 'Youtube', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-youtube',\n\t\t),\n\t\t'vimeo' => array(\n\t\t\t'label' => esc_html__( 'Vimeo', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-vimeo',\n\t\t),\n\t\t'linkedin' => array(\n\t\t\t'label' => esc_html__( 'LinkedIn', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-linkedin',\n\t\t),\n\t\t'pinterest' => array(\n\t\t\t'label' => esc_html__( 'Pinterest', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-pinterest',\n\t\t),\n\t\t'instagram' => array(\n\t\t\t'label' => esc_html__( 'Instagram', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-instagram',\n\t\t),\n\t\t'skype' => array(\n\t\t\t'label' => esc_html__( 'Skype', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-skype',\n\t\t),\n\t\t'Apple' => array(\n\t\t\t'label' => esc_html__( 'Apple', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-apple',\n\t\t),\n\t\t'android' => array(\n\t\t\t'label' => esc_html__( 'Android', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-android',\n\t\t),\n\t\t'behance' => array(\n\t\t\t'label' => esc_html__( 'Behance', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-behance',\n\t\t),\n\t\t'dribbble' => array(\n\t\t\t'label' => esc_html__( 'Dribbble', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-dribbble',\n\t\t),\n\t\t'flickr' => array(\n\t\t\t'label' => esc_html__( 'Flickr', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-flickr',\n\t\t),\n\t) );\n}", "public function kind_icon_url ()\n {\n switch ($this->kind)\n {\n case History_item_deleted:\n return '{icons}indicators/deleted';\n case History_item_restored:\n return '{icons}indicators/restored';\n case History_item_hidden:\n return '{icons}indicators/hidden';\n case History_item_hidden_update:\n return '{icons}indicators/hidden_update';\n case History_item_locked:\n return '{icons}indicators/locked';\n default:\n return parent::kind_icon_url ();\n }\n }" ]
[ "0.7025868", "0.586154", "0.5843922", "0.5827118", "0.57907385", "0.57655257", "0.5762675", "0.56828916", "0.5672955", "0.56334555", "0.56205946", "0.5546111", "0.55201936", "0.5511036", "0.5508489", "0.5504296", "0.54753196", "0.547068", "0.5456038", "0.5383028", "0.53718394", "0.53420484", "0.5335791", "0.5325069", "0.531825", "0.52783126", "0.5278161", "0.5266609", "0.5251027", "0.52492106", "0.5225628", "0.52243835", "0.5215251", "0.5191586", "0.51790893", "0.51750493", "0.5174829", "0.5171858", "0.51409066", "0.5130162", "0.5120344", "0.5119329", "0.50807595", "0.5078778", "0.5077828", "0.50697124", "0.50568205", "0.50568205", "0.50539595", "0.5037978", "0.5036077", "0.50311655", "0.5013689", "0.5010282", "0.50063425", "0.50024235", "0.50022995", "0.5000881", "0.499443", "0.49906594", "0.4984117", "0.4974207", "0.49724612", "0.49716917", "0.4971348", "0.49694696", "0.49622935", "0.4961436", "0.4961436", "0.49605888", "0.4960015", "0.49516892", "0.49492505", "0.4921728", "0.49201834", "0.4894951", "0.4891586", "0.48882577", "0.48452798", "0.48312578", "0.4830688", "0.48274115", "0.48247263", "0.4823451", "0.48101208", "0.48081952", "0.4788028", "0.47726983", "0.47707996", "0.4762231", "0.47471485", "0.4730774", "0.47250748", "0.4720686", "0.47047117", "0.47040218", "0.4693521", "0.46923575", "0.4677145", "0.4672388" ]
0.8234634
0
Set one or more arguments
public function setArgs($key, $value = '') { // Set an array of arguments if (is_array($key)) { foreach ($key as $sub_key => $sub_value) { $this->setArgs($sub_key, $sub_value); } return; } // Check for valid arguments if (!array_key_exists($key, $this->args)) { return; } // Set the value and update the network URLs $this->args[$key] = urlencode($value); $this->updateNetworks(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setArguments(array $args);", "public function setArguments($args) {\n $this->args= $args;\n }", "public function setArguments(array $arguments);", "public function setArguments($args)\n {\n $this->arguments = $args;\n }", "public function setArguments($arguments)\n {\n $this->arguments = $arguments;\n }", "protected function setArgs($args) {\n $this->args = is_array($args) ? $args : array();\n }", "public function setArguments(...$arguments) {\n $this->arguments = $arguments;\n return $this;\n }", "public function setArgument($name, $value);", "public function setArgs($args = array()) {\n if (!is_array($args)) {\n return false;\n }\n \n $this->args = $args;\n }", "public function setArgument(string $name, $value);", "public function setArguments($args)\n {\n if (!is_array($args)) {\n $args = array($args);\n }\n\n if (array_keys($args) === range(0, count($args) - 1)) {\n // sequential array means pass bare arguments, not option=value pairs.\n foreach ($args as $arg) {\n $this->arguments[] = escapeshellarg($arg);\n }\n } else {\n // associative array means pass option=value pairs.\n foreach ($args as $option => $value) {\n if (empty($value)) {\n $this->arguments[$option] = '';\n } else {\n $this->arguments[$option] = escapeshellarg($value);\n }\n }\n }\n }", "protected function setArgument()\n {\n $this->set('primary_key', false);\n $this->set('length', $this->argument);\n $this->set('autoincrement', false);\n $this->set('unsigned', false);\n $this->set('not_null', false);\n }", "public function setArguments(array $arguments = [])\n {\n $this->arguments = [];\n $this->requiredCount = 0;\n $this->lastOptionalArgument = null;\n $this->lastArrayArgument = null;\n $this->addArguments($arguments);\n }", "public function setArguments(array $args) : DefinitionInterface;", "public function setDefaultArgs($args);", "protected function setCliArguments() {}", "public function setArg($value, $key = 0): self\n {\n $this->arguments[$key] = $value;\n return $this;\n }", "public function set_props($args)\n {\n }", "public function setWrapperArguments($arguments) {\n\t\tforeach ($arguments as $key => $value) {\n\t\t\t$this->setWrapperArgument($key, $value);\n\t\t}\n\t}", "protected function setArguments( array $aArguments=array() ) {\n $this->oProp->aPostTypeArgs = $aArguments;\n }", "function change_arguments( $args ) {\n //$args['dev_mode'] = true;\n\n return $args;\n }", "function change_arguments( $args ) {\n //$args['dev_mode'] = true;\n\n return $args;\n }", "public function withArguments(array $args);", "private function setParameter($argv){\n\t\t\t\n\t\t// CLI argv count which must be 7 including filename\n\t\tif(count($argv) == 7){\n\n\t\t\tif( ( isset($argv[1]) && ($argv[1] == '-u') ) && (isset($argv[3]) && ($argv[3] == '-p')) ){\n\n\t\t\t\t$this->setUser($argv[2]);\n\t\t\t\t$this->setPassword($argv[4]);\n\t\t\t\t$this->setUrl($argv[5]);\n\t\t\t\t$this->setContributor($argv[6]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->setError('Invalid parameters.');\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->setError('Insufficient parameters.');\n\t\t}\n\t}", "public function setArgs(array $args) : self\n {\n $this->initialized['args'] = true;\n $this->args = $args;\n return $this;\n }", "public function setArguments(array $arguments): self\n {\n $this->_arguments = $arguments;\n return $this;\n }", "private function specifyParameters(): void\n {\n // We will loop through all of the arguments and options for the command and\n // set them all on the base command instance. This specifies what can get\n // passed into these commands as \"parameters\" to control the execution.\n foreach ($this->getArguments() as $arguments) {\n $this->addArgument(...$arguments);\n }\n\n foreach ($this->getOptions() as $options) {\n $this->addOption(...$options);\n }\n }", "public function setOptions($mixed)\n\t{\n\t\t$args \t= func_get_args();\n\t\t$sign \t= !isset($args[1]) ? 'set' : 'get'; \n\t\t\n\t\t\t$names = Tools::toArray($args[1]);\n\t\t\t\n\t\t\tforeach ( $names as $name => $value ){ $this->setOption($name, $value); }\n\t}", "public function __construct()\n {\n $this->arguments = func_get_args();\n }", "public function testCanSetGetArguments()\n {\n $arguments = ['--human-readable', '--all'];\n $command = $this->createInstance();\n foreach ($arguments as $_argument) {\n $command->addArgument($_argument);\n }\n $this->assertSame($arguments, $command->getArguments(), 'Must be able to get and set multiple arguments');\n }", "private function setArgs(){\n\t\t$this->args = array(\n\t\t\t'label' => $this->label,\n\t\t\t'labels' => $this->labels,\n\t\t\t'description' => $this->description,\n\t\t\t'public' => $this->public,\n\t\t\t'exclude_from_search' => $this->excludeSearch,\n\t\t\t'publicly_queryable' => $this->publiclyQueryable,\n\t\t\t'show_ui' => $this->show_ui ,\n\t\t\t'show_in_nav_menus' => $this->showInNavMenus,\n\t\t\t'show_in_menu' => $this->showInMenu,\n\t\t\t'show_in_admin_bar' => $this->showInAdminBar,\n\t\t\t'menu_position' => $this->menuPosition,\n\t\t\t'menu_icon' => $this->menuIcon,\n\t\t\t'capability_type' => $this->capabilityType,\n\t\t\t'map_meta_cap' => $this->mapMetaCap,\n\t\t\t'hierarchical' => $this->hierarchical,\n\t\t\t'supports' => $this->supports,\n\t\t\t'register_meta_box_cb' => $this->registerMetaBoxCb,\n\t\t\t'taxonomies' => $this->taxonomies,\n\t\t\t'has_archive' => $this->hasArchive,\n\t\t\t'permalink_epmask' => $this->permalinkEpmask,\n\t\t\t'rewrite' => $this->rewrite,\n\t\t\t'query_var' => $this->queryVar,\n\t\t\t'can_export' => $this->canExport,\n\t\t\t'_builtin' => $this->builtin\n\t\t);\n\t}", "private function _setArgsRegister( $args )\n\t{\t\t\n\t\t$this->argsRegister\t= $args;\t\t\n\t}", "public function setArgument(string $name,$arg) : DefinitionInterface;", "public function set()\n {\n $args = func_get_args();\n $num = func_num_args();\n if ($num == 2) {\n self::$data[$args[0]] = $args[1];\n } else {\n if (is_array($args[0])) {\n foreach ($args[0] as $k => $v) {\n self::$data[$k] = $v;\n }\n }\n }\n }", "public function bulkSet(array $args = array()) {\n foreach ($args as $argName => $arg) {\n $this->__set($argName, $arg);\n }\n }", "public function setup( $args = array() ) {\n\t\t\t$this->args = $args;\n\t\t}", "public function setAll($args = [], $reassign = false);", "public function set(array $args): self\n {\n foreach ($args as $key => $value) {\n $this->setAttribute($key, $value);\n }\n\n return $this;\n }", "public function setArguments(array $arguments): self\n {\n $this->arguments = $arguments;\n\n return $this;\n }", "protected function setter($key, $args) {\n\t\tif (array_key_exists($key, $this->defaults)) {\n\t\t\t$this->setAppValue($key, $args[0]);\n\t\t} else {\n\t\t\tthrow new \\BadFunctionCallException($key . ' is not a valid key');\n\t\t}\n\t}", "public function __set($var, $val) {\n\t\t$test = $this->_sanitize_arg($var,$val);\n\t\tif ($test !== null) {\n\t\t\t$this->args[$var] = $test;\n\t\t}\n\t}", "public function setArgs(array $args)\n {\n $this->_args = array_merge($this->_args, $args);\n return $this;\n }", "public static function mset($_arg) {\n\t\tif (!is_array($_arg)) {\n\t\t\t// Invalid argument\n\t\t\ttrigger_error(self::TEXT_MSet);\n\t\t\treturn;\n\t\t}\n\t\t// Bind key-value pairs\n\t\tarray_map('self::set',array_keys($_arg),$_arg);\n\t}", "public function set_args( $args ) {\n\t\tif ( is_array( $args ) ) {\n\t\t\t$this->args = $args;\n\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}", "public function setArg($key, $value)\n {\n $this->args[$key] = $value;\n\n return $this;\n }", "public function setNewArgumentValue ($name, $value) {\n if ($this->_arguments === NULL) {\n $this->getArguments();\n }\n\n if (array_key_exists($name, $this->_arguments) == FALSE) {\n throw new Argument_Exception(\"Argument '{$name}' does not exist\");\n }\n\n $this->_arguments[$name] = $value;\n }", "public function setArgs($values) {\n $this->impl->setArgs($this->context, $values);\n return $this;\n }", "public function setParameters($argv, $allow_any_key = false)\n\t{\n\t\tglobal $g_loglevel;\n\t\t$old_log_level = $g_loglevel;\n\t\t$g_loglevel = E_USER_WARNING;\n\t\t\n\t\t// get rid of the script argument\n\t\t$this->name = $argv[0];\n\t\tarray_shift ($argv);\n\n\t\t// build a new parameter - value array\n\t\t$ret = TRUE;\n\t\tforeach($argv AS $value) {\n\t\t\tif(in_array($value, array(\"-help\", \"-help\", '-h', \"-\"))) $ret = FALSE;\n\n\t\t\t$a = explode(\"=\",$value);\n\t\t\tif(count($a) != 2) {\n\t\t\t\ttrigger_error(\"Invalid key value pair: $value\",E_USER_WARNING);\n\t\t\t}\n\t\t\t$key = $a[0];\n\t\t\t$value = $a[1];\n\t\t\tif(!isset($this->parameters[$key]) && ($allow_any_key == false)) {\n\t\t\t\techo PHP_EOL.\"ERROR: Invalid parameter - $key\".PHP_EOL;\n\t\t\t\t$ret = FALSE;\n\t\t\t}\n\t\t\tif($value == '') {\n\t\t\t\ttrigger_error(\"No value for parameter $key\", E_USER_WARNING);\n\t\t\t\t$ret = FALSE;\n\t\t\t}\n\t\t\t$myargs[$key] = $value;\n\t\t}\n\n\t\t// now iterate over all parameters in the option block and set their user/default value\n\t\tforeach($this->parameters AS $key => $a) {\n\t\t\tif(isset($myargs[$key])) {\n\t\t\t\t// use the supplied value\n\t\t\t\t$user_entries = explode(\",\",$myargs[$key]);\n\t\t\t\t// check that each is a valid choice\n\t\t\t\tif($this->parameters[$key]['list']) {\n\t\t\t\t\t$m = explode('|',$this->parameters[$key]['list']);\n\t\t\t\t\tforeach($user_entries AS $user_entry) {\n\t\t\t\t\t\tif(!in_array($user_entry,$m)) {\n\t\t\t\t\t\t\ttrigger_error(\"$user_entry for $key parameter does not match any of the listed options: \".$this->parameters[$key]['list'], E_USER_WARNING);\n\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->parameters[$key]['value'] = $myargs[$key];\t\t\t\t\n\t\t\t} else if(!isset($myargs[$key]) && $this->parameters[$key]['mandatory']) {\n\t\t\t\ttrigger_error(\"$key is a mandatory argument!\", E_USER_WARNING);\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\t// use the default\n\t\t\t\t$this->parameters[$key]['value'] = $this->parameters[$key]['default'];\n\t\t\t}\n\t\t\tif($this->parameters[$key]['value'] === 'true') $this->parameters[$key]['value'] = true;\n\t\t\tif($this->parameters[$key]['value'] === 'false') $this->parameters[$key]['value'] = false;\n\t\t}\n\t\t$g_loglevel = $old_log_level;\n\t\treturn $ret;\n\t}", "protected function specifyParameters()\n {\n // We will loop through all of the arguments and options for the command and\n // set them all on the base command instance. This specifies what can get\n // passed into these commands as \"parameters\" to control the execution.\n foreach ($this->getArguments() as $arguments) {\n call_user_func_array([$this, 'addArgument'], $arguments);\n }\n foreach ($this->getOptions() as $options) {\n call_user_func_array([$this, 'addOption'], $options);\n }\n }", "public function setArguments($options)\n {\n $this->setOption('filename', $options, null);\n $this->setOption('output', $options, 'output');\n $this->setOption('format', $options, $this->pandocBroken ? 'markdown_github' : 'gfm+raw_html');\n $this->setOption('flatten', $options);\n $this->setOption('addmeta', $options);\n $this->setOption('luafilter', $options);\n $this->setOption('template', $options);\n $this->output = rtrim($this->output, '/') . '/';\n }", "public function setArgs(array $args)\n {\n $this->args = $args;\n\n return $this;\n }", "public function set($params) {}", "public function initializeArguments() {}", "public function initializeArguments() {}", "public function initializeArguments() {}", "public function initializeArguments() {}", "function setParameters($parameters);", "public function setArguments(array $arguments = null)\n {\n $this->arguments = $arguments;\n\n return $this;\n }", "public function setVar($name = '', $var = FALSE)\n {\n if(intval($name) === 0)\n $this->args[$name] = $var;\n else\n _d('Class name: '.__CLASS__.' line: '.__LINE__.' function: '.__FUNCTION__.'() You must set correct param\\'s name.',1);\n }", "function setContext( )\n\t{\n\t\t$args = new safe_args();\n\t\t$args->set('name', \tREQUIRED, 'string');\n\t\t$args->set('value', REQUIRED, 'any');\t\t\n\t\t$args = $args->get(func_get_args());\n\t\t\t\n\t\t$this->context[$args['name']] = $args['value'];\n\t}", "public function args( int $args ): self {\n\t\t$this->args = $args;\n\t\treturn $this;\n\t}", "public function set($parameters)\n {}", "public function setWrapperArgument($key, $value) {\n\t\t$this->arguments[$key] = $value;\n\t}", "public function testOoCanSetGetArguments()\n {\n $arguments = [new Command\\Argument('all'), new Command\\Argument('list')];\n $command = $this->createInstance();\n foreach ($arguments as $_argument) {\n $command->addArgument($_argument);\n }\n $this->assertSame($arguments, $command->getArguments(), 'Must be able to get and set multiple argument objects');\n }", "public function setParams()\n {\n $argc = func_num_args();\n $argv = func_get_args();\n if (0 == $argc) {\n return;\n }\n\n if ((1 == $argc) && is_array($argv[0])) {\n $params = [];\n $types = [];\n $wellFormed = true;\n foreach ($argv[0] as $arg) {\n if (!is_array($arg) || !isset($arg['value'])) {\n $wellFormed = false;\n break;\n }\n $params[] = $arg['value'];\n\n if (!isset($arg['type'])) {\n $xmlRpcValue = Zend_XmlRpc_Value::getXmlRpcValue($arg['value']);\n $arg['type'] = $xmlRpcValue->getType();\n }\n $types[] = $arg['type'];\n }\n if ($wellFormed) {\n $this->_xmlRpcParams = $argv[0];\n $this->_params = $params;\n $this->_types = $types;\n } else {\n $this->_params = $argv[0];\n $this->_types = [];\n $xmlRpcParams = [];\n foreach ($argv[0] as $arg) {\n if ($arg instanceof Zend_XmlRpc_Value) {\n $type = $arg->getType();\n } else {\n $xmlRpcValue = Zend_XmlRpc_Value::getXmlRpcValue($arg);\n $type = $xmlRpcValue->getType();\n }\n $xmlRpcParams[] = ['value' => $arg, 'type' => $type];\n $this->_types[] = $type;\n }\n $this->_xmlRpcParams = $xmlRpcParams;\n }\n return;\n }\n\n $this->_params = $argv;\n $this->_types = [];\n $xmlRpcParams = [];\n foreach ($argv as $arg) {\n if ($arg instanceof Zend_XmlRpc_Value) {\n $type = $arg->getType();\n } else {\n $xmlRpcValue = Zend_XmlRpc_Value::getXmlRpcValue($arg);\n $type = $xmlRpcValue->getType();\n }\n $xmlRpcParams[] = ['value' => $arg, 'type' => $type];\n $this->_types[] = $type;\n }\n $this->_xmlRpcParams = $xmlRpcParams;\n }", "public function setArgument(string $key, $value)\n {\n $this->arguments[$key] = $value;\n\n return $this;\n }", "public function set_properties( $args ) {\n\n\t\t// Reset default property values\n\t\t$reset = array(\n\t\t\t'debug_mode' => false,\n\t\t\t'parant_plugin_slug' => '',\n\t\t\t'view' => plugin_dir_path( __FILE__ ) . 'wpaddons-io-sdk/view/wordpress-plugins.php',\n\t\t);\n\n\t\t// Define properties\n\t\tforeach ( $reset as $name => $default ) {\n\n\t\t\tif ( array_key_exists( $name, $args ) ) {\n\t\t\t\t// If set, use defined values\n\t\t\t\t$this->{$name} = $args[$name];\n\t\t\t} else {\n\t\t\t\t// If not set, use default values\n\t\t\t\t$this->{$name} = $default;\n\t\t\t}\n\n\t\t}\n\n\t}", "public function setArgument(string $key, mixed $value): static\n {\n $this->arguments[$key] = $value;\n\n return $this;\n }", "public function setArgument($argument)\n {\n $this->argument = $argument;\n }", "protected function specifyParameters()\n {\n $this->addOption('account', 'a', InputOption::VALUE_OPTIONAL, '');\n $this->addOption('type', 't', InputOption::VALUE_OPTIONAL, '');\n $this->addOption('start-date', 's', InputOption::VALUE_OPTIONAL, '');\n }", "public function setParameters(mixed ...$parameters) : void\n {\n $this->parameters = $parameters;\n }", "function option ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('toption');\n return $rc->newInstanceArgs( $arguments ); \n}", "private function setGivenArgumentAmount(): int {\n return $_SERVER['argc'] - 1;\n }", "function setVar() {\n\t\t\n\t\t$_argv = func_get_args();\n\t\t$_argc = func_num_args();\n\t\t\n\t\t// load vars\n\t\t$vars = getVars();\n\t\tif (!$_GET[\"__shared__\"][\"vars\"]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"] = array();\n\t\t}\n\t\tforeach ($vars as $varNamespace => $varArray) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$varNamespace] = $varArray;\n\t\t}\n\t\t\n\t\t// Register namespace if not existing\n\t\tif (!$_GET[\"__shared__\"][\"vars\"][$_argv[0]]) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]] = array();\n\t\t}\n\t\tif ($_argc == 2) {\n\t\t\tif (is_array($_argv[1])) {\n\t\t\t\tforeach ($_argv[1] as $var => $val) {\n\t\t\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$var] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($_argc == 3) {\n\t\t\t$_GET[\"__shared__\"][\"vars\"][$_argv[0]][$_argv[1]] = $_argv[2];\n\t\t}\n\t\t\n\t\t// save vars\n\t\t\n\t\tsaveVars();\n\t}", "public function setArgs(array $args, $append = true)\n {\n $this->args = array_merge($append ? $this->args : [], $args);\n\n return $this;\n }", "function setOptions (array $options);", "public function add_argument ($key, $value)\n {\n $this->_args [$key] = $value;\n }", "public function mergeArguments(array $arguments);", "public function setArguments(\\Yana\\Http\\Requests\\ValueWrapper $arguments)\n {\n $this->_arguments = $arguments;\n return $this;\n }", "abstract public function set();", "public function set_usage($args) {\n\n if ( $args ) {\n\n foreach ( $args as $arg ) {\n\n // Verify if collection with plan's usage is valid\n if ( isset($arg['name']) && isset($arg['value']) && isset($arg['limit']) && isset($arg['left']) ) {\n\n // Add usage to the list\n self::$the_usage[] = $arg;\n\n }\n\n }\n\n }\n\n }", "public function setArguments(array $arguments)\n {\n $this->getProcessBuilder()->setArguments($arguments);\n\n return $this;\n }", "public function __construct(array $arguments)\n {\n $this->arguments = $arguments;\n }", "protected function specifyParameters()\n {\n $this->addOption('force-renew', null, InputOption::VALUE_NONE, '');\n }", "abstract public function setOptions($options = array());", "public function parseArgs(array $args): void;", "public function __construct($args) {\r\n\t\tarray_shift($args);\r\n\t\twhile (!empty($args)):\r\n\t\t\t$key = array_shift($args);\r\n\t\t\t$value = array_shift($args);\r\n\t\t\tswitch ($key) {\r\n\t\t\t\tcase '-filelist':\r\n\t\t\t\t\t$this->_fileList = $value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '-target':\r\n\t\t\t\t\t$this->_target = $value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '-basedir':\r\n\t\t\t\t\t$this->_basedir = $value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '-jsonFile':\r\n\t\t\t\t\t$this->_jsonFile = $value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tendwhile;\r\n\t}", "function set($key,$val) {\n\t\treturn $this->args[$key]=$val;\n\t}", "public function prepareArguments() {}", "public function setIDfromArgV() {}", "public function setToken()\n\t{\n\t\t $args = phpSmug::processArgs( func_get_args() );\n\t\t $this->oauth_token = $args['id'];\n\t\t $this->oauth_token_secret = $args['Secret'];\n\t}", "public function args(...$args) \n {\n // Si el primer elemento es un array, lo usamos\n if (is_array($args[0])) {\n $args = $args[0];\n }\n $this->args = array_merge($this->args, $args);\n return $this;\n }", "public function modifyValue($value, array $arguments);", "public function setupSupportedArgs($arguments = [])\n {\n $defaults = [\n 'help' => 'The help menu',\n ];\n\n $arguments = array_merge($defaults, $arguments);\n\n $this->supportedArgs = $arguments;\n\n return $this;\n }", "public function setParameters($text, $attributes=array()){\n\t\t$this->_text = $text;\n\t\t$this->_attributes = $attributes;\n\t}", "public function setArguments(array $args = []) : Route\n {\n foreach ($args as $key => $value) {\n $this->setArgument($key, $value);\n }\n return $this;\n }", "function cfg_set(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 2: $CONFIG[$args[0]] = $args[1]; break;\n\t\tcase 3: $CONFIG[$args[0]][$args[1]] = $args[2]; break;\n\t\tcase 4: $CONFIG[$args[0]][$args[1]][$args[2]] = $args[3]; break;\n\t\tcase 5: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]] = $args[4]; break;\n\t\tcase 6: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]] = $args[5]; break;\n\t\tcase 7: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]] = $args[6]; break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}", "abstract public function setOptions($options);", "public function __call($name, $arguments)\n {\n if (Str::of($name)->contains('set')) {\n $name = Str::of($name)\n ->replace('set', '')\n ->snake();\n\n $this->{$name} = Arr::first($arguments);\n\n $this->touchedBySetter[] = (string) $name;\n\n return $this;\n }\n\n return null;\n }", "function AddArgument($key, $value)\r\n\t{\r\n\t\t$this->Argument[$key]=$value;\r\n\t}" ]
[ "0.8156611", "0.80023926", "0.7996254", "0.790754", "0.7613906", "0.74738437", "0.7330983", "0.7298588", "0.7224867", "0.718463", "0.7144116", "0.7020201", "0.6994527", "0.6929971", "0.6839741", "0.67898685", "0.6780602", "0.677659", "0.67068106", "0.662617", "0.66098154", "0.6608342", "0.6587066", "0.6576191", "0.65757185", "0.6551578", "0.6527941", "0.6518246", "0.6507697", "0.64991033", "0.6496289", "0.6480667", "0.64526516", "0.64501554", "0.6444464", "0.6423268", "0.6389179", "0.63848305", "0.63764423", "0.63673586", "0.63589436", "0.63532263", "0.63469064", "0.63444644", "0.63280654", "0.62757885", "0.6229085", "0.62156975", "0.62141675", "0.618977", "0.6184143", "0.6182333", "0.6156304", "0.6156304", "0.6156304", "0.6156243", "0.6150688", "0.6142971", "0.6134426", "0.6107285", "0.6085211", "0.6084519", "0.6072523", "0.6067264", "0.5993112", "0.59709626", "0.5969043", "0.5956718", "0.59539294", "0.592255", "0.5908609", "0.59043825", "0.588775", "0.58783406", "0.5871526", "0.5860563", "0.58579904", "0.58572406", "0.58543193", "0.5834315", "0.582964", "0.5827322", "0.58135474", "0.58120316", "0.5803426", "0.58002883", "0.57961553", "0.57848215", "0.5783449", "0.57692254", "0.57624865", "0.5761386", "0.5733308", "0.5730927", "0.57011056", "0.56970876", "0.56967986", "0.56921315", "0.5686978", "0.56676406" ]
0.6771017
18
Update network URLs Regenerates the URLs for each of the social networks using the URL templates and the current values for the URL arguments.
private function updateNetworks() { foreach ($this->networks as $net_key => $net_value) { $url = $net_value['template']; foreach ($this->args as $arg_key => $arg_value) { $url = str_replace('{' . $arg_key . '}', $arg_value, $url); } $this->networks[$net_key]['url'] = $url; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_network_cache( $networks ) {\n\tforeach ( (array) $networks as $network ) {\n\t\twp_cache_add( $network->id, $network, 'networks' );\n\t}\n}", "function update_network_cache($networks)\n {\n }", "public function generateUrl(): void\n {\n $this->load('urls');\n $createRecords = [];\n\n $existingLanguages = $this->urls->keyBy('language');\n\n foreach (config('unique-urls.languages') as $locale => $lang) {\n $uniqueUrl = Url::makeSlug($this->urlStrategy($lang, $locale), $this);\n $newUrl = $this->urlHandler();\n\n $this->handleExistingUrl($existingLanguages, $lang, $uniqueUrl);\n\n if (! $existingLanguages->has($lang)) {\n $newUrl['language'] = $lang;\n $newUrl['slug'] = $uniqueUrl;\n $createRecords[] = $newUrl;\n }\n }\n\n if (count($createRecords)) {\n $this->urls()->createMany($createRecords);\n }\n }", "abstract public function get_url_update();", "private function setUrls() {\n\t\t$this->url = ($this->env === 'DEVELOPMENT') ? 'https://test.sagepay.com/gateway/service/direct3dcallback.vsp' : 'https://live.sagepay.com/gateway/service/direct3dcallback.vsp';\n\t}", "function tc_get_social_networks() {\r\n $__options = tc__f( '__options' );\r\n\r\n //gets the social network array\r\n $socials = apply_filters( 'tc_default_socials' , TC_init::$instance -> socials );\r\n\r\n //declares some vars\r\n $html = '';\r\n\r\n foreach ( $socials as $key => $data ) {\r\n if ( $__options[$key] != '' ) {\r\n //gets height and width from image, we check if getimagesize can be used first with the error control operator\r\n $width = $height = '';\r\n if ( isset($data['custom_icon_url']) && @getimagesize($data['custom_icon_url']) ) { list( $width, $height ) = getimagesize($data['custom_icon_url']); }\r\n\r\n //there is one exception : rss feed has no target _blank and special icon title\r\n $html .= sprintf('<a class=\"%1$s\" href=\"%2$s\" title=\"%3$s\" %4$s %5$s>%6$s</a>',\r\n apply_filters( 'tc_social_link_class',\r\n sprintf('social-icon icon-%1$s' ,\r\n ( $key == 'tc_rss' ) ? 'feed' : str_replace('tc_', '', $key)\r\n ),\r\n $key\r\n ),\r\n esc_url( $__options[$key]),\r\n isset($data['link_title']) ? call_user_func( '__' , $data['link_title'] , 'customizr' ) : '' ,\r\n ( $key == 'tc_rss' ) ? '' : apply_filters( 'tc_socials_target', 'target=_blank', $key ),\r\n apply_filters( 'tc_additional_social_attributes', '' , $key),\r\n ( isset($data['custom_icon_url']) && !empty($data['custom_icon_url']) ) ? sprintf('<img src=\"%1$s\" width=\"%2$s\" height=\"%3$s\" alt=\"%4$s\"/>',\r\n $data['custom_icon_url'],\r\n $width,\r\n $height,\r\n isset($data['link_title']) ? call_user_func( '__' , $data['link_title'] , 'customizr' ) : ''\r\n ) : ''\r\n );\r\n }\r\n }\r\n return $html;\r\n }", "protected function applyUrl()\n\t{\n\t\t// CSS\n\t\t$nodes = $this->dom->getElementsByTagName('link');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t\t// JS\n\t\t$nodes = $this->dom->getElementsByTagName('script');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Image\n\t\t$nodes = $this->dom->getElementsByTagName('img');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Anchor\n\t\t$nodes = $this->dom->getElementsByTagName('a');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->base_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t}", "function _prime_network_caches( $network_ids ) {\n\tglobal $wpdb;\n\n\t$non_cached_ids = _get_non_cached_ids( $network_ids, 'networks' );\n\tif ( !empty( $non_cached_ids ) ) {\n\t\t$fresh_networks = $wpdb->get_results( sprintf( \"SELECT $wpdb->site.* FROM $wpdb->site WHERE id IN (%s)\", join( \",\", array_map( 'intval', $non_cached_ids ) ) ) );\n\n\t\tupdate_network_cache( $fresh_networks );\n\t}\n}", "public static function generateUrlCache($namespace = ''): void\n {\n if (\\rex_addon::get('url')->isAvailable() && \\rex_version::compare(\\rex_addon::get('url')->getVersion(), '2.0', '>=')) {\n // Delete url addon cache file\n \\Url\\Cache::deleteProfiles();\n // Read profile\n $profiles = '' !== $namespace ? \\Url\\Profile::getByNamespace($namespace) : \\Url\\Profile::getAll();\n foreach ($profiles as $profile) {\n // generate URLs\n $profile->deleteUrls();\n $profile->buildUrls();\n }\n }\n }", "protected function generateLinks()\n {\n if ( ! is_null($this->links) ) {\n foreach ( $this->links as $link ) {\n $this->addLine('<url>');\n $this->addLine('<loc>');\n $this->addLine($this->helpers->url(\n $link->link,\n $this->protocol,\n $this->host\n ));\n $this->addLine('</loc>');\n $this->addLine('<lastmod>' . date_format($link->updated_at, 'Y-m-d') . '</lastmod>');\n $this->addLine('</url>');\n }\n }\n }", "private function replaceURLsCallback($matches) {\n\n preg_match('/(http[s]?)?:\\/\\/([^\\/]+)(.*)?/', $matches[2], $url_matches);\n\n $replacement = $matches[0];\n\n if (!empty($url_matches[0])) {\n\n switch (drupal_strtoupper($this->https)) {\n case 'TO':\n $scheme = 'https';\n break;\n case 'FROM':\n $scheme = 'http';\n break;\n default:\n $scheme = $url_matches[1];\n break;\n }\n\n foreach($this->from_urls as $from_url) {\n\n $match_url = $url_matches[1] . '://' . $url_matches[2];\n\n if ($from_url == $match_url) {\n if (!$this->relative) {\n $replacement = $matches[1] . '=\"' . $scheme . '://';\n $replacement .= $this->toValue . $url_matches[3] . '\"';\n }\n else {\n $replacement = $matches[1] . '=\"' . $url_matches[3] . '\"';\n }\n break;\n }\n\n }\n\n }\n\n if ($replacement !== $matches[0]) {\n\n $this->debug && drush_print(\n t(\n 'URL: !from => !to',\n array(\n '!from' => $matches[0],\n '!to' => $replacement,\n )\n )\n );\n\n }\n\n return $replacement;\n\n }", "public function updateSocial ()\n {\n foreach ($this->user->social as $social_key => $social)\n {\n if($social->url !== $social->full_link)\n {\n if(strpos($social->full_link, $social->contain) === false) {\n $count = count(explode('://', $social->full_link));\n\n if($count > 1) {\n $social->full_link = $social->url;\n }else {\n $social->full_link = strtolower($social->url.$social->full_link);\n }\n }\n }\n }\n\n u()->update([\n 'social' => $this->user->social\n ]);\n\n return $this->message('Settings updated!', 'Social settings successfully updated.', true, $this->user);\n }", "public function updateAllShortURLs(){\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t// We need to get the longURL and drawLink() to match...\n\t\t\tif($urls = $db->get_results(\"SELECT * FROM shorturls WHERE guid<=''\") ){\n\t\t\t\tforeach($urls as $url){\n\t\t\t\t\t// So now we have all of the unassigned urls...\n\t\t\t\t\t// ??????\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function tc_generates_socials() {\r\n $socials = apply_filters( 'tc_default_socials' , TC_init::$instance -> socials );\r\n\r\n //declares some loop's vars and the settings array\r\n $priority = 50;//start priority\r\n $incr = 0;\r\n $socials_setting_control = array();\r\n\r\n foreach ( $socials as $key => $data ) {\r\n $priority += $incr;\r\n $socials_setting_control['tc_theme_options[' . $key . ']'] = array(\r\n 'default' => ( isset($data['default']) && !is_null($data['default']) ) ? $data['default'] : null ,\r\n 'sanitize_callback' => array( $this , 'tc_sanitize_url' ),\r\n 'control' => 'TC_controls' ,\r\n 'label' => ( isset($data['option_label']) ) ? call_user_func( '__' , $data['option_label'] , 'customizr' ) : $key,\r\n 'section' => 'tc_social_settings' ,\r\n 'type' => 'url',\r\n 'priority' => $priority\r\n );\r\n $incr += 5;\r\n }\r\n\r\n return $socials_setting_control;\r\n }", "public function fixRepositoryUrls() {\n\t\t$update_count = 0;\n\n\t\t$packages = $this->Package->find('all', array(\n\t\t\t'contain' => array('Maintainer' => array('id', 'username')),\n\t\t\t'fields' => array('id', 'maintainer_id', 'name'),\n\t\t\t'order' => array('Package.id ASC')\n\t\t));\n\n\t\tforeach ($packages as $package) {\n\t\t\t$this->out(sprintf(\n\t\t\t\t__('Updating package id %s named %s'),\n\t\t\t\t$package['Package']['id'],\n\t\t\t\t$package['Package']['name']\n\t\t\t));\n\n\t\t\tif ($this->Package->fixRepositoryUrl($package)) $update_count++;\n\t\t}\n\n\t\t$this->out(sprintf(__('* Successfully updated %s out of %s package urls'), $update_count, count($packages)));\n\t\t$this->_stop();\n\t}", "public function update(){\n foreach (the()->project->languages as $lang){\n $field=\"url_$lang\";\n if($this->urlExists($this->$field,$lang)){\n $increment=1;\n $url=$this->$field.'-'.$increment;\n while($this->urlExists($url,$lang)){\n $increment++;\n $url=$this->$field.'-'.$increment;\n }\n $this->$field=$url;\n }\n $this->$field=strtolower($this->$field);\n $this->$field=pov()->utils->string->clean($this->$field,\"/\");\n }\n\n\n parent::update();\n\n }", "public static function add_network_settings() {\n\t\tadd_settings_section(\n\t\t\t'cjur-network-settings-section',\n\t\t\t__( 'CSS JS URL Rewriter', 'css-js-url-rewriter' ),\n\t\t\t'__return_false',\n\t\t\t'cjur-network-settings-page'\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'css_js_url_rewriter_cdn_url',\n\t\t\t__( 'CDN URL', 'css-js-url-rewriter' ),\n\t\t\t[ __CLASS__, 'render_field' ],\n\t\t\t'cjur-network-settings-page',\n\t\t\t'cjur-network-settings-section'\n\t\t);\n\t}", "public function get() {\n\n\t\t$args = func_get_args();\n\n\t\tif( empty( $args ) ) {\n\n\t\t\t$networks = $this->_networks;\n\n\t\t} else {\n\t\t\t$networks = array();\n\n\t\t\tforeach ( $args as $network ) {\n\n\t\t\t\tif( in_array( $network, $this->_networks) ) {\n\t\t\t\t\t$networks[] = $network;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$urls = array();\n\n\t\tforeach ( $networks as $network ) {\n\t\t\t$url = call_user_func( array( $this, str_replace( '-', '_', $network ) ) );\n\n\t\t\tif( $url ) {\n\t\t\t\t$urls[ $network ] = $url;\n\t\t\t}\n\t\t}\n\n\t\treturn $urls;\n\t}", "function make_urls() {\n $url = '/search/' . $this->id . '/';\n $this->append_urls('self', $url);\n }", "private function getUrls() {\n\t\t// reassign the array because of a php bug (solved later with php 5.2.x @see: http://bugs.php.net/39449)\n\t\t$arr = $this->formData;\n\n\t\t// build bas URL for replacement variables\n\t\t$protocol\t= 'http'\n . ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ? 's' : '' )\n . '://';\n\t\t$url\t\t= $_SERVER['HTTP_HOST'] . dirname( $_SERVER['PHP_SELF'] ) . '/';\n $url = str_replace( '//', '/', $url ); // some server add 2 /\n $url = $protocol . $url . 'index.php?route=payment/directebanking/';\n\n\t\tif( $this->_param['successUrlStd'] ) {\n\t\t\t$arr['user_variable_0'] = $url . 'success'\n\t\t\t. '&transaction=-TRANSACTION-&security_criteria=-SECURITY_CRITERIA-'\n\t\t\t. '&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['successUrl'] ) {\n\t\t\t\t$arr['user_variable_0'] = $this->_param['successUrl'];\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_param['cancelUrlStd'] ) {\n\t\t\t$arr['user_variable_1'] = $url . 'cancel'\n\t\t\t. '&transaction=-TRANSACTION-&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['cancelUrl'] ) {\n\t\t\t\t$arr['user_variable_1'] = $this->_param['cancelUrl'];\n\t\t\t}\n\t\t}\n\n\t\t// and reassign again\n\t\t$this->formData = $arr;\n\n\t\tunset( $arr );\n\t}", "public function getUrl($network)\n {\n if ($network == '') {\n throw new \\RuntimeException(\"You must choose a social network\", 1);\n }\n\n if (isset($this->definitions[$network]) &&\n isset($this->definitions[$network]['base']) &&\n isset($this->definitions[$network]['query'])) {\n\n $queryString = http_build_query(array_filter($this->definitions[$network]['query']), '', '&amp;', PHP_QUERY_RFC3986);\n\n return $this->definitions[$network]['base'] . \"?\" . $queryString;\n } else {\n throw new \\RuntimeException(\"Social network not found (\" . $network . \")\", 1);\n }\n }", "protected function generateUrls()\n\t{\n\t\t// Video URL array\n\t\t$videoUrl = $this->videoUrl;\n\n\t\t// Array for URLs\n\t\t$urls\t= [];\n\n\t\t$query\t= '';\n\n\t\t$keywords = $this->keywords;\n\n\t\t// Check if there is at least one keyword\n\t\tif(count($keywords) < 1) return false;\n\n\t\t// Setup dev key\n\t\t$devKey = (! is_null($this->developerKey)) ? '&key=' . $this->developerKey : null;\n\n\t\t// Loop keywords\n\t\tforeach($keywords as $keyword)\n\t\t{\n\t\t\t// Check keyword string length\n\t\t\tif(strlen($keyword) < 4) continue;\n\n\t\t\tforeach($this->modList as $modword)\n\t\t\t{\n\t\t\t\t$query = str_replace('-', ' ', Str::slug($modword . ' ' . $keyword));\n\n\t\t\t\t$urls[] = $videoUrl . urlencode($query) . $devKey;\n\t\t\t}\n\t\t}\n\n\t\t// Update the URLs\n\t\t$this->urls = $urls;\n\n\t\treturn $urls;\n\t}", "function cosmetics_get_social_url() {\n\n global $cosmetics_options;\n $cosmetics_social_networks = cosmetics_get_social_network();\n\n foreach( $cosmetics_social_networks as $cosmetics_social ) :\n $cosmetics_social_url = $cosmetics_options['cosmetics_social_network_' . $cosmetics_social['id']];\n\n if( $cosmetics_social_url ) :\n?>\n\n <div class=\"social-network-item item-<?php echo esc_attr( $cosmetics_social['id'] ); ?>\">\n <a href=\"<?php echo esc_url( $cosmetics_social_url ); ?>\">\n <i class=\"fa fa-<?php echo esc_attr( $cosmetics_social['id'] ); ?>\" aria-hidden=\"true\"></i>\n </a>\n </div>\n\n\n<?php\n endif;\n\n endforeach;\n}", "protected function replaceBoundUrlGenerator()\n {\n $this->app->bindShared('url', function ($app) {\n $routes = Collection::make($app['router']->getRoutes())->merge($app['router']->getApiGroups()->getRoutes());\n\n return new UrlGenerator($routes, $app->rebinding('request', function ($app, $request) {\n $app['url']->setRequest($request);\n }));\n });\n }", "function update_refurls()\n{\n\tglobal $database;\n\n\t// IF URL IS NOT EMPTY\n\t$referring_url = $_SERVER[\"HTTP_REFERER\"];\n\tif(strpos(strtolower($referring_url), strtolower($_SERVER[\"HTTP_HOST\"])) !== FALSE) { return; }\n\n\tif( $referring_url )\n {\n\t // IS URL ALREADY IN DATABASE? IF YES, ADD TO HITS. IF NO, ADD NEW ROW\n\t $referring_url = str_replace(\"http://www.\", \"http://\", $referring_url);\n\t $database->database_query(\"\n INSERT INTO se_statrefs\n (statref_hits, statref_url)\n VALUES\n ('1', '{$referring_url}')\n\t\t\tON DUPLICATE KEY UPDATE\n statref_hits=statref_hits+1\n \");\n \n\t // IF 1000 ROWS REACHED, DELETE ONE TO MAKE ROOM\n\t $refurl_totalrows = $database->database_num_rows($database->database_query(\"SELECT statref_id FROM se_statrefs\"));\n \n\t if( $refurl_totalrows > 1000 )\n $database->database_query(\"DELETE FROM se_statrefs WHERE statref_hits='1' ORDER BY statref_id ASC LIMIT 1\");\n\t}\n}", "function wp_update_urls_to_https()\n {\n }", "function forschungsatlas_admin_url() {\n global $pager_total_items;\n $destination = drupal_get_destination();\n\n drupal_set_title(t('Institutions with broken links'));\n\n $header = array();\n $header[] = array('data' => t('Institution'), 'field' => 'name', 'sort' => 'asc');\n $header[] = array('data' => t('City'), 'field' => 'city');\n $header[] = array('data' => t('Federal State'), 'field' => 'federalstate');\n $header[] = array('data' => t('URL'), 'field' => 'url');\n $header[] = array('data' => t('Updated'), 'field' => 'changed');\n $header[] = array('data' => t('Operation'));\n\n $query = db_select('forschungsatlas__tools_broken_links', 'urls')->extend('PagerDefault')->extend('TableSort');\n $query->join('forschungsatlas__institutions', 'i', 'urls.iid=i.iid');\n $query->join('forschungsatlas__cities', 'c', 'i.cid = c.cid');\n $query->join('forschungsatlas__federal_states', 'fs', 'i.fsid = fs.fsid');\n $query->fields('i', array('iid', 'name', 'url', 'changed'));\n $query->addField('c', 'name', 'city');\n $query->addField('fs', 'name', 'federalstate');\n $query->limit(FORSCHUNGSATLAS_PAGER)\n ->orderByHeader($header);\n $result = $query->execute();\n\n $rows = array();\n foreach ($result as $data) {\n $row = array();\n $row['data']['name'] = check_plain($data->name);\n $row['data']['city'] = check_plain($data->city);\n $row['data']['federalstate'] = $data->federalstate;\n $url = check_url($data->url);\n $row['data']['url'] = l($url, $url, array(\n 'attributes' => array(\n 'target'=>'blank',\n 'class' => 'forschungsatlas-institution-l-ext',\n )\n )\n );\n $row['data']['changed'] = format_date($data->changed, 'short');\n $operations = array();\n $operations['edit'] = array(\n 'title' => t('edit'),\n 'href' => FORSCHUNGSATLAS_CONFIG_PATH. '/institutions/institution/'. $data->iid .'/edit',\n 'query' => $destination,\n );\n $row['data']['operations'] = array(\n 'data' => array(\n '#theme' => 'links',\n '#links' => $operations,\n '#attributes' => array('class' => array('links', 'inline', 'nowrap')),\n ),\n );\n $rows[] = $row;\n } // foreach()\n $build['forschungsatlas_table'] = array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#empty' => t('There are no institutions with broken links.'),\n '#attributes' => array('id' => 'forschungsatlas-table-url'),\n '#caption' => (!empty($pager_total_items[0]) ? format_plural($pager_total_items[0], '1 result', '@count results') : ''),\n );\n $build['forschungsatlas_pager'] = array(\n '#markup' => theme('pager'),\n );\n\n return $build;\n}", "public function update_storage_network() {\n\t\t// get any network stored data.\n\t\t$network_data = get_network_option( null, self::STORAGE_KEY );\n\t\t$current_blog_id = get_current_blog_id();\n\t\t$data_updated = false;\n\t\tif (\n\t\t\t! isset( $network_data['site'][ $current_blog_id ] )\n\t\t\t|| ( isset( $network_data['site'][ $current_blog_id ] ) && $network_data['site'][ get_current_blog_id() ] !== $this->data )\n\t\t) {\n\t\t\t$network_data['site'][ $current_blog_id ] = $this->data;\n\t\t\t// if the network doesn't have data for this site or the data it\n\t\t\t// has is differs then perform the update.\n\t\t\t$network_wide_list = array();\n\t\t\tforeach ( $network_data['site'] as $list ) {\n\t\t\t\t// loop through each item in a site and add uniques to a list.\n\t\t\t\tforeach ( $list as $item ) {\n\t\t\t\t\tif ( ! in_array( $item, $network_wide_list, true ) ) {\n\t\t\t\t\t\t$network_wide_list[] = $item;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// save the data on the network with the latest list and the current\n\t\t\t// sites data updated in it.\n\t\t\t$network_data['list'] = $network_wide_list;\n\t\t\t// update the site data on the network.\n\t\t\t$data_updated = update_network_option( null, self::STORAGE_KEY, $network_data );\n\t\t}\n\t\treturn $data_updated;\n\t}", "function wp_update_network_site_counts($network_id = \\null)\n {\n }", "public function updateCommunities(&$communities)\n {\n $urls = [];\n\n foreach ($communities as $community) {\n $urls [] = 'https://plus.google.com/communities/' . $community['id'];\n }\n $results = $this->curl->get_multi($urls);\n\n $html = new simple_html_dom();\n\n foreach ($results as $index => $result) {\n if (!$result) {\n $communities[$index]['categories'] = 'Loading failed.';\n $communities[$index]['members'] = 'Loading failed.';\n continue;\n }\n $html->load($result);\n\n // Categories\n $categories = $this->scrapeCategories($html);\n\n // Member count\n $member_count = $this->scrapeMembers($html);\n\n $communities[$index]['categories'] = sizeof($categories);\n $communities[$index]['members'] = $member_count;\n\n session([\n 'nxs_gp.category_name.' . $communities[$index]['id'] => $communities[$index]['name'],\n 'nxs_gp.categories.' . $communities[$index]['id'] => $categories,\n 'nxs_gp.members.' . $communities[$index]['id'] => $member_count\n ]);\n }\n }", "function process_feed_urls_actions() {\n\t\t\tglobal $movies;\n\t\t\t\n\t\t\tif ( ( isset( $_POST['movies-feed-urls-action'] ) ) && ( $_POST['movies-feed-urls-action'] == 'feed-urls-update' ) ) {\n\t\t\t\t\t\n\t\t\t\tif ( wp_verify_nonce( $_POST['movies-feed-urls-update-wpnonce'], 'movies-feed-urls-update' ) ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( (isset( $_POST['movies-feeds-purge'] ) ) && ( $_POST['movies-feeds-purge'] == 'yes' ) ) {\n\t\t\t\t\t\t$movies_feeds_purge = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$movies_feeds_purge = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$movies->movies_xml_processor->process_all_feeds( true, $movies_feeds_purge );\n\t\t\t\t\t\t\n\t\t\t\t\t?><div id=\"movies-feed-urls-processed\" class=\"updated below-h2\"><p><?php _e('XML Feeds Processed', 'movies'); ?></p></div><?php\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function social_network(){\r\n\t\tif($this->logged_in){\r\n\t\t\t\r\n\t\t\t$networks = Kohana::config('social_network.networks');\r\n\t\t\t$save_data = $this->input->post('save_data',null);\r\n\t\t\tif($save_data){\r\n\t\t\t\tforeach($networks as $network){\r\n\t\t\t\t\t$fieldname = str_replace(\".\",\"\",$network);\r\n\t\t\t\t\t$this->user->$fieldname = $this->input->post($fieldname, null, true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->user->save();\r\n\t\t\t\techo json_encode(array('msg'=>'ok', 'data'=>''));\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\r\n\t\t\t$view = new View('social_network');\r\n\t\t\t$view->networks = $networks;\r\n\t\t\t$view->lang = Kohana::lang('user');\r\n\t\t\t$view->user = $this->user;\r\n\t\t\r\n\t\t\t$view->render(TRUE);\r\n\t\t} else Kohana::show_404();\r\n\t}", "function _prime_network_caches($network_ids)\n {\n }", "protected function setAuthorsLinks() {\r\n\t\t$authors = $this->getAuthors();\r\n\t\tif (!empty($authors)) {\r\n\t\t\tforeach ($this->settings['site']['authors'] as $author) {\r\n\t\t\t\tif (in_array(trim($author['name']), $authors) && !empty($author['uri'])) {\r\n\t\t\t\t\t$typolink_conf = array(\r\n\t\t\t\t\t\t\"parameter\" => $author['uri'],\r\n\t\t\t\t\t\t\"forceAbsoluteUrl\" => 1,\r\n\t\t\t\t\t\t\"useCacheHash\" => 0);\r\n\t\t\t\t\t$this->authorsLinks[] = $this->getUri($typolink_conf);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function prepare_links($widget_type)\n {\n }", "protected function createUrls($questions, &$data)\n {\n $qtypelist = getQuestionTypeList('', 'array');\n $data['questionurls'] = array();\n $data['editurls'] = array();\n $data['conditionsUrls'] = array();\n $data['deleteUrls'] = array();\n $data['typeDescriptions'] = array();\n foreach ($questions as $question) {\n $data['questionurls'][$question->qid] = $this->api->createUrl(\n '/admin/questions',\n array(\n 'sa' => 'view',\n 'surveyid' => $data['surveyid'],\n 'qid' => $question->qid\n )\n );\n\n $data['editurls'][$question->qid] = $this->api->createUrl(\n '/admin/questions',\n array(\n 'sa' => 'editquestion',\n 'surveyid' => $data['surveyid'],\n 'qid' => $question->qid,\n 'gid' => $question->gid\n )\n );\n\n $data['conditionsUrls'][$question->qid] = $this->api->createUrl(\n '/admin/conditions',\n array(\n 'sa' => 'index',\n 'subaction' => 'editconditionsform',\n 'surveyid' => $data['surveyid'],\n 'qid' => $question->qid,\n 'gid' => $question->gid\n )\n );\n\n $data['deleteUrls'][$question->qid] = $this->api->createUrl(\n 'admin/questions/',\n array(\n 'sa' => 'delete',\n 'surveyid' => $data['surveyid'],\n 'gid' => $question->gid,\n 'qid' => $question->qid,\n )\n );\n\n if ($qtypelist[$question->type]['hasdefaultvalues'] > 0) {\n $data['defaultAnswersUrls'][$question->qid] = $this->api->createUrl(\n 'admin/questions',\n array(\n 'sa' => 'editdefaultvalues',\n 'surveyid' => $data['surveyid'],\n 'gid' => $question->gid,\n 'qid' => $question->qid\n )\n );\n }\n\n if ($qtypelist[$question->type]['subquestions'] > 0) {\n $data['subquestionsUrls'][$question->qid] = $this->api->createUrl(\n 'admin/questions',\n array(\n 'sa' => 'subquestions',\n 'surveyid' => $data['surveyid'],\n 'qid' => $question->qid,\n 'gid' => $question->gid\n )\n );\n }\n\n if ($qtypelist[$question->type]['answerscales'] > 0) {\n $data['answerOptionsUrls'][$question->qid] = $this->api->createUrl(\n 'admin/questions',\n array(\n 'sa' => 'answeroptions',\n 'surveyid' => $data['surveyid'],\n 'qid' => $question->qid,\n 'gid' => $question->gid\n )\n );\n }\n\n $data['typeDescriptions'][$question->qid] = $qtypelist[$question->type];\n }\n }", "protected function setUpWebsites()\n {\n\t Piwik_SitesManager_API::getInstance()->setGlobalSearchParameters($searchKeywordParameters='gkwd', $searchCategoryParameters='gcat');\n\t self::createWebsite(Piwik_Date::factory($this->dateTime)->subHour(200)->getDatetime(), 0, \"Site 1 - Site search\", $siteurl=false, $search=1, $searchKwd='q,mykwd,p', $searchCat='cats' );\n\t self::createWebsite(Piwik_Date::factory($this->dateTime)->subHour(400)->getDatetime(), 0, \"Site 2 - Site search use default\", $siteurl = false, $search=1, $searchKwd='', $searchCat='' );\n\t self::createWebsite(Piwik_Date::factory($this->dateTime)->subHour(600)->getDatetime(), 0, \"Site 3 - No site search\", $siteurl = false, $search=0);\n }", "private function convertLinks(){\n\t\tif(!isset($this->course['course_links']))\n\t\t\treturn;\n\t\t\n\t\t//Create folder in tmp for links\n mkdir('./tmp/links');\n\t\t$sectionCounter = 0;\n\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Links');\n\n $section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n \n\t\t//First add all general links\n\t\t\n\t\tforeach($this->course['course_links'] as $link_url)\n\t\t{\n\t\t\tif(intval($link_url['category'])==0)\n\t\t\t{\n\t\t\t\t//Create the xml\n\t\t\t\tHelper::createLinkXML($link_url);\t\t\t\t\n\t\n\t\t\t\t//Edit the manifest\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 0);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tforeach($this->course['course_link_categories'] as $cat)\n\t\t{\n\t\t\t//Add the label to the manifest\n\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $cat['name'], 0);\n\n\t\t\t//Add links below the label\n\t\t\tforeach($this->course['course_links'] as $link_url)\n\t\t\t{\n\t\t\t\tif(intval($link_url['category'])==$cat['id'])\n\t\t\t\t{\n\t\t\t\t\t//Create the xml\n\t Helper::createLinkXML($link_url); \n\t\t\t\t\t\n \t\t//Edit the manifest\n\t\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 1);\n \t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t\t\t\n\t\t\n\t}", "protected function updateBrokenLinks() {}", "public function setGatewayUrls(array $urls)\n {\n if (!empty($urls['sandbox']))\n {\n $this->_gatewayUrlSandbox = (string)$urls['sandbox'];\n }\n\n if (!empty($urls['live']))\n {\n $this->_gatewayUrlLive = (string)$urls['live'];\n }\n }", "function drush_ti_amg_fw_topics_urls() {\n $batch = array();\n $batch_nodes = array();\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')->entityCondition('bundle', array('topic_page_child'), 'IN');\n $result = $query->execute();\n\n if ($result['node']) {\n $batch_nodes = array_keys($result['node']);\n }\n\n foreach ($batch_nodes as $nid) {\n $batch['operations'][] = array(\n '_ti_amg_fw_topics_do_drush_fix_urls',\n array(\n $nid,\n ),\n );\n }\n\n $batch['finished'] = '_ti_amg_fw_topics_do_drush_fix_urls_finished';\n batch_set($batch);\n drush_backend_batch_process();\n}", "function migrate_multisite_files_update_url( $oldurl, $newurl, $blog_id ){\t\n\tglobal $wpdb, $urls_changed;\n\n\t$oldurl = esc_attr($oldurl);\n\t$newurl = esc_attr($newurl);\n\t\n\t$queries = array(\n\t\t'content' => \t\t'UPDATE `' . $wpdb->prefix . $blog_id . '_posts` SET post_content = replace(post_content, %s, %s)',\n\t\t'excerpts' =>\t\t'UPDATE `' . $wpdb->prefix . $blog_id . '_posts` SET post_excerpt = replace(post_excerpt, %s, %s)',\n\t\t'attachments' =>\t'UPDATE `' . $wpdb->prefix . $blog_id . '_posts` SET guid = replace(guid, %s, %s) WHERE post_type = \"attachment\"',\n\t\t'postmeta' =>\t\t'UPDATE `' . $wpdb->prefix . $blog_id . '_postmeta` SET meta_value = replace(meta_value, %s, %s)',\n\t\t'options' =>\t\t'UPDATE `' . $wpdb->prefix . $blog_id . '_postmeta` SET option_value = replace(option_value, %s, %s)'\n\t);\n\t\n\tforeach( $queries as $option => $query ){\n\t\tswitch( $option ){\n\t\t\tcase 'postmeta':\n\t\t\t\t$postmeta = $wpdb->get_results( 'SELECT * FROM `' . $wpdb->prefix . $blog_id . '_postmeta` WHERE meta_value != \"\"', ARRAY_A );\n\t\t\t\n\t\t\t\tforeach( $postmeta as $key => $item ) {\n\t\t\t\t\t// if the string is empty then dont bother and continue\n\t\t\t\t\tif( trim( $item['meta_value'] ) == '' ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// we have a possibel suspect lets check if it is serialized\n\t\t\t\t\tif ( is_serialized( $item['meta_value'] ) ) { \n\t\t\t\t\t\t$edited = migrate_multisite_files_unserialize_replace( $oldurl, $newurl, $item['meta_value'] );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// we are not serialized so we can replace directly\n\t\t\t\t\t\t$edited = str_ireplace( $oldurl, $newurl, $item['meta_value'], $count );\n\t\t\t\t\t\t$urls_changed += $count;\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\tif( $edited != $item['meta_value'] ){\n\t\t\t\t\t\t$fix = $wpdb->query( $wpdb->prepare( 'UPDATE `' . $wpdb->prefix . $blog_id . '_postmeta` SET meta_value = \"%s\" WHERE meta_id = %s', $edited, $item['meta_id'] ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'options':\n\t\t\t\t$postmeta = $wpdb->get_results( 'SELECT * FROM `' . $wpdb->prefix . $blog_id . '_options` WHERE option_value != \"\"', ARRAY_A );\n\t\t\t\n\t\t\t\tforeach( $postmeta as $key => $item ) {\n\t\t\t\t\t// if the string is empty then dont bother and continue\n\t\t\t\t\tif( trim( $item['option_value'] ) == '' ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// we have a possibel suspect lets check if it is serialized\n\t\t\t\t\tif ( is_serialized( $item['option_value'] ) ) { \n\t\t\t\t\t\t$edited = migrate_multisite_files_unserialize_replace( $oldurl, $newurl, $item['option_value'] );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// we are not serialized so we can replace directly\n\t\t\t\t\t\t$edited = str_ireplace( $oldurl, $newurl, $item['option_value'], $count );\n\t\t\t\t\t\t$urls_changed += $count;\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\tif( $edited != $item['option_value'] ){\n\t\t\t\t\t\t$fix = $wpdb->query( $wpdb->prepare( 'UPDATE `' . $wpdb->prefix . $blog_id . '_options` SET option_value = \"%s\" WHERE option_id = %s', $edited, $item['option_id'] ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$result = $wpdb->query( $wpdb->prepare( $query, $oldurl, $newurl) );\n\t\t\t\n\t\t\t\tif ( FALSE !== $result && 0 < $result ) {\n\t\t\t\t\t$urls_changed += $result;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\t//return $results;\t\t\t\n}", "public function updateNews() {\n\n $this->_useSourceDatasource();\n\n // Find up to x random news sources that are earmarked to be updated\n $sources = $this->_externalNewsSourceDatasource->getNewsSourcesToUpdate();\n\n // Early exit if there are no sources to update\n if (count($sources) == 0) return;\n\n $this->_useCategoryDatasource();\n $this->_useItemDatasource();\n\n $updatedCategories = array(); // For noting down which categories got updated, for later garbage collection pruning\n\n // Run through sources, fetch latest content\n foreach($sources as $source) {\n try {\n $feed = Zend_Feed::import($source->sourceUrl);\n } catch (Zend_Feed_Exception $e) {\n // Feed import failed\n // TODO: log failure!\n }\n\n // We don't really use this bit just yet, it's already assumed from $source\n $channel = array(\n 'title' => $feed->title(),\n 'link' => $feed->link(),\n 'description' => $feed->description()\n );\n\n // Run through items and process into database\n foreach ($feed as $feedItem) {\n $item = new Model_Cms_ExternalNews_Item();\n\n $item->linkUrl = $feedItem->link();\n $item->guidHash = md5($feedItem->guid());\n $item->publishDate = new Zend_Date($feedItem->pubDate());\n\n $item->title = htmlentities($feedItem->title(), ENT_QUOTES, 'UTF-8');\n $item->summary = htmlentities($feedItem->description(), ENT_QUOTES, 'UTF-8');\n // If title and summary are the same, this is probably a from a\n // Twitter feed and needs special treatment\n if ($item->title == $item->summary) {\n // Check if there's a \"[username]: \" start to the title to split out\n if (preg_match('/^(\\w+): (.*)$/', $item->title, $matches) > 0) {\n // Definitely a Twitter item, put Twitter username in title and remainder in summary\n $item->title = $matches[1];\n $item->summary = $matches[2];\n\n // Detect if a Twitter URL is present (only takes the\n // first one) and extract it if so\n if (preg_match('/(https?:\\/\\/t\\.co\\/\\w+)/', $item->summary, $matches) > 0) {\n $item->linkUrl = $matches[1];\n }\n } else {\n // Can't split item, just empty summary\n $item->summary = '';\n }\n } else {\n // Strip any HTML junk from summary, eg, like that which Reuters adds in (see http://mf.feeds.reuters.com/reuters/UKTopNews)\n $item->summary = preg_replace('/&lt;(.*?)&gt;/', '', $item->summary);\n // Strip any newlines and tabs\n $item->summary = preg_replace('/(\\n|\\t)/', '', $item->summary);\n // Trim what's left\n $item->summary = trim($item->summary);\n }\n // Sort out ampersands in category names, as the BBC likes to mix and match\n $categoryName = $source->defaultCategory; //isset($item['category']) ? str_replace('&', 'and', $item['category']) : $ns_defaultCategory;\n // Filter missing categories or blanket categories\n if ($categoryName == '' || $categoryName == 'topNews') {\n $categoryName = 'Top Stories';\n }\n // Make category name web safe\n $categoryName = htmlentities($categoryName, ENT_QUOTES);\n\n // Get category ID by category name and source ID\n $item->categoryId = $this->_existingCategory($categoryName, $source->id);\n\n // Is this category new for this feed?\n if ($item->categoryId === false) {\n // Add new category\n $this->_externalNewsCategoryDatasource->addCategory($categoryName, $source->id);\n // Refresh running categories list\n $this->_categoryList = $this->_externalNewsCategoryDatasource->getAllCategories();\n // Set category ID for item\n $item->categoryId = $this->_existingCategory($categoryName, $source->id);\n }\n\n // Note down that this category has recently been updated from feed (for later garbage collection pruning)\n $updatedCategories[$item->categoryId] = $item->categoryId;\n\n // INSERT or UPDATE news item\n $this->_externalNewsItemDatasource->upsertItem($item);\n }\n\n // Mark updated categories as updated - holds off garbage collection\n foreach ($updatedCategories as $updatedCategoryId) {\n $this->_externalNewsCategoryDatasource->markCategoryUpdated($updatedCategoryId);\n }\n\n // Mark news source as updated - holds off refetch\n $this->_externalNewsSourceDatasource->markSourceUpdated($source->id);\n }\n }", "public function addSiteLinks()\n {\n foreach ($this->getSiteLinks() as $item) {\n $this->addArray($item);\n }\n }", "protected function reindexNewURLs() {\n\t\tif ($this->commandLineOptions->hasOption(tx_mnogosearch_clioptions::REINDEX)) {\n\t\t\t$this->showProgressMessage('Going to reindex new URLs.');\n\t\t\t$urlFileName = $this->generateURLListFile();\n\t\t\tif ($urlFileName != '') {\n\t\t\t\t$this->indexer->indexURLs($urlFileName);\n\t\t\t\t@unlink($urlFileName);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->showProgressMessage('No new URLs found.');\n\t\t\t}\n\t\t}\n\t}", "private function updateUrls($url,$dataArr,$module)\n\t{\n\t\t$whichImage = IMAGE_SERVER_IMAGE_TYPE_ENUM::getImageType($dataArr[\"IMAGE_TYPE\"],$dataArr[\"MODULE_NAME\"]);\n\t\t$paramArr[$whichImage] = $url;\n\t\tif($paramArr && is_array($paramArr) && $dataArr[\"MODULE_ID\"])\n\t\t{\n\t\t\t$modObj = UpdateModuleTableFactory::getModuleObject($module);\n\t\t\t$status = $modObj->edit($paramArr,$dataArr[\"MODULE_ID\"],$dataArr[\"PROFILEID\"]);\n\t\t\tunset($modObj);\n\t\t}\n\t\treturn $status;\n\t}", "public function getHtmlNetwork() {\n $ntworks = array(\n \n 'facebook',\n 'twitter',\n 'linkedin',\n 'pinterest',\n 'youtube',\n 'google',\n 'myspace',\n \n );\n \n $networks = array();\n \n foreach($ntworks as $name) {\n \n if (\n array_key_exists($name,$this->configWeb)\n && !empty($this->configWeb[$name])\n ) {\n $networks[$this->getUrl($name)] = $this->getImageSkin($name);\n }\n \n }\n \n $tplNetworks = Template::getWebsiteView('widgets/networks',$this->getTheme());\n ob_start(); if (is_file($tplNetworks)) { include $tplNetworks; } $out = ob_get_clean();\n \n return $out;\n \n }", "public function testUpdateDomains()\n {\n $this->browse(function (Browser $browser) {\n $this->login($browser);\n\n foreach (Domain::where('is_updated', false)->get() as $domain) {\n $this->updateNameservers($browser, $domain);\n $this->updateForwarding($browser, $domain);\n\n $domain->is_updated = true;\n $domain->save();\n }\n });\n }", "function forschungsatlas_admin_url_rebuild($form, &$form_state) {\n $num_rows = forschungsatlas_find_broken_links();\n if ($num_rows > 0) {\n drupal_set_message(t('The list has been updated.'));\n }\n else {\n drupal_set_message(t('There is nothing to be updated.'));\n }\n drupal_goto(FORSCHUNGSATLAS_CONFIG_PATH. '/tools/url');\n}", "private function loadURLs()\r\n\t{\r\n\t\t$status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\t\tforeach ($this->url as $scriptname => $modes)\r\n\t\t\t$this->url_script[$scriptname] = $modes[$status];\r\n\t}", "function wp_update_network_counts($network_id = \\null)\n {\n }", "public function update()\n {\n \n foreach($this->feed->sources as $source){\n \n //Find the right source handler.\n switch($source->type->get()){\n \n case 'TWITTER_TIMELINE':\n $handler = new TwitterTimelineSourceHandler($source);\n break;\n \n case 'TWITTER_SEARCH':\n $handler = new TwitterSearchSourceHandler($source);\n break;\n \n }\n \n //Query for new messages.\n $messages = $handler->query();\n \n //Save those messages.\n mk('Logging')->log('Message board', 'New messages', $messages->size());\n foreach($messages as $message){\n $message\n ->save()\n ->save_webpages()\n ->save_images();\n }\n \n }\n \n }", "public function generateRequests()\n {\n if ($this->ready) {\n foreach ($this->data_requests as $uuid => $request) {\n $request->setFormattedURL($this->endpoint->url);\n }\n \n if (!empty($this->data_requests)) {\n $this->has_requests = true;\n }\n }\n }", "public function getUrl(){\n $urls = [];\n $url_rules = [];\n //Получаем массив URL из таблицы Sef\n $pages = PagesHelper::select(Yii::$app->params['pages'],[],[['attr_name' => 'is_active', 'operand'=> '=', 'value'=> '1'],\n ['attr_name' => 'show_sitemap', 'operand'=> '=', 'value'=> '1']]);\n\n //'shini_legko/all_sizes/R-<radius:\\d+>' => 'shini/radius',//все товары с выбраным радиусом\n $SQL = 'SELECT radius FROM tyres_radius WHERE is_passenger = 1';\n $tyres_radius = Yii::$app->db->createCommand($SQL)->queryColumn();\n foreach ($tyres_radius AS $tr){\n $tr = str_replace('.00','',(string)$tr);\n $url_rules[] = Url::to(['shini/radius', 'radius'=>$tr]);\n }\n unset($tyres_radius);\n\n //'shini_legko/all_sizes/R-<radius:\\d+>/<width:\\d+>-<profile:\\d+>' =>\n // 'shini/size',//все товары с выбраным размером\n $SQL = 'SELECT size_width, size_profile, radius\n FROM tyres_sizes \n JOIN tyres_radius ON tyres_radius.id = tyres_sizes.id_radius\n WHERE tyres_radius.is_passenger = 1';\n $tyres_sizes = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($tyres_sizes AS $ts){\n $url_rules[] = Url::to(['shini/size',\n 'radius'=>str_replace('.00','',(string)$ts['radius']),\n 'width'=>$ts['size_width'],\n 'profile'=>str_replace('.00','',(string)$ts['size_profile'])]);\n }\n unset($tyres_sizes);\n\n //'shini_legko/producers/<alias:\\S+>' => 'shini/producer',//все шины одного производителя\n //'shini_gruz/producers/<alias:\\S+>' => 'shini/gruz_producer',//все шины одного производителя\n $SQL = 'SELECT alias, is_truck, is_passenger FROM tyres_vendors';\n $tyres_vendors = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($tyres_vendors AS $tyres_vendor){\n if($tyres_vendor['is_passenger'])\n $url_rules[] =\n Url::to(['shini/producer',\n 'alias'=>$tyres_vendor['alias']]);\n if($tyres_vendor['is_truck'])\n $url_rules[] =\n Url::to(['shini/gruz_producer',\n 'alias'=>$tyres_vendor['alias']]);\n\n }\n unset($tyres_vendors);\n\n //'shini_legko/producers/<vendor:\\S+>/<model:\\S+>' => 'shini/model_tyre',//модель шины\n //'shini_gruz/producers/<vendor:\\S+>/<model:\\S+>' => 'shini/gruz_model_tyre',//модель шины\n $SQL = 'SELECT type, tyres_models.alias, tyres_vendors.alias AS vendor_alias FROM tyres_models\n JOIN tyres_vendors ON tyres_vendors.id_vendor = tyres_models.id_vendor';\n $tyres_models = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($tyres_models AS $tyres_model){\n if($tyres_model['type'] < 6)\n $url_rules[] =\n Url::to(['shini/model_tyre',\n 'vendor'=>$tyres_model['vendor_alias'],\n 'model'=>$tyres_model['alias']]);\n else\n $url_rules[] =\n Url::to(['shini/gruz_model_tyre',\n 'vendor'=>$tyres_model['vendor_alias'],\n 'model'=>$tyres_model['alias']]);\n }\n unset($tyres_models);\n\n //'shini_legko/producers/<vendor:\\S+>/<model:\\S+>/<id:\\d+>' => 'shini/tyre',//шина\n //'shini_gruz/producers/<vendor:\\S+>/<model:\\S+>/<id:\\d+>' => 'shini/gruz_tyre',//шина\n $SQL = 'SELECT type, tyres_models.alias AS model_alias, tyres_vendors.alias AS vendor_alias, id_size \n FROM tyres_model_sizes\n JOIN tyres_models ON tyres_models.id_model = tyres_model_sizes.id_model\n JOIN tyres_vendors ON tyres_vendors.id_vendor = tyres_models.id_vendor\n WHERE tyres_model_sizes.price > 0';\n $tyres_model_sizes = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($tyres_model_sizes AS $tyres_model_size){\n if($tyres_model_size['type'] < 6)\n $url_rules[] =\n Url::to(['shini/tyre',\n 'vendor'=>$tyres_model_size['vendor_alias'],\n 'model'=>$tyres_model_size['model_alias'],\n 'id'=>$tyres_model_size['id_size']]);\n else\n $url_rules[] =\n Url::to(['shini/gruz_tyre',\n 'vendor'=>$tyres_model_size['vendor_alias'],\n 'model'=>$tyres_model_size['model_alias'],\n 'id'=>$tyres_model_size['id_size']]);\n }\n unset($tyres_model_sizes);\n\n //'shini_legko/vendors_auto/<alias:\\S+>' => 'shini/vendor_auto', //все модели текущей марки авто\n //'wheels/vendors_auto/<alias:\\S+>'=> 'wheels/vendor_auto', //все модели текущей марки авто\n $SQL = 'SELECT alias FROM vehicles_vendors';\n $vehicles_vendors = Yii::$app->db->createCommand($SQL)->queryColumn();\n foreach ($vehicles_vendors AS $vehicles_vendor){\n $url_rules[] =\n Url::to(['shini/vendor_auto',\n 'alias'=>$vehicles_vendor,]);\n $url_rules[] =\n Url::to(['wheels/vendor_auto',\n 'alias'=>$vehicles_vendor,]);\n }\n unset($vehicles_vendors);\n\n //'wheels/R-<radius:\\d+>' => 'wheels/radius',//все товары с выбраным радиусом\n $SQL = 'SELECT radius FROM wheels_radius WHERE is_passenger = 1';\n $wheels_radius = Yii::$app->db->createCommand($SQL)->queryColumn();\n foreach ($wheels_radius AS $wr){\n $url_rules[] = Url::to(['wheels/radius', 'radius'=>$wr]);\n }\n unset($wheels_radius);\n\n //'wheels/producers/<alias:\\S+>' => 'wheels/producer',//все диски одного производителя\n //'wheels_gruz/producers/<alias:\\S+>' => 'wheels/gruz_producer',//все диски одного производителя\n $SQL = 'SELECT alias, is_truck, is_passenger FROM wheels_vendors';\n $wheels_vendors = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($wheels_vendors AS $wheels_vendor){\n if($wheels_vendor['is_passenger'])\n $url_rules[] =\n Url::to(['wheels/producer',\n 'alias'=>$wheels_vendor['alias']]);\n if($wheels_vendor['is_truck'])\n $url_rules[] =\n Url::to(['wheels/gruz_producer',\n 'alias'=>$wheels_vendor['alias']]);\n }\n unset($wheels_vendors);\n\n //'wheels/producers/<vendor:\\S+>/<model:\\S+>' => 'wheels/model_wheel',//модель диска\n //'wheels_gruz/producers/<vendor:\\S+>/<model:\\S+>' => 'wheels/gruz_model_wheel',//модель диска\n $SQL = 'SELECT type, wheels_models.model_alias, wheels_vendors.alias AS vendor_alias FROM wheels_models\n JOIN wheels_vendors ON wheels_vendors.id_vendor = wheels_models.id_vendor';\n $wheels_models = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($wheels_models AS $wheels_model){\n if($wheels_model['type'] != 2)\n $url_rules[] =\n Url::to(['wheels/model_wheel',\n 'vendor'=>$wheels_model['vendor_alias'],\n 'model'=>$wheels_model['model_alias']]);\n else\n $url_rules[] =\n Url::to(['wheels/gruz_model_wheel',\n 'vendor'=>$wheels_model['vendor_alias'],\n 'model'=>$wheels_model['model_alias']]);\n }\n unset($wheels_models);\n\n //'wheels/producers/<vendor:\\S+>/<model:\\S+>/<id:\\d+>' => 'wheels/wheel',//диск\n //'wheels_gruz/producers/<vendor:\\S+>/<model:\\S+>/<id:\\d+>' => 'wheels/gruz_wheel',//диск\n $SQL = 'SELECT type, wheels_models.model_alias, wheels_vendors.alias AS vendor_alias, id_size \n FROM wheels_model_sizes\n JOIN wheels_models ON wheels_models.id_model = wheels_model_sizes.id_model\n JOIN wheels_vendors ON wheels_vendors.id_vendor = wheels_models.id_vendor\n WHERE wheels_model_sizes.price > 0';\n $wheels_model_sizes = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($wheels_model_sizes AS $wheels_model_size){\n if($wheels_model_size['type'] != 2)\n $url_rules[] =\n Url::to(['wheels/wheel',\n 'vendor'=>$wheels_model_size['vendor_alias'],\n 'model'=>$wheels_model_size['model_alias'],\n 'id'=>$wheels_model_size['id_size']]);\n else\n $url_rules[] =\n Url::to(['wheels/gruz_wheel',\n 'vendor'=>$wheels_model_size['vendor_alias'],\n 'model'=>$wheels_model_size['model_alias'],\n 'id'=>$wheels_model_size['id_size']]);\n }\n unset($wheels_model_sizes);\n\n //'news/<alias:\\S+>' => 'news/new'\n $SQL = 'SELECT alias FROM news WHERE is_active = 1';\n $news = Yii::$app->db->createCommand($SQL)->queryColumn();\n foreach ($news AS $new){\n $url_rules[] = Url::to(['news/new','alias'=>$new,]);\n }\n unset($news);\n\n $url_rules = array_merge($url_rules, $this->getChildPages($pages,0));\n //Формируем двумерный массив. createUrl преобразует ссылки в правильный вид.\n //Добавляем элемент массива 'daily' для указания периода обновления контента\n // foreach ($url_rules as $url_rule){\n // $urls[] = array($url_rule,'daily');\n // }\n return $url_rules;\n }", "public function setSocialUrls(&$var)\n {\n GPBUtil::checkMessage($var, \\Business\\V1\\SocialURLs::class);\n $this->social_urls = $var;\n }", "protected function parseUrl(array $attributes) : void\n {\n if (isset($attributes['url']))\n $this->setUrl($attributes['url']);\n\n if (isset($attributes['route']))\n $this->route(...Arr::wrap($attributes['route']));\n\n if (isset($attributes['action']))\n $this->action(...Arr::wrap($attributes['action']));\n }", "protected function prepare_links($theme)\n {\n }", "private function setIconPaths()\n {\n // Directory URL and path\n $plugin = CGIT_SOCIALIZE_PLUGIN;\n $dir = 'icons';\n $url = plugin_dir_url($plugin) . $dir;\n $path = plugin_dir_path($plugin) . $dir;\n\n // Apply filters for customization\n $ext = apply_filters('cgit_socialize_icon_extension', '.svg');\n $url = apply_filters('cgit_socialize_icon_url', $url);\n $path = apply_filters('cgit_socialize_icon_path', $path);\n\n // Make sure directories have trailing slashes\n $url = trailingslashit($url);\n $path = trailingslashit($path);\n\n // Add URLs and paths to each network\n foreach ($this->networks as $key => $value) {\n $this->networks[$key]['icon'] = $url . $key . $ext;\n $this->networks[$key]['icon_path'] = $path . $key . $ext;\n }\n }", "private function loadURLs() {\r\n $status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\tforeach ($this->_url as $scriptname => $modes)\r\n\t{\r\n\t\t$this->url[$scriptname] = $modes[$status];\r\n\t}\r\n }", "public function run()\n {\n $data = $this->getUrlList();\n $this->db = \\DB::table('rec_urls');\n array_map(function ($url) {\n if ($url) {\n $this->insertUrl($url);\n }\n }, $data);\n }", "function iterate(){\n\t\t$this->url = $this->get($this->initialUrl);\n\n\t\techo \"Round: $this->iterations, initial: $this->initialUrl, url: $this->url\\n\";\n\n\t\t// if false\n\t\tif (!$this->url) {\n\t\t\treturn $this->initialUrl;\n\t\t}\n\n\t\t// if same, return\n\t\tif ($this->url == $this->initialUrl) {\n\t\t\techo \"The Same, $this->url\\n\";\n\t\t\treturn $this->url;\n\t\t}\n\n\t\t// if not the same, do recursive magic;\n\t\t$this->initialUrl = $this->url;\n\t\t$this->iterations++;\n\t\treturn $this->iterate();\n\n\t}", "function smarty_modifier_replace_urls($p_string)\n{\n // Images get added by the css after the fact.\n $host = \"([a-z\\d][-a-z\\d]*[a-z\\d]\\.)+[a-z][-a-z\\d]*[a-z]\";\n $port = \"(:\\d{1,})?\";\n $path = \"(\\/[^?<>\\#\\\"\\s]+)?\";\n $query = \"(\\?[^<>\\#\\\"\\s]+)?\";\n\n return preg_replace(\"#((ht|f)tps?:\\/\\/{$host}{$port}{$path}{$query})#i\", \"<a target='_blank' class='extLink' rel='nofollow' href='$1'>$1</a>\", $p_string);\n}", "function store_all_links($owner_id,$base_url,$link_array){\n\t//database configuration\n\trequire 'database/snippet_links_db.php';\n\tfor($count=0;$count<count($link_array);$count++){\n\t\t$webpage_address = $link_array[$count];\n if(!check_if_link_is_added($webpage_address)){\n\t\t//store link into database\n\t\t$sql = \"INSERT INTO snippet_links(webpage_id,owner_id,parent_website,webpage_address,date_added)\n\t\t VALUES(NULL,'$owner_id','$base_url','$webpage_address',NOW())\";\n\t\t$result = mysqli_query($connection,$sql);\n\t\tif(!$result){\n\t\t}\n\t\telse{\n\t\t}\n }\n}\n\t//close the connection\n\tmysqli_close($connection);\n}", "protected function processRules() {\n\t\t$active_lang = implode('|', array_keys( Yii::app()->params['languages'] ));\n\t\t$domain = Yii::app()->params['current_domain'];\n\t\t\n\t\t// if( ($urlrules = Yii::app()->cache->get('customurlrules')) === false )\n\t\t// {\n\t\t\t$_more = array();\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias, language FROM {{custompages}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/<alias:({$rule['alias']})>\" ] = array('site/custompages/index');\n\t\t\t}\n\n\t\t\t//set url news category\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{news_categorys}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"news/category/<alias:({$rule['alias']})>\" ] = array('site/news/viewcategory');\n\t\t\t}\n\n\t\t\t//set url news\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{news}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"news/view/<alias:({$rule['alias']})>\" ] = array('site/news/viewpost');\n\t\t\t}\n\n\t\t\t//set url Products category\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{categories}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"articles/category/<alias:({$rule['alias']})>\" ] = array('site/products/viewcategory');\n\t\t\t}\n\n\t\t\t//set url Products\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{products}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"articles/view/<alias:({$rule['alias']})>\" ] = array('site/products/detail');\n\t\t\t}\n\n //set url Videos\n $dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{videos}}\")->query();\n $urlRules = $dbCommand->readAll();\n foreach($urlRules as $rule)\n {\n $_more[ \"hearing-tv/detail/<alias:({$rule['alias']})>\" ] = array('site/auditionTV/detail');\n }\n\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT id, seoname FROM {{members}}\")->query();\n\t\t\t$urlUsers = $dbCommand->readAll();\n\t\t\tforeach($urlUsers as $uu)\n\t\t\t{\n\t\t\t\t$_more[ \"/user/<id:({$uu['id']})>-<alias:({$uu['seoname']})>\" ] = array('site/users/viewprofile');\n\t\t\t}\n \n \t//$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{products}}\")->query();\n\t\t\t//$urlRules = $dbCommand->readAll();\n\t\t\t$urlRules = array();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/articles/detail/<alias:({$rule['alias']})>\" ] = array('site/products/detail');\n\t\t\t}\n\n\t\t\t$this->rules = array(\n\n\t\t\t\t//-----------------------ADMIN--------------\n\t\t\t\t\"/admin\" => 'admin/index/index',\n \"/admin/articles\" => 'admin/products/index',\n \"/admin/articles/create\" => 'admin/products/create',\n \"/admin/articles/view\" => 'admin/products/view',\n \"/admin/articles/update\" => 'admin/products/update',\n \"/admin/articles/delete\" => 'admin/products/delete',\n \"/admin/articleComments\" => 'admin/ProductComments/index',\n \"/admin/articleComments/create\" => 'admin/ProductComments/create',\n \"/admin/articleComments/view\" => 'admin/ProductComments/view',\n \"/admin/articleComments/update\" => 'admin/ProductComments/update',\n \"/admin/articleComments/delete\" => 'admin/ProductComments/delete',\n\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>\" => 'admin/<_c>/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'admin/<_c>/<_a>',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'admin/<_c>/<_a>/',\n\t\t\t\t//-----------------------ADMIN--------------\n\n //gii\n \"/gii\" => array('gii'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>\" => array('gii/<_c>/'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>/<_a:([a-zA-z0-9-_]+)>/*\" => array('gii/<_c>/<_a>/'),\n\n\t\t\t\t\"/products/category/<alias:.*?>\" => 'site/products/category/',\n \"/products/active/<type:(lowprice|cent|all)>/\" => 'site/products/active/',\n \"/products/ended/<type:(lowprice|cent|all)>/\" => 'site/products/ended/',\n \"/products/upcoming/<type:(lowprice|cent|all)>/\" => 'site/products/upcoming/',\n \"/products/label/<id:([a-zA-z0-9-_]+)?>\" => 'site/products/label/',\n \"/articles\" => 'site/products/index/',\n \n \"/register/\" => 'site/profile/create/',\n \"/Anmeldung/\" => 'site/profile/create/',\n \"/guestbook\" => 'site/index/guestbook/',\n \"/grand-public\" => 'site/auditionTV/grandPublic',\n \"/videos-pro\" => 'site/auditionTV/videosPro',\n \"/hearing-TV\" => 'site/auditionTV/index',\n \"/classified-ads\" => 'site/Announcements/index',\n \"/formulaire_annonce\" => 'site/Announcements/register',\n \"/classified-ads/<id:([a-zA-z0-9-_]+)?>\" => 'site/Announcements/detail/',\n \"/hearing-care-centers\" => 'site/directoryOrders/directory',\n \"/hearing-aid-suppliers\" => 'site/directoryOrders/hearingAidSuppliers',\n \"/ENT-doctors\" => 'site/directoryOrders/doctors',\n \"/instrumentation-ORL\" => 'site/directoryOrders/InstrumentationORL',\n \"/services-ORL\" => 'site/directoryOrders/ServicesORL',\n \"/speech-therapists\" => 'site/directoryOrders/speechTherapists',\n \"/associative-sector\" => 'site/directoryOrders/associativeSector',\n \"/organizations\" => 'site/directoryOrders/organizations',\n \"/organizations/type/<alias:.*?>\" => 'site/directoryOrders/typeAgency/',\n \"/organizations/departement/<alias:.*?>\" => 'site/directoryOrders/department/',\n \"/organizations/ville/<alias:.*?>\" => 'site/directoryOrders/department/',\n \"/services/departement/<alias:.*?>\" => 'site/directoryOrders/services/',\n \"/services/ville/<alias:.*?>\" => 'site/directoryOrders/services/',\n \"/hospitals/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/hospitals/',\n \"/orthophonistes/departement/<alias:.*?>\" => 'site/directoryOrders/orthophonistes/',\n \"/orthophonistes/ville/<alias:.*?>\" => 'site/directoryOrders/orthophonistes/',\n \"/speech/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/speech/',\n \"/event/<id:([a-zA-z0-9-_]+)?>\" => 'site/Events/detail',\n \"/laureates-CNA\" => 'site/students/laureatesCNA',\n \"/espace-pro\" => 'site/regulation/espacePro',\n \"/appear-directory\" => 'site/directoryOrders/appearDirectory',\n \"/doctors/departement/<alias:.*?>\" => 'site/directoryOrders/doctorsByDepartment/',\n \"/doctors/ville/<alias:.*?>\" => 'site/directoryOrders/doctorsByDepartment/',\n \"/doctor/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/detailDoctor/',\n\n \"/search\" => 'site/index/search',\n \"/search-advanced\" => 'site/index/searchAdvanced',\n \"/searchalpha\" => 'site/index/searchAlpha',\n \"/supports\" => 'site/index/supports',\n \"/orders/customer/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/orders/customer/',\n \"/admin/orders/vi_customer/<id:([a-zA-z0-9-_]+)>\" => 'site/admin/orders/vi_customer/',\n \"/custompages/detail/<alias:.*?>\" => 'site/custompages/detail',\n \"/products/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/products/detail/',\n \"/support/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/support/detail/',\n \"/tags/detail/<slug:([a-zA-z0-9-_]+)>\" => 'site/tags/detail/',\n \n\n\t\t\t\t\"/<_a:(register|login|logout|verify)>\" => 'site/users/<_a>',\n\t\t\t\t\"/admin-login\" => 'site/users/admin',\n\t\t\t\t\"/affiliate-login\" => 'site/users/affiliate',\n\t\t\t\t\"/forgot-password\" => 'site/users/lostpassword',\n\t\t\t\t\"/change-password\" => 'site/users/changepass',\n\t\t\t\t\"/contact-us\" => 'site/contactus/index',\n\t\t\t\t\"/news-letter\" => 'site/newsletter/index',\n\t\t\t\t\"/messages\" => 'site/usermessages/index',\n\t\t\t\t\"/users-login\" => 'site/login/index',\n\t\t\t\t\"/directory-orders\" => 'site/directoryOrders/create',\n\t\t\t\t\"/<_a:(viewmessage|sendmessage)>\" => 'site/usermessages/<_a>',\n\t\t\t\t// \"/invoices\" => 'site/transactions/index',\n\t\t\t\t// \"/buy-a-plan\" => 'site/transactions/buyplan',\n\t\t\t\t// \"/<_a:(earning|cashout)>\" => 'site/transactions/<_a>',\n\t\t\t\t// \"/<id:(\\d+)>-<ualias:(.*?)>/blog/<alias:(.*)>\" => array('site/blog/viewpost'),\n\t\t\t\t// Blogs\n\t\t\t\t\"/blog/category/<alias:(.*)>\" => 'site/blog/viewcategory',\n\t\t\t\t\"/blog/view/<alias:(.*)>\" => 'site/blog/viewpost',\n\n\t\t\t\t\"/\" => 'site/index/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>\" => 'site/<_c>/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'site/<_c>/<_a>',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'site/<_c>/<_a>/',\n \n \n \n\t\t\t);\n\n\t\t\t$urlrules = array_merge( $_more, $this->rules );\n\t\t\t//Yii::app()->cache->set('customurlrules', $urlrules);\n\t\t// }\n\t\t\n\t\t$this->rules = $urlrules;\n\t\t\n // Run parent\n parent::processRules();\n\n }", "protected function _convert(array $array, $type)\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'convert path markers to url',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n $update = '';\n\n if ($array) {\n $path = $this->_checkPath();\n\n switch ($type) {\n case'path':\n $update = '';\n break;\n\n case'full':\n $update = $path[0];\n\n if ($this->_lang) {\n if ($this->_options['rewrite']) {\n $update .= $this->_lang . '/';\n } else {\n $update .= '?core_lang=' . $this->_lang . $this->_separator();\n }\n } else {\n if (!$this->_options['rewrite']) {\n $update .= '?';\n }\n }\n break;\n\n case'rel':\n $update = $path[1];\n\n if (!$this->_options['rewrite']) {\n $update .= '?';\n }\n break;\n }\n\n foreach ($array[0] as $link) {\n $path = str_replace(\n array(\n '{;'.$type.';',\n ';}'\n ),\n '',\n $link\n );\n $path = explode('/', $path);\n $pages = array();\n $params = array();\n\n foreach ($path as $value) {\n $bool = preg_match(\n '#[' . $this->_options['var_rewrite_sep'] . ']{1}#',\n $value\n );\n\n if ($bool) {\n $params[] = $value;\n } elseif ($value) {\n $pages[] = $value;\n }\n }\n\n if ((bool)$this->_options['rewrite']) {\n $final = self::convertToRewriteUrl($params, $pages);\n } else {\n $final = self::convertToClassicUrl(\n $params,\n $pages,\n $this->_separator()\n );\n }\n\n if ($update) {\n $final = $update . $final;\n }\n\n $this->DISPLAY = str_replace($link, $final, $this->DISPLAY);\n }\n }\n }", "public static function save_network_settings() {\n\t\tif ( ! current_user_can( 'manage_network_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( false === check_admin_referer( 'cjur-network-settings', 'cjur-network-settings-nonce' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$cdn_url = '';\n\n\t\tif ( isset( $_POST['css_js_url_rewriter_cdn_url'] ) ) {\n\t\t\t$cdn_url = esc_url_raw( wp_unslash( $_POST['css_js_url_rewriter_cdn_url'] ) );\n\t\t}\n\n\t\tif ( $cdn_url ) {\n\t\t\tupdate_site_option( 'css_js_url_rewriter_cdn_url', $cdn_url );\n\t\t} else {\n\t\t\tdelete_site_option( 'css_js_url_rewriter_cdn_url' );\n\t\t}\n\t}", "function all_client_networks(){\n\t\t$user_id = $this->session->userdata('id');\t\n\t\t$role = $this->session->userdata('role');\n\t\tif($role == 'client'){\t\t\t\n\t\t\t$company_id = $this->InteractModal->get_user_meta($user_id, 'company_id');\n\t\t\t$network__list = $this->InteractModal->all_client_networks($company_id);\n\t\t\t$approve_network_list = $this->InteractModal->get_approve_netword_by_clint_id($user_id);\t\n\t\t $own_network__list = $this->InteractModal->all_client_own_networks($user_id);\t\t\n\t\t\t/*=====all network merge=====*/\n\t\t\tif(!empty($approve_network_list) && !empty($network__list)){\n\t\t\t $all_user_list=array_merge($network__list,$approve_network_list,$own_network__list);\t\t\t\t \n\t\t\t\t}elseif(!empty($own_network__list) && !empty($network__list)){\n\t\t\t\t\t$all_user_list=array_merge($network__list,$own_network__list);\n\t\t\t\t}else{\n\t\t\t\t\t$all_user_list=$own_network__list;\t\t\t\t\t \n\t\t\t\t}\n\t\t\t$uniqueArray = array();\n\t\t\tif(!empty($all_user_list)):\n\t\t\t foreach($all_user_list as $subArray){\n\t\t\t\tif(!in_array($subArray, $uniqueArray)){\n\t\t\t\t $uniqueArray[] = $subArray;\n\t\t\t\t}\n\t\t\t }\n\t\t\t\t$pagedata['network__list'] = $uniqueArray;\n\t\t\t else:\n\t\t\t\t$pagedata['network__list'] = $network__list;\n\t\t\tendif; \n\t\t\t/*=====all network merge=====*/\n\t\t\t$all_listing_as_buyer = $this->InteractModal->get_all_listing_buyer_seller( $user_id, 'for_buy' );\n\t\t\t$all_listing_as_seller = $this->InteractModal->get_all_listing_buyer_seller( $user_id, 'for_sale' );\n\t\t\t$footer_data['all_listing_as_buyer'] = $all_listing_as_buyer;\n\t\t\t$footer_data['all_listing_as_seller'] = $all_listing_as_seller;\n\t\t\t$footer_data['user__id'] = $user_id;\n\t\t\t$this->load->view('client/header');\n\t\t\t$this->load->view('client/client_all_network', $pagedata );\n\t\t\t$this->load->view('client/footer',$footer_data); \n\t\t\t}else{\n\t\t\t\tredirect( base_url() );\n\t\t\t} \n\t}", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n //Creating array containing variable IDs in List\n $variableIDs = [];\n $variableList = json_decode($this->ReadPropertyString('VariableList'), true);\n foreach ($variableList as $line) {\n $variableIDs[] = $line['VariableID'];\n }\n\n //Creating links for all variable IDs in VariableList\n foreach ($variableList as $line) {\n $variableID = $line['VariableID'];\n $this->RegisterMessage($variableID, VM_UPDATE);\n $this->RegisterReference($variableID);\n if (!@$this->GetIDForIdent('Link' . $variableID)) {\n\n //Create links for variables\n $linkID = IPS_CreateLink();\n IPS_SetParent($linkID, $this->InstanceID);\n IPS_SetLinkTargetID($linkID, $variableID);\n IPS_SetIdent($linkID, 'Link' . $variableID);\n\n //Setting initial visibility\n IPS_SetHidden($linkID, (GetValue($variableID) == $this->GetSwitchValue($variableID)));\n }\n }\n\n //Deleting unlisted links\n foreach (IPS_GetChildrenIDs($this->InstanceID) as $linkID) {\n if (IPS_LinkExists($linkID)) {\n if (!in_array(IPS_GetLink($linkID)['TargetID'], $variableIDs)) {\n $this->UnregisterMessage(IPS_GetLink($linkID)['TargetID'], VM_UPDATE);\n $this->UnregisterReference(IPS_GetLink($linkID)['TargetID']);\n $this->UnregisterReference($linkID);\n IPS_DeleteLink($linkID);\n }\n }\n }\n }", "protected function setUpInstanceCoreLinks() {}", "public function run()\n {\n foreach(DB::table('content_kinds')->get() as $d){\n \tDB::table('content_kinds')->where('id', $d->id)->update([\n \t\t'url' => str_slug($d->name)\n \t]);\n }\n }", "function wp_schedule_update_network_counts()\n {\n }", "public function setSocialUrl(string $newSocialUrl): void {\n\t\t// verify the string is 500 characters\n\t\t$newSocialUrl = trim($newSocialUrl);\n\t\t$newSocialUrl = filter_var($newSocialUrl, FILTER_VALIDATE_URL);\n\t\tif(empty($newSocialUrl) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"Social Url link is empty or insecure.\"));\n\t\t}\n\n\t\t// verify the string is validated\n\t\tif(strlen($newSocialUrl) > 500) {\n\t\t\tthrow(new \\RangeException(\"Social Url is too large, limit 500 characters\"));\n\t\t}\n// store the social url link\n\t\t$this->socialUrl = $newSocialUrl;\n\t}", "function setSyncUrl()\n {\n }", "private function _combineUrl()\n {\n $args = func_get_args();\n $url = '';\n foreach ($args as $arg) {\n if (!is_string($arg)) {\n continue;\n }\n if ($arg[strlen($arg) - 1] !== '/') {\n $arg .= '/';\n }\n $url .= $arg;\n }\n\n return $url;\n }", "public function UpdateTagsWithLinks() {\n\t\t$tags = $this->UpdateTags();\n\n\t\t$processed = new ArrayList();\n\n\t\tforeach ($tags as $tag) {\n\t\t\t// Build the link - keep the tag, and date range, but reset month, year and pagination.\n\t\t\t$link = HTTP::setGetVar('tag', $tag->ID, null, '&');\n\t\t\t$link = HTTP::setGetVar('month', null, $link, '&');\n\t\t\t$link = HTTP::setGetVar('year', null, $link, '&');\n\t\t\t$link = HTTP::setGetVar('start', null, $link, '&');\n\n\t\t\t$tag->Link = $link;\n\t\t\t$processed->push($tag);\n\t\t}\n\n\t\treturn $processed;\n\t}", "private function updateCssUrls(array $urlMap)\n {\n foreach ($urlMap as $ref => $targetFiles) {\n foreach ($targetFiles as $matchedFileData) {\n $filePath = $matchedFileData['filePath'];\n $oldCss = $this->staticDir->readFile($filePath);\n $newCss = str_replace($ref, $matchedFileData['replace'], $oldCss);\n if ($oldCss !== $newCss) {\n $this->staticDir->writeFile($filePath, $newCss);\n }\n }\n }\n }", "public function gridSetPagesUrl($firstUrl = '', $prevUrl = '', $nextUrl = '', $lastUrl = ''){\n $this->setPagesUrlFirst($firstUrl);\n $this->setPagesUrlPrev($prevUrl);\n $this->setPagesUrlNext($nextUrl);\n $this->setPagesUrlLast($lastUrl);\n }", "public function rewriteEndpoints()\n {\n $this->addEndpoints();\n flush_rewrite_rules();\n }", "function wp_maybe_update_network_site_counts_on_update($new_site, $old_site = \\null)\n {\n }", "public function &setExternalUpdateProfileUrl($value);", "private function updateUrl(){\n $this->url->status_code = $this->response['status_code'];\n $this->url->reason_phrase = $this->response['reason_phrase'];\n $this->url->location = $this->response['location'];\n $this->url->content_type = $this->response['content_type'];\n $this->url->content_length = $this->response['content_length'];\n $this->url->save();\n }", "public function run()\n {\n\t DB::table('networks')->insert([\n\t 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t 'updated_at' => Carbon\\Carbon::now()->toDateTimeString()\n\t ]);\n\n\t for($i=1; $i<=5; $i++){\n\n\t\t DB::table('network_nodes')->insert([\n\t\t 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t 'network_id' => 1,\n\t\t 'node' => $i\n\t\t ]);\n\n\t\t DB::table('user_nodes')->insert([\n\t\t 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t 'user_id' => $i,\n\t\t 'node_id' => $i\n\t\t ]);\n\n\t }\n\n\t for($i=1; $i<=5; $i++){\n\n\n\t \tfor($j=1; $j<=5; $j++){\n\t \t\tif($j != $i){\n\n\t\t\t\t DB::table('network_edges')->insert([\n\t\t\t\t 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t\t 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t\t 'network_id' => 1,\n\t\t\t\t 'source' => $i,\n\t\t\t\t 'target' => $j\n\t\t\t\t ]);\n\n\n\t \t\t}\n\n\n\t \t}\n\n\t }\n\n }", "function update_carrier_url()\n{\n // Get all carriers\n $sql = '\n\t\tSELECT c.`id_carrier`, c.`url`\n\t\tFROM `' . _DB_PREFIX_ . 'carrier` c';\n $carriers = Db::getInstance()->executeS($sql);\n\n // Check each one and erase carrier URL if not correct URL\n foreach ($carriers as $carrier) {\n if (empty($carrier['url']) || !preg_match('/^https?:\\/\\/[:#%&_=\\(\\)\\.\\? \\+\\-@\\/a-zA-Z0-9]+$/', $carrier['url'])) {\n Db::getInstance()->execute('\n\t\t\t\tUPDATE `' . _DB_PREFIX_ . 'carrier`\n\t\t\t\tSET `url` = \\'\\'\n\t\t\t\tWHERE `id_carrier`= ' . (int) ($carrier['id_carrier']));\n }\n }\n}", "protected function renderFeedURLs()\n {\n $urls = [];\n foreach (Language::getLanguages(true, $this->context->shop->id) as $lang) {\n foreach (Currency::getCurrencies() as $cur) {\n $currencyIso = Tools::strtoupper($cur['iso_code']);\n $langIso = Tools::strtoupper($lang['iso_code']);\n $urls[] = [\n 'url' => $this->buildFeedUrl($this->context->shop->id, $langIso, $currencyIso),\n 'lang' => $langIso,\n 'currency' => $currencyIso,\n ];\n }\n }\n $this->context->smarty->assign('df_feed_urls', $urls);\n\n return $this->context->smarty->fetch($this->local_path . 'views/templates/admin/feed_url_partial_tab.tpl');\n }", "public function wp_url($oldurl, $newurl) {\n\n\t\t$bdd = Bdd::getInstance();\n\n\t\t# Changer l'URL du site\n\t\t$req1 = $bdd->dbh->prepare('UPDATE '.$this->_table_prefix.'options SET option_value = replace(option_value, :oldurl, :newurl) WHERE option_name = \\'home\\' OR option_name = \\'siteurl\\';');\n\n\t\t# Changer l'URL des GUID\n\t\t$req2 = $bdd->dbh->prepare('UPDATE '.$this->_table_prefix.'posts SET guid = REPLACE (guid, :oldurl, :newurl);');\n\n\t\t# Changer l'URL des médias dans les articles et pages\n\t\t$req3 = $bdd->dbh->prepare('UPDATE '.$this->_table_prefix.'posts SET post_content = REPLACE (post_content, :oldurl, :newurl);');\n\n\t\t# Changer l'URL des données meta\n\t\t$req4 = $bdd->dbh->prepare('UPDATE '.$this->_table_prefix.'postmeta SET meta_value = REPLACE (meta_value, :oldurl, :newurl);');\n\n\t\t$req1->execute(array(\n\t\t 'oldurl' => $oldurl,\n\t\t 'newurl' => $newurl\n\t\t));\n\n\t\t$req2->execute(array(\n\t\t 'oldurl' => $oldurl,\n\t\t 'newurl' => $newurl\n\t\t));\n\n\t\t$req3->execute(array(\n\t\t 'oldurl' => $oldurl,\n\t\t 'newurl' => $newurl\n\t\t));\n\n\t\t$req4->execute(array(\n\t\t 'oldurl' => $oldurl,\n\t\t 'newurl' => $newurl\n\t\t));\n\n\t\treturn TRUE;\n\t}", "public function run()\n {\n SiteSocialNetwork::create([\n 'name' => 'instagram',\n 'link' => 'https://www.instagram.com/',\n 'state' => 1\n ]);\n SiteSocialNetwork::create([\n 'name' => 'facebook',\n 'link' => 'https://www.facebook.com/',\n 'state' => 1\n ]);\n SiteSocialNetwork::create([\n 'name' => 'twitter',\n 'link' => 'https://www.twitter.com/',\n 'state' => 1\n ]);\n SiteSocialNetwork::create([\n 'name' => 'youtube',\n 'link' => 'https://www.youtube.com/',\n 'state' => 1\n ]);\n }", "public function resetLinkWeights();", "private function migrateLinksPerIndex() {\n\t\tif ( ! empty( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_max_posts'] ) ) {\n\t\t\t$value = intval( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_max_posts'] );\n\t\t\tif ( ! $value ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$value = $value > 50000 ? 50000 : $value;\n\t\t\taioseo()->options->sitemap->general->linksPerIndex = $value;\n\t\t}\n\t}", "public function get_networks()\n {\n }", "public function updateBlogPaths($enable_live_network_counts = null)\n {\n $value = $enable_live_network_counts; // This hook actually rides on a filter.\n\n if (!$this->options['enable']) {\n return $value; // Nothing to do.\n } elseif (!is_multisite()) {\n return $value; // N/A.\n }\n $cache_dir = $this->cacheDir();\n $blog_paths_file = $cache_dir.'/'.mb_strtolower(SHORT_NAME).'-blog-paths';\n\n $cache_lock = $this->cacheLock();\n\n clearstatcache(); // Clear `stat()` cache.\n\n if (!file_exists($cache_dir)) {\n mkdir($cache_dir, 0775, true);\n }\n if (is_writable($cache_dir) && !is_file($cache_dir.'/.htaccess')) {\n file_put_contents($cache_dir.'/.htaccess', $this->htaccess_deny);\n }\n if (is_dir($cache_dir) && is_writable($cache_dir)) {\n $paths = // Collect child `[/base]/path/`s from the WordPress database.\n $this->wpdb()->get_col('SELECT `path` FROM `'.esc_sql($this->wpdb()->blogs).\"` WHERE `deleted` <= '0'\");\n\n $host_base_token = $this->hostBaseToken(); // Pull this once only.\n\n foreach ($paths as $_key => &$_path) {\n if ($_path && $_path !== '/' && $host_base_token && $host_base_token !== '/') {\n // Note that each `path` in the DB looks like: `[/base]/path/` (i.e., it includes base).\n $_path = '/'.ltrim(preg_replace('/^'.preg_quote($host_base_token, '/').'/u', '', $_path), '/');\n }\n if (!$_path || $_path === '/') {\n unset($paths[$_key]); // Exclude main site.\n }\n } // Must unset iteration by reference here.\n unset($_key, $_path); // Housekeeping.\n\n file_put_contents($blog_paths_file, serialize($paths));\n }\n $this->cacheUnlock($cache_lock); // Release.\n\n return $value; // Pass through untouched (always).\n }", "public function generateRewritesFromArray(array $urls = array()){\n\t\tif(is_array($urls)){\n\t\t\tforeach($urls as $source => $destination){\n\t\t\t\t// Make sure the destination is not an array\n\t\t\t\tif(is_array($destination)){\n\t\t\t\t\tthrow new Exception('Destinations cannot be arrays. Check the destination for: ' . $source);\n\t\t\t\t}\n\t\t\t\t$this->urls[$source] = $destination;\n\t\t\t}\n\n\t\t\t// Build the rewrites\n\t\t\treturn $this->buildRewrites();\n\t\t}else{\n\t\t\tthrow new Exception('URLs are not in array format.');\n\t\t}\n\t}", "public function maping() {\n\n if(count($this->parse->domHtml->find('a'))){\n foreach ($this->parse->domHtml->find('a') as $element) {\n $link = new LinkBot(new HrefBot($element->href));\n\n if(!empty($link->link->getParseUrl()['host'])) {\n $host = $link->link->getParseUrl()['host'];\n } else {\n $host = false;\n }\n\n if (BotUrlHelper::isSameSite($host, $this->parse->request->getHost()) &&\n !BotUrlHelper::isRepeat($element->href, $this->parse->request->getUrls())) {\n\n //start connect\n $this->parse->request->setConnectTimeout(time());\n $link->startConnect($this->parse->request->getConnectTimeout());\n\n $countImg = 0;\n if (BotUrlHelper::url_exists($link->link->getLink())) {\n $countImg = count($this->parse->domHtml->getImgs());\n }\n\n //end connect\n $this->parse->request->setTimeout(time());\n $link->endConnect($this->parse->request->getTimeout());\n\n $this->parse->request->addUrl($element->href);\n\n $this->data[] = (object)[\n 'url' => $link->link->getLink(),\n 'countImg' => $countImg,\n 'end' => $link->end,\n 'start' => $link->start\n ];\n }\n unset($link);\n }\n }\n\n foreach ($this->parse->request->getUrls() as $url) {\n $this->analise($url);\n }\n \n }", "static public function onPersonalUrls ( &$personal_urls /*, &$title ,$sk*/ ) {\n\t\t\n\t\tglobal $wgUser, $wgOut;\n\t\t$user = $wgUser;\n\t\t\t\t\n\t\tif ( $user->isAnon() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$wgOut->addModuleStyles( 'ext.watchanalytics.base' );\n\t\t// NOTE: $wgOut->addModules() does not appear to work here, so \n\t\t// the onBeforePageDisplay() method was created below.\n\t\t\n\t\t// Get user's watch/review stats\n\t\t$watchStats = $user->watchStats; // set in onBeforePageDisplay() hook\n\t\t$numPending = $watchStats['num_pending'];\n\t\t$maxPendingDays = $watchStats['max_pending_days'];\n\t\t\n\t\t// Determine CSS class of Watchlist/PendingReviews link\n\t\t$personal_urls['watchlist']['class'] = array( 'mw-watchanalytics-watchlist-badge' );\n\t\tif ( $numPending != 0 ) {\n\t\t\t$personal_urls['watchlist']['class'] = array( 'mw-watchanalytics-watchlist-pending' );\n\t\t}\n\n\t\t// Determine text of Watchlist/PendingReviews link \n\t\tglobal $egPendingReviewsEmphasizeDays;\n\t\tif ( $maxPendingDays > $egPendingReviewsEmphasizeDays ) {\n\t\t\t$personal_urls['watchlist']['class'][] = 'mw-watchanalytics-watchlist-pending-old';\n\t\t\t$text = wfMessage( 'watchanalytics-personal-url-old' )->params( $numPending, $maxPendingDays )->text();\n\t\t}\n\t\telse {\n\t\t\t// when $sk (third arg) available, replace wfMessage with $sk->msg()\n\t\t\t$text = wfMessage( 'watchanalytics-personal-url' )->params( $numPending )->text();\n\t\t}\n\t\t$personal_urls['watchlist']['text'] = $text;\n\t\t\n\t\t// set \"watchlist\" link to Pending Reviews\n\t\t$personal_urls['watchlist']['href'] = SpecialPage::getTitleFor( 'PendingReviews' )->getLocalURL();\n\t\treturn true;\n\t}", "public function renderNetworks($args = [])\n {\n // Default method arguments\n $args = wp_parse_args($args, [\n 'networks' => array_keys($this->getNetworks()),\n 'icons' => false,\n 'embed' => false,\n 'captions' => false,\n ]);\n\n // HTML class name prefix\n $prefix = apply_filters(\n 'cgit_socialize_class_prefix',\n 'cgit-socialize-'\n );\n\n $networks = $this->getNetworks($args['networks']);\n $items = [];\n\n // Add a link to each network to the output\n foreach ($networks as $key => $network) {\n $name = $network['name'];\n $content = $name;\n\n // Use icons instead of text\n if ($args['icons']) {\n $content = '<img src=\"' . $network['icon'] . '\" alt=\"' . $name\n . '\" class=\"' . $prefix . 'icon-' . $key . '\" />';\n\n // Embed the icon\n if ($args['embed']) {\n $content = file_get_contents($network['icon_path']);\n }\n\n // Include the text after each icon\n if ($args['captions']) {\n $content .= ' <span class=\"' . $prefix . 'caption-' . $key\n . '\">' . $name . '</span>';\n }\n }\n\n // Add each link to the array for output\n $items[] = '<li class=\"' . $prefix . $key . '\">' . '<a href=\"'\n . htmlspecialchars($network['url']) . '\">' . $content\n . '</a></li>';\n }\n\n return '<ul>' . implode(PHP_EOL, $items) . '</ul>';\n }", "protected function sectionUrls()\n {\n // One place to set Friendly URL for all pages\n // originally code F (delete this line later)\n $output = '<h1><i class=\"fa fa-link\"></i> ' . $this->tableAdmin->translate('Friendly URL')\n . '</h1><div id=\"agenda-urls\">'\n . '<form action=\"\" method=\"post\" class=\"friendly-urls\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('urls', '', 1, ['type' => 'hidden'])\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden');\n $urls = []; // all URLs, all language versions with a link to what it links to (product, page, … id, etc.)\n $langs = array_keys($this->MyCMS->TRANSLATIONS);\n // Todo queryStrictArray\n $query = $this->MyCMS->dbms->queryStrictNonEmptyArray(\n 'SELECT id,\"content\" AS _table,type,' . Tools::arrayListed($langs, 0, ',', 'url_') . ','\n . Tools::arrayListed($langs, 0, ',', 'name_') . ' FROM `' . TAB_PREFIX . 'content` WHERE type IN ('\n . '\"article\", \"page\", \"news\"' // list of types to be listed for Friendly URL settings\n . ') ORDER BY type'\n );\n foreach ($query as $row) {\n $urls [] = $row;\n }\n // Friendly URL folders for types to be listed for Friendly URL settings\n $TYPE2PATH = [\n 'content-article' => '',\n 'content-page' => '',\n 'content-news' => 'news'\n ];\n $lastType = false;\n foreach ($urls as $value) {\n Assert::isArray($value);\n if ($lastType != $value['_table'] . '-' . $value['type']) {\n $output .= '<h3 class=\"lead\">' . Tools::h($lastType = $value['_table'] . '-' . $value['type'])\n . '</h3>' . PHP_EOL;\n }\n $output .= '<div class=\"mb-3\"><div><a href=\"?table=' . urlencode(TAB_PREFIX . $value['_table'])\n . '&where[id]=' . (int) $value['id'] . '\" target=\"_blank\">'\n . '<i class=\"fa fa-external-link\"></i></a> ' .\n (Tools::h($value['name_' . DEFAULT_LANGUAGE]) ?: '<i>N/A</i>') . '</div>';\n foreach ($langs as $key => $lang) {\n // TODO should trailing slash be present?\n $value['fill'] = rtrim('/' . Tools::wrap($TYPE2PATH[$lastType], '', '/') .\n /* $value['id'] . '-' . */ Tools::webalize($value[\"name_$lang\"]), '-');\n $output .= '<div class=\"input-group input-group-sm\">'\n . '<div class=\"input-group-prepend\"><tt class=\"input-group-text btn\" title=\"'\n . $this->tableAdmin->translate('Fill up') . '\">' . $lang . '</tt></div>'\n . Tools::htmlInput(\n 'url-' . urlencode($value['_table']) . '-' . $value['id'] . '-' . $lang,\n '',\n $value[\"url_$lang\"],\n array('class' => 'form-control monospace', 'data-fill' => $value['fill'])\n )\n . '</div>' . PHP_EOL;\n }\n $output .= '</div>';\n }\n $output .= '<p><button class=\"btn btn-primary mr-1\" type=\"submit\" name=\"urls-save\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button class=\"btn btn-secondary btn-fill\" type=\"button\"><i class=\"fa fa-edit\"></i> '\n . $this->tableAdmin->translate('Fill up') . '</button>\n ' . Tools::htmlInput(\n '',\n $this->tableAdmin->translate('only empty'),\n '',\n array('type' => 'checkbox', 'id' => 'only-empty', 'label-after' => true, 'label-class' => 'mx-1')\n ) . '\n <button class=\"btn btn-secondary btn-check-up\" type=\"button\"><i class=\"fa fa-eye\"></i> '\n . $this->tableAdmin->translate('Check up') . '</button>\n </p></form>';\n\n // Identify duplicit URLs\n // originally code A (delete this line later)\n $output .= '<hr><h1><i class=\"fa fa-unlink\"></i> ' . $this->tableAdmin->translate('Duplicit URL') . '</h1>'\n . '<p>' . $this->tableAdmin->translate('Duplicities may appear across languages.') . '</p>'\n . '<div id=\"agenda-urls\">';\n $urls = [];\n foreach (\n [\n // Note: not all apps have all those tables\n 'category',\n 'content',\n 'product'\n ] as $table\n ) {\n foreach (array_keys($this->tableAdmin->TRANSLATIONS) as $i) {\n foreach (\n $this->MyCMS->dbms->fetchAll(\"SELECT COUNT(url_$i) AS _count, url_$i AS url\"\n . ' FROM `' . TAB_PREFIX . \"{$table}` GROUP BY url ORDER BY _count DESC\") as $row\n ) {\n // Tools::add($urls[$row['url']], $row['_count']); // next line is more static analysis friendly:\n $urls[$row['url']] = (isset($urls[$row['url']]) ? $urls[$row['url']] : 0) + $row['_count'];\n }\n }\n }\n foreach ($urls as $key => $value) {\n if ($value <= 1) {\n unset($urls[$key]);\n }\n }\n foreach (array_keys($urls) as $url) {\n $sql = [];\n foreach (['category', 'content', 'product'] as $table) {\n $sql [] = \"SELECT '$table' AS type,id,name\" . '_' . $_SESSION['language']\n . ' AS name FROM `' . TAB_PREFIX . \"{$table}` WHERE \" .\n Tools::arrayListed(\n array_keys($this->tableAdmin->TRANSLATIONS),\n 0,\n ' OR ',\n 'url_',\n '=\"' . $this->MyCMS->escapeSQL((string) $url) . '\"'\n );\n }\n $query = $this->MyCMS->fetchAll(implode(\" UNION\\n\", $sql));\n $output .= '<details><summary>' . Tools::h((string) $url) . ' <sup class=\"badge badge-secondary\">'\n . count($query) . '</sup></summary>';\n foreach ($query as $row) {\n $output .= '<div class=\"ml-2\"><a href=\"?table=' . TAB_PREFIX . $row['type'] . '&amp;where[id]='\n . $row['id'] . '\"><i class=\"fa fa-table\"></i> ' . Tools::h((string) $row['name'])\n . ' (' .\n// $this->tableAdmin->translate(\n $row['type']\n// )\n .\n ')</a></div>' . PHP_EOL;\n }\n $output .= '</details>' . PHP_EOL;\n }\n $output .= (count($urls) ? '' : '<i>' . $this->tableAdmin->translate('None') . '</i>')\n . '</div><footer class=\"mt-2\">'\n . (count($urls) ? '<button type=\"button\" class=\"btn btn-sm btn-secondary mr-2\" id=\"urls-toggle\" title=\"'\n . $this->tableAdmin->translate('Open/close')\n . '\" data-open=\"1\"><i class=\"fas fa-caret-right\"></i> <i class=\"fas fa-caret-down\"></i></button>' : '')\n . '</footer>';\n return $output;\n }", "public function index()\n {\n return view('admin.social-links.update')->with([\n 'socialLinks' => $this->socialLinksService->getAll(),\n ]);\n }", "public function refresh_all_sites()\n\t{\n\t\t$sites = get_sites( array( 'number' => 99999));\n\t\t\n\t\tforeach( $sites as &$site )\n\t\t{\n\t\t\t$this->refresh_site( $site->blog_id );\n\t\t}\n\t\t$this->model->update_option( 'sites-refresh-time', date('Y-m-d H:i:s') );\n\t}", "function add_urls() {\n\tadd_rewrite_rule( '^sso-login/?', 'index.php?sso-login=sso-login', 'top' );\n add_rewrite_endpoint( 'sso-login', EP_PERMALINK);\n\n\t// URLs for step 2 of webserver oauth flow\n\tadd_rewrite_rule( '^sso-callback/?', 'index.php?sso-callback=sso-callback', 'top' );\n add_rewrite_endpoint( 'sso-callback', EP_PERMALINK);\n}", "public function rebuildURLs($recursive=false,$clearcache=false)\r\n\t{\r\n\t\tglobal $myDB;\r\n\t\tglobal $PTC_LANGUAGES;\r\n\t\tglobal $myPT;\r\n\r\n\t\t$url_changed = false;\r\n\r\n\t\t$mySQL = new SQLBuilder();\r\n\r\n\r\n\t\t$url = $this->buildURL();\r\n\t\t$mySQL->addField(\"pag_url\",$url);\r\n\t\tif ($url!=$this->row[\"pag_url\"])\r\n\t\t{\r\n\t\t\t$url_changed = true;\r\n\t\t}\r\n\r\n\r\n\t\tforeach ($PTC_LANGUAGES AS $k =>$v)\r\n\t\t{\r\n\t\t\t//if ($this->multilanguage)\r\n\t\t\t//{\r\n\t\t\t\t$url = $this->buildURL($k);\r\n\t\t\t//}\r\n\r\n\t\t\t$mySQL->addField(\"pag_url\".$k,$url);\r\n\t\t\tif ($url!=$this->row[\"pag_url\".$k])\r\n\t\t\t{\r\n\t\t\t\t$url_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$sql = $mySQL->update(\"page\",\"pag_id=\".$this->id);\r\n\t\t$myDB->query($sql);\r\n\r\n\t\t// rebuild url of child pages, if any url has changed\r\n\t\tif ($url_changed==true AND $recursive=true)\r\n\t\t{\r\n\t\t\t$sql = \"SELECT pag_id FROM page WHERE pag_id_top=\".$this->id;\r\n\t\t\t$rs = $myDB->query($sql);\r\n\t\t\twhile ($row=mysql_fetch_array($rs))\r\n\t\t\t{\r\n\t\t\t\t$myPage = new PhenotypePage($row[\"pag_id\"]);\r\n\t\t\t\t$myPage->rebuildURLs(true);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($clearcache==true)\r\n\t\t{\r\n\t\t\t$myPT->clearcache();\r\n\t\t}\r\n\t}", "protected function addLinks()\n {\n }" ]
[ "0.5961742", "0.5837436", "0.579622", "0.5582788", "0.5353659", "0.5343597", "0.5245928", "0.5203176", "0.51202154", "0.5108051", "0.51018727", "0.5080132", "0.50636655", "0.50255495", "0.50093037", "0.49794492", "0.49744123", "0.49476054", "0.49207735", "0.49072805", "0.48798513", "0.48749745", "0.48722064", "0.48653752", "0.48399982", "0.48389748", "0.47908723", "0.47757936", "0.47487542", "0.4745873", "0.4734273", "0.4710919", "0.47102916", "0.47061688", "0.4683652", "0.46394393", "0.4633455", "0.46321845", "0.46199962", "0.46152502", "0.45825008", "0.45777553", "0.45759308", "0.457523", "0.4567434", "0.45669112", "0.45554423", "0.4551295", "0.45457825", "0.45405462", "0.45392257", "0.45324075", "0.45296565", "0.45254225", "0.45192078", "0.4516891", "0.4511764", "0.45076448", "0.45073372", "0.45029712", "0.4500777", "0.44988605", "0.44987372", "0.4494413", "0.4494394", "0.4486604", "0.4484332", "0.44831687", "0.4478382", "0.44727764", "0.44704005", "0.44689062", "0.446572", "0.44632685", "0.44603753", "0.44597787", "0.4455937", "0.44522375", "0.4447506", "0.4441417", "0.44311044", "0.44272014", "0.44250432", "0.4424915", "0.44191912", "0.44126686", "0.44086486", "0.44032064", "0.43940932", "0.43893397", "0.4389312", "0.4389083", "0.43871737", "0.43850428", "0.43821177", "0.43780527", "0.4375796", "0.4371964", "0.43676764", "0.43635973" ]
0.7968182
0
Get post excerpt If the page that is being shared is a page or single post, attempt to get the excerpt from it without any HTML tags.
private function getPostExcerpt() { global $post; // If this is not a page or a single post, it cannot have an excerpt and // so the method should return an empty string. if (!is_page() && !is_singular()) { return ''; } // Attempt to get a manaul excerpt $excerpt = apply_filters('the_excerpt', $post->post_excerpt); // If there is no manual excerpt, use the main content instead if (!$excerpt) { $excerpt = apply_filters('the_content', $post->post_content); } // Return the excerpt, stripped of any HTML code return strip_tags($excerpt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTheExcerpt($post){\n\t$postfile = file_get_contents($post);\n\t$fullpost = getBetween('<div class=\"content\">',\"&nbsp;</div>\",$postfile);\n\t$postExcerpt = trimText($fullpost,750);\n\t$postExcerpt = stripslashes($postExcerpt);\n\treturn $postExcerpt;\n}", "public function excerpt() { return $this->post->post_excerpt; }", "public function excerpt()\n\t{\n\t\treturn ( ! empty($this->excerpt))? $this->excerpt : truncate_word($this->content, 200);\n\t}", "public function getExcerpt(Block $post)\n {\n // TODO: replace by ability to set custom excerpt\n $excerpt = $postBody = $post->getBodyForInsertion();\n if (preg_match('/^.{1,260}\\b/s', $postBody, $match))\n {\n $excerpt = $match[0];\n }\n\n return $excerpt;\n }", "private function excerptClass($post) {\n\t\tif($this->excerpt == FALSE)\n\t\t\treturn $post;\n\t\telseif(is_string($this->excerpt))\n\t\t{\n\t\t\t$post->{$this->contentField} = $post->{$this->excerpt};\n\t\t}\n\t\telseif(is_int($this->excerpt))\n\t\t{\n\t\t\t$content = strip_tags($post->{$this->contentField});\n\t\t\tif(strlen($content)>$this->excerpt)\n\t\t\t\t$content = substr($content, 0, ($this->excerpt-1)).\"&hellip;\";\n\t\t\t$post->{$this->contentField} = $content;\n\t\t}\n\t\treturn $post;\n\t}", "function jwp_post_excerpt() {\n return JWP_Post_Excerpt::get_instance();\n}", "public function excerpt()\n {\n if (!$this->desc()->empty()) {\n $excerpt = $this->desc();\n } else {\n $excerpt = excerpt($this->text(), $length = 40, $mode = 'words');\n };\n\n return $excerpt;\n }", "function get_post_excerpt($entity)\n {\n return '';\n }", "function cc_post_excerpt() {\n\tglobal $post;\n\n\t$excerpt = htmlentities(strip_tags($post->post_content));\n\t$excerpt_a = array_slice (explode(\" \", $excerpt), 0, 55);\n\techo implode(\" \", $excerpt_a) . \"...\";\n}", "function get_the_excerpt($post = \\null)\n {\n }", "function accouk_post_excerpt() {\n if(has_excerpt()) {\n the_excerpt();\n }\n}", "private function retrieve_excerpt_only() {\n\t\t$replacement = null;\n\n\t\t// The check `post_password_required` is because excerpt must be hidden for a post with a password.\n\t\tif ( ! empty( $this->args->ID ) && $this->args->post_excerpt !== '' && ! post_password_required( $this->args->ID ) ) {\n\t\t\t$replacement = wp_strip_all_tags( $this->args->post_excerpt );\n\t\t}\n\n\t\treturn $replacement;\n\t}", "private function excerptAssoc($post) {\n\t\tif($this->excerpt == FALSE)\n\t\t\treturn $post;\n\t\telseif(is_string($this->excerpt))\n\t\t{\n\t\t\t$post[$this->contentField] = $post[$this->excerpt];\n\t\t}\n\t\telseif(is_int($this->excerpt))\n\t\t{\n\t\t\t$content = strip_tags($post[$this->contentField]);\n\t\t\tif(strlen($content)>$this->excerpt)\n\t\t\t\t$content = substr($content, 0, ($this->excerpt-1)).\"&hellip;\";\n\t\t\t$post[$this->contentField] = $content;\n\t\t}\n\t\treturn $post;\n\t}", "public function getExcerpt()\n {\n return $this->excerpt = get_the_excerpt($this->id);\n }", "function postExcerpt($content) {\n\t\t$clean = strip_tags($content);\n\t\tif (strlen($clean) > 120){\n\t\t\t$excerpt = substr($clean, 0, strpos($clean, ' ', 120));\n\t\t\tprint $excerpt . ' ...';\n\t\t}\n\t}", "function mobject_excerpt_filter( $excerpt_text, $post ) {\n\tif ( $excerpt_text ) {\n\t\treturn $excerpt_text;\n\t}\n\treturn wp_trim_excerpt( '', $post );\n}", "private function retrieve_excerpt() {\n\t\t$replacement = null;\n\n\t\t// The check `post_password_required` is because excerpt must be hidden for a post with a password.\n\t\tif ( ! empty( $this->args->ID ) && ! post_password_required( $this->args->ID ) ) {\n\t\t\tif ( $this->args->post_excerpt !== '' ) {\n\t\t\t\t$replacement = wp_strip_all_tags( $this->args->post_excerpt );\n\t\t\t}\n\t\t\telseif ( $this->args->post_content !== '' ) {\n\t\t\t\t$replacement = wp_html_excerpt( strip_shortcodes( $this->args->post_content ), 156 );\n\t\t\t\t// Trim the auto-generated string to a word boundary.\n\t\t\t\t$replacement = substr( $replacement, 0, strrpos( $replacement, ' ' ) );\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}", "public function get_excerpt() {\n\t\tif ( $excerpt = $this->get_field( 'post_excerpt' ) ) {\n\t\t\treturn $excerpt;\n\t\t}\n\t}", "function improved_trim_excerpt($text) { // Fakes an excerpt if needed\n global $post;\n if ( '' == $text ) {\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n \n\t$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);\n\t$text = preg_replace('@<style[^>]*?>.*?</style>@si', '', $text);\n\t$text = preg_replace('@<p class=\"wp-caption-text\"[^>]*?>.*?</p>@si', '', $text);\t\n $text = str_replace('\\]\\]\\>', ']]&gt;', $text);\n $text = strip_tags($text, '<p><i><em><b><a><strong>');\n $excerpt_length = 140;\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words)> $excerpt_length) {\n array_pop($words);\n array_push($words, '... <a href=\"'.get_permalink($post->ID).'\">'.'Read More &raquo;'.'</a>');\n $text = implode(' ', $words);\n }\n }\nreturn $text;\n}", "function lucasato_get_the_excerpt($post_id)\n{\n $output = get_the_excerpt($post_id);\n return $output;\n}", "public function get_the_excerpt( $excerpt, $_post ) {\n\t\tglobal $post;\n\n\t\tif ( false !== strpos( get_post_type( $_post->ID ), 'tribe_' ) && is_archive() && ! empty( $post->ID ) && $post->ID === $_post->ID ) {\n\t\t\treturn fusion_get_post_content( $post->ID, 'yes', apply_filters( 'excerpt_length', 55 ), true );\n\t\t}\n\n\t\treturn $excerpt;\n\t}", "function robins_get_the_excerpt($post_id) {\n global $post; \n $save_post = $post;\n $post = get_post($post_id);\n $output = get_the_excerpt();\n $post = $save_post;\n return $output;\n}", "public function get_excerpt();", "function ridizain_recentpost_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\tif (get_theme_mod( 'ridizain_recentpost_excerpt_length' )) :\r\n\t\t\t$limit = get_theme_mod( 'ridizain_recentpost_excerpt_length' );\r\n\t\t\telse : \r\n\t\t\t$limit = '15';\r\n\t\t\tendif;\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}", "public function excerpt(): string\n {\n $excerpt = get_the_excerpt($this->wpPost);\n\n return $this->setAttribute(__METHOD__, $excerpt);\n }", "function voyage_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(voyage_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(voyage_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('voyage_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkdf-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "protected function prepare_excerpt_response($excerpt, $post)\n {\n }", "public function getExcerpt()\r\n\t\t{\r\n\t\t\treturn $this->_excerpt;$this->_created_date;\r\n\t\t}", "function get_my_excerpt(){\n\t$text = get_the_content();\n\t$text = strip_shortcodes($text);\n\t$text = apply_filters('the_content', $text);\n\t$text = strip_tags($text);\n\t$excerpt_length = 30; // set the number of words here\n\t$excerpt_more = '...';\n\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\treturn $text;\n}", "function themify_custom_excerpt_more($more) {\n global $post;\n return '';\n}", "function the_excerpt()\n {\n }", "function kstHelpWordpressBlogPosts_excerptsAndMoreTeasers() {\n ?>\n <p>\n Your theme uses the excerpt field as well as the &lt;--more--&gt; tag giving\n you many options for formatting your blog index. Many themes use either the\n excerpt or the &lt;--more--&gt; tag to control what content appears on your\n blog index.\n </p>\n <p>\n Posts are displayed on the index in one of these formats (and order shown):\n </p>\n <ol>\n <li>Title and excerpt (if you type anything in the excerpt field)</li>\n <li>Title and the post up to the &lt;--more--&gt; (if you insert &lt;--more--&gt; in the post)</li>\n <li>Title and the entire post (if you do not enter an excerpt or the &lt;--more--&gt; tag)</li>\n </ol>\n <p><em>i.e. If you enter an excerpt and include a &lt;--more--&gt; tag only the excerpt will display</em></p>\n <p>\n <strong>How to use the \"more\" tag:</strong>\n </p>\n <p>\n In \"Visual\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Click the button above the post editor that looks like\n a rectangle cut in two pieces (a small rectangle on top and a longer rectangle on the button).\n A line that says \"more\" will appear.\n </p>\n <p>\n In \"html\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Type &lt;--more--&gt; on it's own line.\n </p>\n <p>\n Note: You may also customize the \"more\" link text that is shown per post (only possible using \"html\" mode).<br />\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Simply type the text to use after \"more\" e.g. &lt;--more But wait, there's more! --&gt;\n </p>\n <?php\n}", "public function getExcerpt(): string\n {\n return $this->_excerpt;\n }", "function custom_trim_excerpt($text) { // Fakes an excerpt if needed\rglobal $post;\rif ( '' == $text ) {\r$text = get_the_content('');\r$text = apply_filters('the_content', $text);\r$text = str_replace(']]>', ']]>', $text);\r$text = strip_tags($text);\r$excerpt_length = 90;\r$words = explode(' ', $text, $excerpt_length + 1);\rif (count($words) > $excerpt_length) {\rarray_pop($words);\rarray_push($words, '...');\r$text = implode(' ', $words);\r}\r}\rreturn $text;\r}", "function get_mpost_excerpt($blogid, $post_id)\r\n{\r\n\tglobal $wpdb;\r\n\t\r\n\tif($blog[ 'blog_id' ]==1)\r\n\t{\r\n\t\t$pexcerpt = $wpdb->get_row( \" select meta_value from wp_6637def821_postmeta where post_id = \".$post_id.\" and meta_key = 'search_excerpt ' \", ARRAY_A ); \r\n\t}\r\n\telse\r\n\t{\r\n\t\t$pexcerpt = $wpdb->get_row( \" select meta_value from wp_6637def821_\".$blogid.\"_postmeta where post_id = \".$post_id.\" and meta_key = 'search_excerpt ' \", ARRAY_A ); \r\n\t}\r\n\t\r\n\treturn $pexcerpt;\r\n}", "function indieweb_publisher_show_excerpt() {\n\t\t/* Only show excerpts for Standard post format OR Chat format,\n\t\t * when this is not both the very first standard post and also a Sticky post AND\n\t\t * when excerpts enabled or One-Sentence Excerpts enabled AND\n\t\t * this is not the very first standard post when Show Full Content First Post enabled\n\t\t */\n\t\tif ( ( !get_post_format() || 'chat' === get_post_format() ) ) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function custom_field_excerpt() {\n\tglobal $post;\n\t$text = get_template_part( 'partials/search' , 'flexible' ); \n\tif ( '' != $text ) {\n\t\t$text = strip_shortcodes( $text );\n $text = preg_replace( '@<(script|style)[^>]*?>.*?</\\\\1>@si', '', $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]&gt;', ']]&gt;', $text);\n\t\t$excerpt_length = 20; // 20 words\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n \n\t}\n\treturn apply_filters($text);\n}", "function excerpt_size($legth = 150) {\r\n global $post;\r\n return substr(strip_tags($post->post_content), 0, $legth).'...';\r\n}", "function emc_the_link_excerpt() {\r\n\r\n\t$title = ( get_field( 'link_title' ) ) ? get_field( 'link_title' ) : get_the_title();\r\n\t$url = ( is_single() ) ? get_field( 'link_url' ) : get_permalink();\r\n\t$source = get_field( 'source' );\r\n\t$excerpt = get_field( 'excerpt' );\r\n\r\n\tif ( ! $url ) return false; ?>\r\n\r\n\t<div class=\"emc-link\">\r\n\t\t<a href=\"<?php echo esc_url( $url ); ?>\">\r\n\t\t\t<!--<?php echo get_the_post_thumbnail( get_the_ID(), 'thumbnail' ); ?>-->\r\n\t\t\t<div class=\"emc-link-content\">\r\n\t\t\t\t<h2 class=\"emc-link-title\"><?php echo esc_html( $title ); ?></h2>\r\n\t\t\t\t<?php if(is_single()) {\r\n\t\t \techo '<div class=\"link-post-icon\"><img src=\"http://earlymath.erikson.edu/wp-content/themes/emc/img/icon-link.png\"></div>';\r\n\t\t \t}?>\r\n\t\t\t\t<div class=\"emc-link-source\"><?php echo esc_html( $source ); ?></div>\r\n\t\t\t\t<?php echo esc_html( $excerpt ); ?>\r\n\t\t\t</div>\r\n\t\t</a>\r\n\t</div><!-- .emc-link -->\r\n\r\n<?php }", "function get_post_excerpt_by_id($post_id) {\n global $post;\n $post = get_post( $post_id );\n setup_postdata( $post );\n $the_excerpt = get_the_excerpt();\n wp_reset_postdata();\n return $the_excerpt;\n}", "function thinkup_input_blogpostexcerpt() {\n\n// Get theme options values.\n$thinkup_blog_postswitch = thinkup_var ( 'thinkup_blog_postswitch' );\n$thinkup_blog_postexcerpt = thinkup_var ( 'thinkup_blog_postexcerpt' );\n\n\tif ( $thinkup_blog_postswitch == 'option1' or empty( $thinkup_blog_postswitch ) ) {\n\n\t\tif ( thinkup_check_isblog() ) {\n\t\t\tif ( is_numeric( $thinkup_blog_postexcerpt ) ) {\n\t\t\t\treturn $thinkup_blog_postexcerpt;\n\t\t\t}\n\t\t}\n\t}\n\n\t// return default value if not triggered above\n\treturn 55;\n}", "function get_the_content($more_link_text = \\null, $strip_teaser = \\false, $post = \\null)\n {\n }", "function always_the_excerpt() {\n\tglobal $more;\n\t$old_more = isset($more) ? $more : null;\n\t$more = 0;\n\tthe_excerpt();\n\t$more = $old_more;\n}", "function medigroup_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(medigroup_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(medigroup_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(medigroup_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('medigroup_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkd-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "protected function getExcerpt($content)\n {\n // Check for excerpt tags\n $pattern = '#(\\<\\!\\-\\-\\s?excerpt\\s?\\-\\-\\>)(.*)(\\<\\!\\-\\-\\s?endexcerpt\\s?\\-\\-\\>)#si';\n if (preg_match($pattern, $content, $matches)) {\n return $matches[2];\n }\n\n // If all else get the content from the first paragraph\n return $this->description;\n }", "function cmsmasters_post_exc_cont($show = true) {\n\t$out = cmsmasters_divpdel('<div class=\"cmsmasters_post_content entry-content\">' . \"\\n\" . \n\t\twpautop(theme_excerpt(20, false)) . \n\t'</div>' . \"\\n\");\n\t\n\t\n\tif (theme_excerpt(20, false) != '') {\n\t\tif ($show) {\n\t\t\techo $out;\n\t\t} else {\n\t\t\treturn $out;\n\t\t}\n\t}\n}", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>Read More</a>\";\necho $excerpt;\n}", "function excerpt($num) {\n$limit = $num+1;\n$excerpt = explode(' ', get_the_excerpt(), $limit);\narray_pop($excerpt);\n$excerpt = implode(\" \",$excerpt).\" <a href='\" .get_permalink($post->ID) .\" ' class='\".readmore.\"'>READ THIS</a>\";\necho $excerpt;\n}", "function ridizain_ephemera_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\t$limit = '15';\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}", "public function filter_post_content_excerpt($text)\n\t{\n\t\tif(strlen($text) > 280) {\n\t\t\t// cut off everything after the word at position 280. Don't use \\W so we don't cut HTML tags\n\t\t\t$rest = preg_replace('/[ .\\-]+.*/', '', substr($text, 280));\n\t\t\treturn substr($text, 0, 280) . $rest;\n\t\t}\n\t\treturn $text;\n\t\t\n\t\t// Alternative method: Return match[0] from /(\\w+\\W+){50}/ for the first 50 words\n\t}", "function TS_VCSC_Custom_Excerpt_Routines() {\r\n\t\t\t// Setze Auszugslänge Global auf 100 Wörter\r\n\t\t\tfunction TS_VCSC_Custom_Excerpt_Length($length) {\r\n\t\t\t\treturn 100;\r\n\t\t\t}\r\n\t\t\tadd_filter('excerpt_length', 'TS_VCSC_Custom_Excerpt_Length', \t888);\r\n\t\t\t\r\n\t\t\t// Entferne Standard WP Routine für den Beitragsauszug\r\n\t\t\tremove_filter('get_the_excerpt', 'wp_trim_excerpt');\r\n\t\t\t\r\n\t\t\t// Erstellt Auszugsinhalt unter Berücksichtigung von WBP Textblock Inhalten\r\n\t\t\tfunction TS_VCSC_Custom_Excerpt_Content($text) {\r\n\t\t\t\tglobal $post;\r\n\t\t\t\t// Speichere RAW Auszugs Text\r\n\t\t\t\t$excerpt_rawcode\t= $text;\r\n\t\t\t\t// Setze Auszugslänge auf 100 Wörter\r\n\t\t\t\t$excerpt_length \t= apply_filters('excerpt_length', \t\t100);\r\n\t\t\t\t// Definiere den Indikator für mehr Inhalt\r\n\t\t\t\t$excerpt_more \t\t= apply_filters('excerpt_more', ' ' . '[...]');\r\n\t\t\t\t// Entferne WBP Textblock Shortcodes vom Filter\r\n\t\t\t\t$excerpt_composer \t= array('vc_column_text', 'TS_VCSC_Advanced_Textblock');\r\n\t\t\t\t$excerpt_values\t\t= array_values($excerpt_composer);\r\n\t\t\t\t$excerpt_exclude \t= implode('|', $excerpt_values);\r\n\t\t\t\t// Nutze Beitragsinhalt wenn kein Auszug vorhanden\t\r\n\t\t\t\tif ('' == $text) {\r\n\t\t\t\t\t$text \t\t\t= get_the_content('');\r\n\t\t\t\t\t$text\t\t\t= preg_replace(\"~(?:\\[/?)(?!(?:$excerpt_exclude))[^/\\]]+/?\\]~s\", '', $text);\r\n\t\t\t\t\t$text \t\t\t= apply_filters('the_content', $text);\r\n\t\t\t\t\t$text \t\t\t= str_replace(']]>', ']]&gt;', $text);\r\n\t\t\t\t}\r\n\t\t\t\t// Entferne jedweden HTML oder PHP Code\r\n\t\t\t\t$text \t\t\t\t= strip_tags($text);\r\n\t\t\t\t// Kürze Ausug auf die Anzahl von vorgegebenen Wörtern\r\n\t\t\t\t$text \t\t\t\t= wp_trim_words($text, $excerpt_length, $excerpt_more);\r\n\t\t\t\treturn apply_filters('wp_trim_excerpt', $text, $excerpt_rawcode);\r\n\t\t\t}\r\n\t\t\tadd_filter('get_the_excerpt', 'TS_VCSC_Custom_Excerpt_Content', 999);\r\n\t\t}", "public function getExcerptAttribute()\n {\n $value = $this->getAttribute('content');\n $format = $this->attributes['format'];\n\n list($excerpt, ) = explode('<!--more-->', $value, 2);\n\n return StoryFormat::driver($format)->parse($excerpt);\n }", "function octavo_trim_excerpt($return = '') {\n\t\n\t# Use `1` to finish sentence, otherwise use `0`.\n\t$finish_sentence = 1;\n\t# Tags to allow in the excerpt:\n\t$allowed_tags = '<a><strong><b><em><i>';\n\t\n\tif ($return == '') {\n\t\t\n\t\t# Setup text:\n\t\t$text = $return;\n\t\t# Get the full content:\n\t\t$text = get_the_content('');\n\t\t# Delete all shortcode tags from the content:\n\t\t$text = strip_shortcodes($text);\n\t\t# Filter it:\n\t\t$text = apply_filters('the_content', $text);\n\t\t# From the default wp_trim_excerpt():\n\t\t$text = str_replace(']]>', ']]&gt;', $text); // Some kind of precaution against malformed CDATA in RSS feeds I suppose.\n\t\t# Remove script tags:\n\t\t$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);\n\t\t# Allowed tags?\n\t\t$text = strip_tags($text, $allowed_tags);\n\t\t\n\t\t# Word length (depends on setting above).\n\t\t$excerpt_length = apply_filters('excerpt_length', 55); // Defaults to `55` words.\n\t\t\n\t\t# Divide the string into tokens; HTML tags, or words, followed by any whitespace:\n\t\t$tokens = array();\n\t\tpreg_match_all('/(<[^>]+>|[^<>\\s]+)\\s*/u', $text, $tokens);\n\t\t\n\t\t# Itterate over word tokens:\n\t\t$word = 0;\n\t\tforeach ($tokens[0] as $token) {\n\t\t\t\n\t\t\t# Parse each token:\n\t\t\tif (($word >= $excerpt_length) && ( ! $finish_sentence)) {\n\t\t\t\t\n\t\t\t\t# Limit reached:\n\t\t\t\tbreak; // Quit the loop.\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t# Is token a tag?\n\t\t\tif ($token[0] != '<') {\n\t\t\t\t\n\t\t\t\t# Check for the end of the sentence: '.', '?' or '!':\n\t\t\t\tif (($word >= $excerpt_length) && $finish_sentence && (preg_match('/[\\?\\.\\!]\\s*$/uS', $token) == 1)) {\n\t\t\t\t\t\n\t\t\t\t\t# Limit reached!\n\t\t\t\t\t$return .= trim($token); // Continue until '?' '.' or '!' occur to reach the end of the sentence.\n\t\t\t\t\t\n\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# Add `1` to $word:\n\t\t\t\t$word++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t# Append what's left of the token:\n\t\t\t$return .= $token;\n\t\t\t\n\t\t}\n\t\t\n\t\t# Add the excerpt suffix:\n\t\t$return .= apply_filters('excerpt_more', ' &hellip;');\n\t\t\n\t\t# Balances tags:\n\t\t$return = force_balance_tags($return);\n\t\t\n\t\t# Trim:\n\t\t$return = trim($return);\n\t\t\n\t}\n\t\n\t# Return the excerpt:\n\treturn $return;\n\t\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div><a href=\"'. get_permalink($post->ID) . '\" > ... Click to View Full Post</a></div>;';\n}", "function get_the_excerpt_here( $post_id ) {\n global $wpdb;\n\n $query = \"SELECT post_excerpt FROM wp_posts WHERE ID = {$post_id} LIMIT 1\";\n $result = $wpdb->get_results($query, ARRAY_A);\n\n return $result[0]['post_excerpt'];\n}", "public static function excerpt_length() {\n\t\t\t$cpt = self::get_post_type();\n\n\t\t\tif ( $cpt && $cpt !== 'post' ) {\n\t\t\t\treturn self::option( 'post_excerpt_' . $cpt, 20 );\n\t\t\t}\n\n\t\t\treturn self::option( 'post_excerpt', 20 );\n\t\t}", "function barjeel_excerpt($more) {\n global $post;\n return '&nbsp; &nbsp;<a href=\"'. get_permalink($post->ID) . '\">...Continue Reading</a>';\n}", "function dg_excerpt() {\n global $post;\n $excerpt = '<p>' . get_the_excerpt() . ' <a class=\"more\" href=\"'. get_permalink($post->ID) . '\" title=\"'. get_the_title($post->ID) .'\">Read&nbsp;more&nbsp;»</a></p>';\n echo $excerpt;\n}", "function get_excerpt($post, $length, $link){\n\n\t$excerpt = get_the_content($post);\n\t$excerpt = preg_replace(\" ([.*?])\",'',$excerpt);\n\t$excerpt = strip_shortcodes($excerpt);\n\t$excerpt = strip_tags($excerpt);\n\t$excerpt = substr($excerpt, 0, $length);\n\t$excerpt = substr($excerpt, 0, strripos($excerpt, \" \"));\n\t$excerpt = trim(preg_replace( '/s+/', 's', $excerpt));\n\t//$excerpt = $excerpt.'... <a href=\"'.$link.'\">more</a>';\n\t$excerpt = $excerpt.' [...]';\n\treturn $excerpt;\n}", "function thefirst_new_excerpt_more($more) {\n global $post;\n\treturn '...';\n}", "function jetpack_the_excerpt_customizer( $excerpt ) {\n\tif ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {\n\t\tob_start();\n\t\tthe_content(\n\t\t\tsprintf(\n\t\t\t\twp_kses(\n\t\t\t\t\t/* translators: %s: Name of current post. Only visible to screen readers */\n\t\t\t\t\t__( 'Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>', 'jetpack' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tget_the_title()\n\t\t\t)\n\t\t);\n\t\t$content = ob_get_clean();\n\t}\n\tif ( empty( $content ) ) {\n\t\treturn $excerpt;\n\t} else {\n\t\treturn sprintf( '<div class=\"jetpack-blog-display jetpack-the-content\">%s</div><div class=\"jetpack-blog-display jetpack-the-excerpt\">%s</div>', $content, $excerpt );\n\t}\n}", "function get_character_limited_excerpt(){\n$permalink = get_permalink($post->ID);\n$excerpt = get_the_content();\n$excerpt = preg_replace(\" (\\[.*?\\])\",'',$excerpt);\n$excerpt = strip_shortcodes($excerpt);\n$excerpt = strip_tags($excerpt);\n$excerpt = substr($excerpt, 0, 150);\n$excerpt = substr($excerpt, 0, strripos($excerpt, \" \"));\n$excerpt = trim(preg_replace( '/\\s+/', ' ', $excerpt));\n$excerpt = $excerpt.'... <a href=\"'.$permalink.'\">Read More</a>';\nreturn $excerpt;\n}", "function custom_field_excerpt2() {\n\tglobal $post;\n\t$text = get_field('article_main');\n\tif ( '' != $text ) {\n\t\t$text = strip_shortcodes( $text );\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t$excerpt_length = 20; // 20 words\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\t}\n\treturn apply_filters('the_excerpt', $text);\n}", "function ridizain_featured_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\t$limit = '15';\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}", "function rw_custom_excerpt_more( $output )\n{\n if( has_excerpt() && !is_attachment() )\n {\n $output .= rw_continue_reading_link();\n }\n return $output;\n}", "function monaco_child_get_the_excerpt($content) {\n global $post;\n $link = '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> ' . __('[Read the full article...]', 'patrick') . '</a>';\n return preg_replace('/\\[.*\\]$/', '', $content) . $link;\n}", "function nightsky_excerpt_more( $more ) {\n global $post;\n return ' <p class=\"readmore\"><a href=\"' . get_permalink( $post->ID ) . '\">Continue reading ' . $post->post_title . '</a></p>';\n}", "function add_excerpt_support_for_pages() {\n\tadd_post_type_support( 'page', 'excerpt' );\n}", "function add_excerpt_support_for_pages() {\n\tadd_post_type_support( 'page', 'excerpt' );\n}", "function jetpack_the_content_to_the_excerpt( $content ) {\n\tif ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {\n\t\tif ( post_password_required() ) {\n\t\t\t$content = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) );\n\t\t} else {\n\t\t\t$content = jetpack_blog_display_custom_excerpt( $content );\n\t\t}\n\t}\n\treturn $content;\n}", "function launchpad_seo_excerpt($max_words = 32, $echo = false, $id = false) {\n\tglobal $post;\n\t\n\t$tmp_post = false;\n\t\n\t// If an ID was passed, get the individual post.\n\tif($id !== false && (int) $id) {\n\t\t$tmp_post = get_post($id);\n\t}\n\t\n\t// If there was no post based on the ID, use the global $post.\n\tif(!$tmp_post) {\n\t\t$tmp_post = $post;\n\t}\n\t\n\tif(!$tmp_post) {\n\t\treturn;\n\t}\n\t\n\t// Get the SEO information for the post.\n\t$seo = get_post_meta($tmp_post->ID, 'SEO', true);\n\t\n\t// If a meta description was set, use it.\n\tif(isset($seo['meta_description']) && trim($seo['meta_description'])) {\n\t\t$seo['meta_description'] = htmlentities($seo['meta_description'], ENT_QUOTES);\n\t\t\n\t\tif($echo) {\n\t\t\techo $seo['meta_description'];\n\t\t}\n\t\treturn trim($seo['meta_description']);\n\t\n\t// If not, get the auto-generated excerpt.\n\t} else {\n\t\treturn launchpad_excerpt($max_words, $echo, $id);\n\t}\n}", "function ci_e_content($more_link_text = null, $stripteaser = false)\n{\n\tglobal $post, $ci;\n\tif (is_single() or is_page())\n\t\tthe_content(); \n\telse\n\t{\n\t\tif(ci_setting('preview_content')=='enabled')\n\t\t{\n\t\t\tthe_content($more_link_text, $stripteaser);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthe_excerpt();\n\t\t}\n\t}\n}", "function custom_excerpt($text = '') {\r\n\t$raw_excerpt = $text;\r\n\tif ( '' == $text ) {\r\n\t\t$text = get_the_content('');\r\n // $text = strip_shortcodes( $text );\r\n\t\t$text = do_shortcode( $text );\r\n\t\t$text = apply_filters('the_content', $text);\r\n\t\t$text = str_replace(']]>', ']]>', $text);\r\n\t\t$excerpt_length = apply_filters('excerpt_length', 55);\r\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\r\n\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\r\n\t}\r\n\treturn apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\r\n}", "function the_excerpt_limit($limit, $max = '') {\r\n $excerpt = get_the_excerpt_limit( $limit, $max );\r\n $excerpt = sprintf('<p>%s</p>', strip_tags($excerpt));\r\n\r\n echo $excerpt;\r\n\r\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div class=\"view-full-post\"><a href=\"'. get_permalink($post->ID) . '\" class=\"view-full-post-btn\">Skaityti</a></div>';\n}", "function get_first_paragraph($_id_post){\n\t\n\t$post = get_post($_id_post);\n\n\t$text = $post->post_content;\n\n\t$start = strpos($text, '<p>'); // Locate the first paragraph tag\n\t$end = strpos($text, '</p>', $start); // Locate the first paragraph closing tag\n\t$text = substr($text, $start, $end-$start+4); // Trim off everything after the closing paragraph tag\n\t$text = strip_shortcodes( $text ); // Remove shortcodes\n\t$text = apply_filters('the_content', $text); // remove tag html by wp\n\t$text = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $text);\t // Remove tag script\n\t$text = wpautop( $text );\t// Remove break\n\t$text = strip_tags($text);\t// Remove tags html\n\n\treturn $text ;\n\t \n}", "function register_block_core_post_excerpt()\n {\n }", "public function getExcerptAttribute()\n {\n $body = $this->description;\n $words = explode(\" \", $body);\n $words30 = array_slice($words,0,30);\n\n $excerpt = implode(' ', $words30);\n\n return strip_tags($excerpt);\n }", "function launchpad_excerpt($max_words = 32, $echo = false, $id = false) {\n\tglobal $post;\n\t\n\t$tmp_post = false;\n\t\n\t// If an ID was passed, get the individual post.\n\tif($id !== false && (int) $id) {\n\t\t$tmp_post = get_post((int) $id);\n\t}\n\t\n\t// If there was no post based on the ID, use the global $post.\n\tif(!$tmp_post) {\n\t\t$tmp_post = $post;\n\t}\n\t\n\t// Normalize the max words.\n\t$max_words = (int) $max_words;\n\t\n\t// If the user made an excerpt, use it.\n\tif($tmp_post->post_excerpt) {\n\t\t$excerpt = $tmp_post->post_excerpt;\n\t\n\t// If the user added a more tag, use that content.\n\t} else if(stristr($tmp_post->post_content, '<!--more-->') !== false) {\n\t\t$excerpt = explode('<!--more-->', $tmp_post->post_content);\n\t\t$excerpt = array_shift($excerpt);\n\t\t$excerpt = strip_tags(apply_filters('the_content', $excerpt));\n\t\n\t// If all else fails, generate an excerpt based on the max words.\n\t} else {\n\t\t$content = $tmp_post->post_content;\n\t\t$content = trim(preg_replace('/\\s+/', ' ', strip_tags(apply_filters('the_content', $content))));\n\t\t$excerpt = explode(' ', $content);\n\t\t$excerpt = array_slice($excerpt, 0, $max_words);\n\t\t$excerpt = implode(' ', $excerpt);\n\t\tif(preg_match('/[A-Za-z0-9]/', substr($excerpt, -1))) {\n\t\t\t$excerpt .= '...';\n\t\t}\n\t}\n\t\n\t// Apply filters to allow the developer to change it.\n\t$excerpt = apply_filters('launchpad_excerpt', $excerpt);\n\t//$excerpt = htmlentities($excerpt, ENT_QUOTES);\n\t\n\tif($echo) {\n\t\techo $excerpt;\n\t}\n\treturn trim($excerpt);\n}", "function excerpt($limit)\n{\n\t$excerpt = explode(' ', do_shortcode(get_the_content()), $limit);\n\n\tif (count($excerpt)>=$limit)\n\t{\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t}\n\telse\n\t{\n\t\t$excerpt = implode(\" \",$excerpt);\n\t}\n\t\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\t\treturn $excerpt;\n}", "function ep_get_teaser_or_body() {\n\n\t$content = ep_get_the_content(\"teaser\");\n\tif (empty($content)) {\n\t\t$content = ep_get_the_content(\"body\");\n\t}\n\treturn $content;\n}", "function new_excerpt_more($more) {\n global $post;\n return '...';\n}", "function jetpack_the_excerpt_mixed_customizer( $content ) {\n\tif ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {\n\t\tjetpack_the_content_customizer_class( 'output-the-excerpt' );\n\t\tob_start();\n\t\tthe_content();\n\t\t$content = ob_get_clean();\n\t}\n\treturn $content;\n}", "function neu_excerpt($num) {\n\t$limit = $num+1;\n\tif( get_the_excerpt() ){\n\t\t$excerpt = get_the_excerpt();\n\t}else{\n\t\t//no hay extracto es un postevento\n\t\t$excerpt = get_field('descripcion_postevento');\n\t}\n\t$excerpt = explode(' ', $excerpt, $limit);\n\tarray_pop($excerpt);\n\t$excerpt = implode(\" \",$excerpt).\" [...]\"; \n\techo $excerpt;\n}", "function get_classes_excerpt(){\n$excerpt = get_the_excerpt();\n$excerpt = preg_replace(\" (\\[.*?\\])\",'',$excerpt);\n$excerpt = strip_shortcodes($excerpt);\n$excerpt = strip_tags($excerpt);\n$excerpt = substr($excerpt, 0, 225);\n$excerpt = substr($excerpt, 0, strripos($excerpt, \" \"));\n$excerpt = trim(preg_replace( '/\\s+/', ' ', $excerpt));\nreturn $excerpt;\n}", "function get_excerpt($cut_excerpt_default = '') {\r\n if ($this->post->post_excerpt != '') {\r\n return $this->post->post_excerpt;\r\n }\r\n\r\n\r\n $buffy = '';\r\n if ($cut_excerpt_default != '') {\r\n $db_content_excerpt = td_util::get_option(get_class($this) . '_content_excerpt');\r\n\r\n if ($db_content_excerpt != '') {\r\n //cut from the database settings\r\n $buffy .= td_util::excerpt($this->post->post_content, $db_content_excerpt);\r\n } else {\r\n //cut at the default size\r\n $buffy .= td_util::excerpt($this->post->post_content, $cut_excerpt_default);\r\n }\r\n } else {\r\n $buffy .= $this->post->post_content;\r\n }\r\n\r\n return $buffy;\r\n }", "public static function getExcerptFromPostID( $postID, $excerptLength = 35, $withP = false )\n\t\t{\n\n\t\t\t$postObject = get_post( $postID );\n\n\t\t\t// Gets post_content to be used as a basis for the excerpt\n\t\t\t$excerpt = $postObject->post_content;\n\t\t\t\n\t\t\t// Strips tags and images\n\t\t\t$excerpt = strip_tags( strip_shortcodes( $excerpt ) );\n\t\t\t$words = explode( ' ', $excerpt, $excerptLength + 1 );\n\n\t\t\tif( count( $words ) > $excerptLength ) :\n\n\t\t\t\tarray_pop( $words );\n\t\t\t\tarray_push( $words, '…' );\n\t\t\t\t$excerpt = implode( ' ', $words );\n\n\t\t\tendif;\n\n\t\t\tif( $withP ){\n\t\t\t\t$excerpt = '<p>' . $excerpt . '</p>';\n\t\t\t}\n\n\t\t\treturn $excerpt;\n\n\t\t}", "function wpcodex_add_excerpt_support_for_pages() {\n\tadd_post_type_support( 'page', 'excerpt' );\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt);\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function the_excerpt_embed()\n {\n }", "function wp_html_excerpt($str, $count, $more = \\null)\n {\n }", "function my_add_excerpts_to_pages()\n{\n add_post_type_support('page', 'excerpt');\n}", "function excerpt($limit) {\n\t$excerpt = explode(' ', get_the_excerpt(), $limit);\n\tif (count($excerpt)>=$limit) {\n\t\tarray_pop($excerpt);\n\t\t$excerpt = implode(\" \",$excerpt).'...';\n\t} else {\n\t\t$excerpt = implode(\" \",$excerpt);\n\t} \n\t$excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n\treturn $excerpt;\n}", "function maranatha_entry_widget_excerpt() {\n\n\tglobal $post;\n\n\t$excerpt = get_the_excerpt();\n\n\t$excerpt = strip_tags( $excerpt );\n\t$excerpt = ctfw_shorten( $excerpt, 180 );\n\t$excerpt = str_replace( ' [&hellip;]', '&hellip;', $excerpt );\n\t$excerpt = wptexturize( $excerpt );\n\n\techo apply_filters( 'maranatha_entry_widget_excerpt', $excerpt );\n\n}", "function hwp_get_excerpt( $excerpt_length = 55, $id = false, $echo = true ) {\n $text = '';\n\n if ( $id ) {\n $the_post = & get_post( $id );\n $text = ( $the_post->post_excerpt ) ? $the_post->post_excerpt : $the_post->post_content;\n } else {\n global $post;\n $text = ( $post->post_excerpt ) ? $post->post_excerpt : get_the_content( '' );\n }\n\n $text = strip_shortcodes( $text );\n $text = apply_filters( 'the_content', $text );\n $text = str_replace( ']]>', ']]&gt;', $text );\n $text = strip_tags( $text );\n\n $excerpt_more = ' ' . '...';\n $words = preg_split( \"/[\\n\\r\\t ]+/\", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY );\n\n if ( count( $words ) > $excerpt_length ) {\n array_pop( $words );\n $text = implode( ' ', $words );\n $text = $text . $excerpt_more;\n } else {\n $text = implode( ' ', $words );\n }\n\n if ( $echo ) {\n echo apply_filters( 'the_content', $text );\n } else {\n return $text;\n }\n}", "public function get_the_excerpt( $post, $excerpt_max_len = null, $desc_min_length = null ) {\n\n\t\tif ( ! is_object( $post ) || ! is_a( $post, 'WP_Post' ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( ! empty( $post->post_excerpt ) ) {\n\t\t\t$post_excerpt = $post->post_excerpt;\n\t\t} else {\n\t\t\t$excerpt_max_len = ( $excerpt_max_len ) ? (int) $excerpt_max_len : $this->excerpt_max_length;\n\t\t\t$desc_min_length = ( $desc_min_length ) ? (int) $desc_min_length : $this->excerpt_min_length;\n\n\t\t\t$post_content = wp_strip_all_tags( strip_shortcodes( $post->post_content ) );\n\t\t\t$post_excerpt = substr( $post_content, 0, $excerpt_max_len );\n\n\t\t\t$excerpt_period_position = strrpos( $post_excerpt, '.' );\n\t\t\tif ( $excerpt_period_position ) {\n\t\t\t\t$excerpt_ending_on_period = substr( $post_excerpt, 0, $excerpt_period_position + 1 );\n\n\t\t\t\t// If the description would be too small, then use an ellipsis.\n\t\t\t\tif ( strlen( $excerpt_ending_on_period ) < $desc_min_length ) {\n\t\t\t\t\t$post_excerpt .= '&hellip;';\n\t\t\t\t} else {\n\t\t\t\t\t$post_excerpt = $excerpt_ending_on_period;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$post_excerpt .= '&hellip;';\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Filter the excerpt as derived by this function.\n\t\t *\n\t\t * @param string $post_excerpt The derived excerpt.\n\t\t * @param WP_Post object $posts[0] The post object being considered.\n\t\t */\n\t\treturn apply_filters( 'amt_get_the_excerpt', $post_excerpt, $post );\n\t}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<p><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More</a></p>';\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'....';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'....';\n } else {\n $excerpt = implode(\" \",$excerpt);\n } \n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}", "function excerpt($limit) {\n $excerpt = explode(' ', get_the_excerpt(), $limit);\n if (count($excerpt)>=$limit) {\n array_pop($excerpt);\n $excerpt = implode(\" \",$excerpt).'...';\n } else {\n $excerpt = implode(\" \",$excerpt);\n }\t\n $excerpt = preg_replace('`\\[[^\\]]*\\]`','',$excerpt);\n return $excerpt;\n}" ]
[ "0.74206954", "0.7268432", "0.69454074", "0.6917724", "0.674359", "0.67123055", "0.6691639", "0.6671284", "0.6634482", "0.6632367", "0.6590873", "0.6552178", "0.6507734", "0.6503733", "0.6459561", "0.6452262", "0.6419904", "0.64083874", "0.63771987", "0.6353947", "0.6345391", "0.6227352", "0.6143553", "0.61173594", "0.6106649", "0.6103341", "0.60722643", "0.6072046", "0.605211", "0.6038152", "0.60280037", "0.6013411", "0.6011911", "0.599627", "0.5985432", "0.5984277", "0.5980694", "0.5970154", "0.59699064", "0.595421", "0.59515613", "0.5946487", "0.59442943", "0.5943253", "0.5937581", "0.5932086", "0.5916611", "0.5901209", "0.5844783", "0.583902", "0.58313286", "0.58297354", "0.581643", "0.5813846", "0.58051574", "0.57984567", "0.5797884", "0.5793349", "0.5789867", "0.57578516", "0.5747653", "0.5738454", "0.5738397", "0.5734971", "0.5732591", "0.57184035", "0.5711176", "0.57053375", "0.57053375", "0.5701555", "0.5701055", "0.5698874", "0.56828064", "0.56781477", "0.56671464", "0.5663163", "0.5660215", "0.56594414", "0.5657193", "0.5652991", "0.56420845", "0.56416196", "0.5629672", "0.56176656", "0.5617178", "0.56131005", "0.56097794", "0.5604894", "0.5601554", "0.55960387", "0.5590805", "0.55903745", "0.5584021", "0.55813444", "0.55764014", "0.5575969", "0.5569121", "0.55643713", "0.55643713", "0.55620867" ]
0.7835794
0
Return network URLs and other data as an array
public function getNetworks($keys = null, $templates = false) { // If no keys are specified, use the current active network list $keys = is_array($keys) ? $keys : $this->activeNetworks; $networks = []; // Add each valid network to the output array foreach ($keys as $key) { if (array_key_exists($key, $this->networks)) { $networks[$key] = $this->networks[$key]; // Remove the URL template if (!$templates) { unset($networks[$key]['template']); } } } return $networks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _getData(): array\n {\n $result = [\n 'url' => $this->getUrl(),\n ];\n\n return parent::normalizeData($result);\n }", "public function getUrls(): array;", "public function getUrls(): array;", "public function get() {\n\n\t\t$args = func_get_args();\n\n\t\tif( empty( $args ) ) {\n\n\t\t\t$networks = $this->_networks;\n\n\t\t} else {\n\t\t\t$networks = array();\n\n\t\t\tforeach ( $args as $network ) {\n\n\t\t\t\tif( in_array( $network, $this->_networks) ) {\n\t\t\t\t\t$networks[] = $network;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$urls = array();\n\n\t\tforeach ( $networks as $network ) {\n\t\t\t$url = call_user_func( array( $this, str_replace( '-', '_', $network ) ) );\n\n\t\t\tif( $url ) {\n\t\t\t\t$urls[ $network ] = $url;\n\t\t\t}\n\t\t}\n\n\t\treturn $urls;\n\t}", "public function getData()\n {\n $this->links;\n return $this->links;\n }", "public function getNetworks() {\n\n //GET NETWORK TABLE\n $tableNetwork = Engine_Api::_()->getDbtable('networks', 'network');\n\n //MAKE QUERY\n $select = $tableNetwork->select()\n ->from($tableNetwork->info('name'), array('network_id', 'title'))\n ->order('title');\n $result = $tableNetwork->fetchAll($select);\n\n $everyone = Zend_Registry::get('Zend_Translate')->_('Everyone');\n\n //MAKE DATA ARRAY\n $networksOptions = array('0' => $everyone);\n foreach ($result as $value) {\n $networksOptions[$value->network_id] = $value->title;\n }\n\n //RETURN\n return $networksOptions;\n }", "public function getLinksFormatted() { // @LOW work with a transient\n\t\tif (isset($this->links[0])) {\n\t\t\t$links = str_replace(\"\\r\\n\",\"\\n\",$this->links);\n\t\t\t$linkArray = GeneralUtility::trimExplode(\"\\n\", $links,1);\n\t\t\treturn $linkArray;\n\t\t}\n\t\treturn array();\n\t}", "public function toArray()\n {\n return $this->websites;\n }", "public function networks()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/networks');\n }", "public function toArray(): array\n {\n return [\n 'url' => $this->url\n ];\n }", "public function get_networks()\n {\n }", "function _tsuiseki_tracking_get_network_names() {\n return array(\n 'site',\n );\n}", "public function get_url(): array\n {\n // get the full url as an array\n $url['raw'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $url['array'] = explode(\"/\", $url['raw']);\n\n // shift the array to remove the first useless array key and remove blank values\n array_shift($url['array']);\n $url['array'] = array_filter($url['array']);\n\n // return the url array\n return $url['array'];\n }", "function yz_get_social_networks_fields() {\n\n // Init Vars\n $networks_fields = array();\n\n // Get Social Networks\n $social_networks = yz_option( 'yz_social_networks' );\n\n if ( empty( $social_networks ) ) {\n return false;\n }\n\n // Unserialize data\n if ( is_serialized( $social_networks ) ) {\n $social_networks = unserialize( $social_networks );\n }\n\n // Check if there's URL related to the icons.\n foreach ( $social_networks as $network => $data ) {\n $networks_fields[ $network ] = array( 'title' => $data['name'] );\n }\n\n return $networks_fields;\n}", "function getConnections(): array;", "public function getUriArray(){\n\t\t$this->prepareRuta();\n\t\treturn $this->uriArray;\n\t}", "function getAllLinks(){\r\n return $this->link_arry;\r\n }", "public function getUriList();", "private function getData()\n\t{\n\t\t$data['homeUrl'] = \"http://lancewf.no-ip.info\";\n\t\t\n\t\treturn $data;\t\n\t}", "public function getLinksArray()\n {\n $db = new db(self::db_links);\n return $db->getLinksArray();\n }", "public function getLinkData()\n {\n return array(\n 'loungetag' => $this->lounge->getLoungetag()\n );\n }", "public function getURLs()\n {\n $retVal = [];\n\n // Which fields/subfields should we check for URLs?\n $fieldsToCheck = [\n '856' => ['y', 'z'], // Standard URL\n '555' => ['a'] // Cumulative index/finding aids\n ];\n\n foreach ($fieldsToCheck as $field => $subfields) {\n $urls = $this->marcRecord->getFields($field);\n if ($urls) {\n foreach ($urls as $url) {\n // Is there an address in the current field?\n $address = $url->getSubfield('u');\n if ($address) {\n $address = $address->getData();\n\n // Is there a description? If not, just use the URL itself.\n foreach ($subfields as $current) {\n $desc = $url->getSubfield($current);\n if ($desc) {\n break;\n }\n }\n if ($desc) {\n $desc = $desc->getData();\n } else {\n $desc = $address;\n }\n\n $retVal[] = ['url' => $address, 'desc' => $desc];\n }\n }\n }\n }\n\n return $retVal;\n }", "public function getUrls()\r\n {\r\n }", "public function retrive() {\n $result = Url::all();\n\n $items = Array();\n $workArr = Array();\n\n foreach ($result as $row) {\n $workArr[] = $row['page_url'];\n $workArr[] = $row['link_url'];\n $workArr[] = $row['link_name'];\n $workArr[] = $row['created_at']->toDateTimeString();\n\n $items[] = $workArr;\n unset($workArr);\n }\n return json_encode($items);\n }", "protected function extractUrls($data){\n\t\tif(isset($data['body']) && isset($data['body']['status']) && $data['body']['status'] == 'available'){\n\t\t\t// fetch source resolution\n\t\t\t$sourceMeasures = array();\n\t\t\t$biggestWidth = 0;\n\t\t\t$biggestHeight = 0;\n\t\t\tforeach($data['body']['download'] as $dl){\n\t\t\t\tif($biggestWidth < $dl['width']) $biggestWidth = $dl['width'];\n\t\t\t\tif($biggestHeight < $dl['height']) $biggestHeight = $dl['height'];\n\t\t\t\t\n\t\t\t\t// check if source is still existent\n\t\t\t\tif(isset($dl['type']) && $dl['type'] == 'source'){\n\t\t\t\t\t$sourceMeasures['width'] = $dl['width'];\n\t\t\t\t\t$sourceMeasures['height'] = $dl['height'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!(isset($sourceMeasures['width']) && isset($sourceMeasures['height']))){\n\t\t\t\t$sourceMeasures['width'] = $biggestWidth;\n\t\t\t\t$sourceMeasures['height'] = $biggestHeight;\n\t\t\t}\n\t\t\t\n\t\t\t// fetch available resolution\n\t\t\t$availRes = array();\n\t\t\tforeach($data['body']['files'] as $f){\n\t\t\t\tif(isset($f['quality']) && isset($f['width']) && isset($f['height']) && isset($f['link']) && isset($f['link_secure'])){\n\t\t\t\t\tif($f['quality'] == 'sd' && $f['height'] == 360){\n\t\t\t\t\t\t$availRes['mobile'] = $f['link'];\n\t\t\t\t\t\t$availRes['mobile_secure'] = $f['link_secure'];\n\t\t\t\t\t}else if($f['quality'] == 'sd' && $f['height'] == 540){\n\t\t\t\t\t\t$availRes['hd'] = $f['link'];\n\t\t\t\t\t\t$availRes['hd_secure'] = $f['link_secure'];\n\t\t\t\t\t}else if($f['quality'] == 'hd' && $f['height'] == 720){\n\t\t\t\t\t\t$availRes['hd'] = $f['link'];\n\t\t\t\t\t\t$availRes['hd_secure'] = $f['link_secure'];\n\t\t\t\t\t}else if($f['quality'] == 'hd' && $f['height'] == 1080){\n\t\t\t\t\t\t$availRes['fullhd'] = $f['link'];\n\t\t\t\t\t\t$availRes['fullhd_secure'] = $f['link_secure'];\n\t\t\t\t\t}\n\t\t\t\t}else if(isset($f['quality']) && $f['quality'] == 'hls' && isset($f['link']) && isset($f['link_secure'])){\n\t\t\t\t\t$availRes['hls'] = str_replace('https', 'http', $f['link']);\n\t\t\t\t\t$availRes['hls_secure'] = $f['link_secure'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($sourceMeasures['width']) && isset($sourceMeasures['height'])){\n\t\t\t\t// source file and measurements found\n\t\t\t\t// check for highest resolution\n\t\t\t\tif($sourceMeasures['width'] >= 1920 && $sourceMeasures['height'] >= 1080){\n\t\t\t\t\t// Video is full HD, so Full HD should be availalbe\n\t\t\t\t\tif(isset($availRes['fullhd']) && isset($availRes['hd']) && isset($availRes['sd'])){\n\t\t\t\t\t\t$this->VimeoFullHDUrl = $availRes['fullhd'];\n\t\t\t\t\t\t$this->VimeoFullHDUrlSecure = $availRes['fullhd_secure'];\n\t\t\t\t\t\t$this->VimeoHDUrl = $availRes['hd'];\n\t\t\t\t\t\t$this->VimeoHDUrlSecure = $availRes['hd_secure'];\n\t\t\t\t\t\t$this->VimeoSDUrl = $availRes['sd'];\n\t\t\t\t\t\t$this->VimeoSDUrlSecure = $availRes['sd_secure'];\n\t\t\t\t\t\t$this->VimeoMobileUrl = $availRes['mobile'];\n\t\t\t\t\t\t$this->VimeoMobileUrlSecure = $availRes['mobile_secure'];\n\t\t\t\t\t\t$this->VimeoPicturesURI = $data['body']['pictures']['uri'];\n\t\t\t\t\t\tif(isset($availRes['hls'])){\n\t\t\t\t\t\t\t$this->VimeoHLSUrl = $availRes['hls'];\n\t\t\t\t\t\t\t$this->VimeoHLSUrlSecure = $availRes['hls_secure'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->VimeoProcessingStatus = 'finished';\n\t\t\t\t\t\t$this->write();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else if($sourceMeasures['width'] >= 1280 && $sourceMeasures['height'] >= 720){\n\t\t\t\t\t// Video is HD, so at least HD schould be available\n\t\t\t\t\tif(isset($availRes['hd']) && isset($availRes['sd'])){\n\t\t\t\t\t\t$this->VimeoFullHDUrl = null;\n\t\t\t\t\t\t$this->VimeoFullHDUrlSecure = null;\n\t\t\t\t\t\t$this->VimeoHDUrl = $availRes['hd'];\n\t\t\t\t\t\t$this->VimeoHDUrlSecure = $availRes['hd_secure'];\n\t\t\t\t\t\t$this->VimeoSDUrl = $availRes['sd'];\n\t\t\t\t\t\t$this->VimeoSDUrlSecure = $availRes['sd_secure'];\n\t\t\t\t\t\t$this->VimeoMobileUrl = $availRes['mobile'];\n\t\t\t\t\t\t$this->VimeoMobileUrlSecure = $availRes['mobile_secure'];\n\t\t\t\t\t\t$this->VimeoPicturesURI = $data['body']['pictures']['uri'];\n\t\t\t\t\t\tif(isset($availRes['hls'])){\n\t\t\t\t\t\t\t$this->VimeoHLSUrl = $availRes['hls'];\n\t\t\t\t\t\t\t$this->VimeoHLSUrlSecure = $availRes['hls_secure'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->VimeoProcessingStatus = 'finished';\n\t\t\t\t\t\t$this->write();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t// Video is SD, so at least SD schould be available\n\t\t\t\t\tif(isset($availRes['sd'])){\n\t\t\t\t\t\t$this->VimeoFullHDUrl = null;\n\t\t\t\t\t\t$this->VimeoFullHDUrlSecure = null;\n\t\t\t\t\t\t$this->VimeoHDUrl = null;\n\t\t\t\t\t\t$this->VimeoHDUrlSecure = null;\n\t\t\t\t\t\t$this->VimeoSDUrl = $availRes['sd'];\n\t\t\t\t\t\t$this->VimeoSDUrlSecure = $availRes['sd_secure'];\n\t\t\t\t\t\t$this->VimeoMobileUrl = $availRes['mobile'];\n\t\t\t\t\t\t$this->VimeoMobileUrlSecure = $availRes['mobile_secure'];\n\t\t\t\t\t\t$this->VimeoPicturesURI = $data['body']['pictures']['uri'];\n\t\t\t\t\t\tif(isset($availRes['hls'])){\n\t\t\t\t\t\t\t$this->VimeoHLSUrl = $availRes['hls'];\n\t\t\t\t\t\t\t$this->VimeoHLSUrlSecure = $availRes['hls_secure'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->VimeoProcessingStatus = 'finished';\n\t\t\t\t\t\t$this->write();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else if(isset($data['body']) && isset($data['body']['status']) && ($data['body']['status'] == 'quota_exceeded' || $data['body']['status'] == 'uploading_error' || $data['body']['status'] == 'transcoding_error')){\n\t\t\t$this->VimeoProcessingStatus = 'processingerror';\n\t\t\t$this->write();\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getUrlAsArray(): array\n {\n return \\explode('/', $this->url);\n }", "function get_internal_links($array){\r\n $result = array();\r\n $count = count($array);\r\n for($i=0;$i<$count;$i++){\r\n if(!empty($array[$i])){ \r\n if(strpos($array[$i],\"www\",0) === false){\r\n if(strpos($array[$i],\"http\",0) === false){ \r\n array_push($result,$array[$i]);\r\n }\r\n }\r\n }\r\n }\r\n return $result;\r\n}", "public function getUrls() {\n return $this->urls;\n }", "public function explodeUrl2ArrayDataProvider() {}", "public function getLinks(): array\n {\n return $this->links;\n }", "public function getLinks(): array\n {\n return $this->links;\n }", "public function getLinkInfo()\n {\n return array(\n 'PageURL' => $this->curlInfo['url'],\n 'page_title' => $this->getPageTitle(),\n 'description' => trim((isset($this->collected['metaData']['description'])) ? $this->collected['metaData']['description'] : Standards::$default),\n 'content_language' => $this->getLanguage(),\n 'external_links' => $this->countLinks('external'),\n 'internal_links' => $this->countLinks('internal'),\n 'no_follow_links' => $this->countLinks('no-follow'),\n 'follow_links' => ($this->countLinks('external') + $this->countLinks('internal') - $this->countLinks('no-follow')),\n 'h1' => $this->collected['headingsCount']['h1'],\n 'h2' => $this->collected['headingsCount']['h2'],\n 'h3' => $this->collected['headingsCount']['h3'],\n 'h4' => $this->collected['headingsCount']['h4'],\n 'h5' => $this->collected['headingsCount']['h5'],\n 'h6' => $this->collected['headingsCount']['h6'],\n 'http_code' => $this->curlInfo['http_code'],\n 'charset' => $this->getCharset(),\n 'server_config' => implode(';', $this->getServerConfig()),\n\n // fetched by others:\n # 'load_time' => Standards::$default,\n # 'page_weight' => Standards::$default,\n # 'indexed_bing' => Standards::$default,\n # 'indexed_google' => Standards::$default,\n );\n }", "public function getNetworksList() {\n return $this->_get(4);\n }", "public function getArrayLinkUrls($data = null)\n {\n $array_data = explode(',', $data);\n $array_link_urls = [];\n foreach ($array_data as $val) {\n $array_link_urls[] = array(\n 'link_url' => $val\n );\n }\n \n return $array_link_urls;\n }", "function links() {\n return array(\n\n );\n }", "function get_traffic ()\n\t{\n\t\t$results['ranking'] = trim((string)$this->results->dmn->metrics->val->uv->ranking);\n\t\t\n\t\t/* $results['count'] = trim((string)$this->results->dmn->metrics->val->uv->count);\n\t\t$results['count_int'] = (int)implode('', explode(',', $results['count']));\n\t\t\n\t\t$results['link'] = trim((string)$this->results->dmn->metrics->link);\n\t\t$results['icon'] = trim((string)$this->results->dmn->metrics->icon); */\n\t\t$results['ranking'] = str_replace(\",\",\"\", $results['ranking']);\n\t\treturn($results);\n\t}", "function getUrls(){\n $urls = $this->all('schema:url');\n return $urls;\n }", "protected function get_network_ids()\n {\n }", "public function toArray()\n {\n $array = parent::toArray();\n $array['href'] = $this->href;\n return $array;\n }", "function mustsee_get_social_links() {\n\n\t$social_links = array();\n\t$social_links['youtube'] = mustsee_get_agent_info('youtube_url');\n\t$social_links['facebook'] = mustsee_get_agent_info('facebook_url');\n\t$social_links['twitter'] = mustsee_get_agent_info('twitter_url');\n\t$social_links['pinterest'] = mustsee_get_agent_info('pinterest_url');\n\t$social_links['linkedin'] = mustsee_get_agent_info('linkedin_url');\n\t$social_links['google_plus'] = mustsee_get_agent_info('googleplus_url');\n\t$social_links['email'] = mustsee_get_agent_info('email');\n\n\treturn $social_links;\n}", "public function getServerUrls() {\n $publicKey = md5(microtime());\n\n return array(\n array('http://imbo', $publicKey, 'http://imbo/users/' . $publicKey),\n array('http://imbo/prefix', $publicKey, 'http://imbo/prefix/users/' . $publicKey),\n array('http://imbo:81', $publicKey, 'http://imbo:81/users/' . $publicKey),\n array('http://imbo:81/prefix', $publicKey, 'http://imbo:81/prefix/users/' . $publicKey),\n array('http://imbo:80', $publicKey, 'http://imbo/users/' . $publicKey),\n array('http://imbo:80/prefix', $publicKey, 'http://imbo/prefix/users/' . $publicKey),\n\n array('https://imbo', $publicKey, 'https://imbo/users/' . $publicKey),\n array('https://imbo/prefix', $publicKey, 'https://imbo/prefix/users/' . $publicKey),\n array('https://imbo:444', $publicKey, 'https://imbo:444/users/' . $publicKey),\n array('https://imbo:444/prefix', $publicKey, 'https://imbo:444/prefix/users/' . $publicKey),\n array('https://imbo:443', $publicKey, 'https://imbo/users/' . $publicKey),\n array('https://imbo:443/prefix', $publicKey, 'https://imbo/prefix/users/' . $publicKey),\n );\n }", "public function getNetworksList() {\n return $this->_get(1);\n }", "function urls($data)\r\n{\r\n $result = array();\r\n if (is_array($data)) {\r\n if (isset($data['href']))\r\n $result[] = $data['href']; else\r\n foreach ($data as $d)\r\n if (is_array($d))\r\n $result[] = $d['href']; else\r\n $result[] = $d;\r\n } else $result[] = $data;\r\n\r\n // Make URLs full\r\n $result2 = array();\r\n global $last_url, $last_base;\r\n $last_domain = substr($last_url, 0, strpos($last_url, '/', 10));\r\n if ($p = strpos($last_url,'?'))\r\n $last_php = substr($last_url,0,$p);\r\n else $last_php = $last_url;\r\n\r\n foreach ($result as $url) {\r\n $url = trim($url);\r\n if (!$url)\r\n continue;\r\n $url = str_replace('./','',$url);\r\n if (substr($url,0,2)=='//') $url = 'http:'.$url;\r\n if (strpos($url, '://') === false)\r\n if ($url[0] == '/')\r\n $url = $last_domain . $url;\r\n elseif ($url[0] == '?') $url = $last_php . $url;\r\n else $url = $last_base . $url;\r\n // Check for right donor\r\n //if (strpos(domain($url),$GLOBALS['instruction']['host'])===false) continue;\r\n $result2[] = $url;\r\n }\r\n $r = $result2;\r\n\r\n if (DEV)\r\n xlogc('urls', $r, $data);\r\n\r\n return $r;\r\n}", "public function getLinksList(){\n return $this->_get(9);\n }", "public function getNetworkTags()\n {\n return $this->network_tags;\n }", "function get_networks($args = array())\n {\n }", "public function getAll(): array\n {\n\n\t$url = new Url();\n\n return array_merge(\n apache_request_headers(),\n apache_response_headers(),\n get_headers($url->hostWithSchema($url->getHostIp()), 1)\n );\n\n }", "public function getMultipleData();", "public function getDirectLinkUrls()\n {\n return $this->getUrls($this->directLinkPath);\n }", "public function getSocialNetworkInfo() {\n $retVal = array();\n// $retVal[] = \"Điện thoại: \" . $this->getPhone();\n if (isset($this->rSocialNetwork)) {\n foreach ($this->rSocialNetwork as $value) {\n $retVal[] = SocialNetworks::TYPE_NETWORKS[$value->type_network] . \": $value->value\";\n }\n }\n return implode('<br>', $retVal);\n }", "public function getData()\n {\n $res = $this->curl->getData($this->url);\n\n $res = [\n \"city\" => $res[\"city\"] ?? null,\n \"country_name\" => $res[\"country_name\"] ?? null,\n \"longitude\" => $res[\"longitude\"] ?? null,\n \"latitude\" => $res[\"latitude\"] ?? null,\n ];\n\n return $res;\n }", "private function getDataByScrapeUrl()\n {\n return file_get_contents($this->url);\n }", "private function getUrls() {\n\t\t// reassign the array because of a php bug (solved later with php 5.2.x @see: http://bugs.php.net/39449)\n\t\t$arr = $this->formData;\n\n\t\t// build bas URL for replacement variables\n\t\t$protocol\t= 'http'\n . ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ? 's' : '' )\n . '://';\n\t\t$url\t\t= $_SERVER['HTTP_HOST'] . dirname( $_SERVER['PHP_SELF'] ) . '/';\n $url = str_replace( '//', '/', $url ); // some server add 2 /\n $url = $protocol . $url . 'index.php?route=payment/directebanking/';\n\n\t\tif( $this->_param['successUrlStd'] ) {\n\t\t\t$arr['user_variable_0'] = $url . 'success'\n\t\t\t. '&transaction=-TRANSACTION-&security_criteria=-SECURITY_CRITERIA-'\n\t\t\t. '&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['successUrl'] ) {\n\t\t\t\t$arr['user_variable_0'] = $this->_param['successUrl'];\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_param['cancelUrlStd'] ) {\n\t\t\t$arr['user_variable_1'] = $url . 'cancel'\n\t\t\t. '&transaction=-TRANSACTION-&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['cancelUrl'] ) {\n\t\t\t\t$arr['user_variable_1'] = $this->_param['cancelUrl'];\n\t\t\t}\n\t\t}\n\n\t\t// and reassign again\n\t\t$this->formData = $arr;\n\n\t\tunset( $arr );\n\t}", "protected function getEndpointsData() : array {\n $endpointsData = [];\n\n if(!empty($endpointData = $this->getEndpointData('source'))){\n $endpointsData['source'] = $endpointData;\n }\n if(!empty($endpointData = $this->getEndpointData('target'))){\n $endpointsData['target'] = $endpointData;\n }\n\n return $endpointsData;\n }", "public function getPhotoUrls () {\n\t\t\n\t}", "public function getAll()\n {\n return $this->jsonToArray($this->applyEncode($this->download()));\n }", "public function avatarUrls(): array\n {\n $urls = [];\n\n foreach ($this->pluck('avatars') as $avatar) {\n $urls[$avatar['size']] = $avatar['url'];\n }\n\n return $urls;\n }", "public function avatarUrls(): array\n {\n $urls = [];\n\n foreach ($this->pluck('avatars') as $avatar) {\n $urls[$avatar['size']] = $avatar['url'];\n }\n\n return $urls;\n }", "public function getLinks() {\n return $this->links;\n }", "public function getLinks(){\n\t\t\n\t\t// Get the global config\n\t\tglobal $CrawlerConfig;\n\t\t\n\t\t// Create DOM object and load HTML\n\t\t@$dom = new DOMDocument();\n\t\t@$dom->loadHTML($this->html);\n\t\t$dom->preserveWhiteSpace = false;\n\t\t\n\t\t// Return array\n\t\t$ret = array();\n\t\t\n\t\t// Get links\n\t\t$links = $dom->getElementsByTagName('a');\n\t\t\n\t\t// Extract links data\n\t\tforeach ($links as $tag){\n\t\t\t\n\t\t\t// Get the hyperlink reference\n\t\t\t$url = trim($tag->getAttribute('href'));\n\t\t\t\n\t\t\t// Make sure it's a complete URL\n\t\t\t$url = self::filterUrl($url);\n\t\t\tif($url === false) continue;\n\t\t\t\n\t\t\t// Skip URL's that start with #\n\t\t\tif(substr($url, \"0\", 1) == \"#\") continue;\n\t\t\t\n\t\t\t// Skip mailto links\n\t\t\tif(strpos($url, \"mailto:\") !== false) continue;\n\t\t\t\n\t\t\t// Skip links that don't match the 'FOLLOW_LINKS_LIKE' config param\n\t\t\tif(\n\t\t\t\t!empty($CrawlerConfig['FOLLOW_LINKS_LIKE']) &&\n\t\t\t\tstrpos($url, $CrawlerConfig['FOLLOW_LINKS_LIKE']) === false\n\t\t\t) continue;\n\t\t\t\n\t\t\t// Skip links that DO match the \"IGNORE_LINKS_LIKE\" config param\n\t\t\tif(!empty($CrawlerConfig['IGNORE_LINKS_LIKE'])){\n\t\t\t\tforeach($CrawlerConfig['IGNORE_LINKS_LIKE'] as $l){\n\t\t\t\t\tif(strpos($url, $l) !== false) continue 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Dump it to the array\n\t\t\tarray_push($ret, array(\n\t\t\t\t\"url\" => $url,\n\t\t\t\t\"title\" => $tag->textContent ///$tag->childNodes->item(0)->nodeValue\n\t\t\t));\t\t\t\n }\n\t\t\n\t\t$ret = self::doopScooper($ret, array(\"url\"));\n\t\t\t\t\n\t\treturn $ret;\n\t}", "public function getLinks()\r\r\n {\r\r\n $links = $this->parseParams();\r\r\n\r\r\n foreach ($links as &$link) {\r\r\n $key = key($link);\r\r\n unset($link[$key]);\r\r\n $link['url'] = trim($key, '<> ');\r\r\n }\r\r\n\r\r\n return $links;\r\r\n }", "private function fetchDataFromUrl($url)\n {\n \ttry {\n \t\t$options = array(\n \t\t\t\t'http' => array(\n \t\t\t\t\t\t'method' => 'GET',\n \t\t\t\t\t\t'header' => implode(\"\\r\\n\", array(\n \t\t\t\t\t\t\t\t'accept: text/html,application/xhtml+xml,application/xml;',\n \t\t\t\t\t\t\t\t'cache-control:max-age=0',\n \t\t\t\t\t\t\t\t'Accept-language: en-US,en;q=0.8',\n \t\t\t\t\t\t\t\t'User-Agent: ' . $this->userAgents[rand(0, count($this->userAgents) - 1)]\n \t\t\t\t\t\t))\n \t\t\t\t)\n \t\t);\n \t\t$context = stream_context_create($options);\n \t\t$content = file_get_contents($url, false, $context);\n \t\t\n \t\t$targetHost = parse_url($url, PHP_URL_HOST);\n \t\t$doc = new \\App\\Libraries\\Parser\\Document($content, 'default', $targetHost);\n \t\t$res = $doc->parseContent(false, null);\n \t\tif ($res['okay']) {\n \t\t\t$images = $res['images'];\n \t\t\t$parsedUrl = parse_url($url);\n \t\t\tfor ($i = count($images) - 1; $i >= 0; $i--) {\n \t\t\t\tif (strpos($images[$i], 'http') !== 0) {\n \t\t\t\t\t/*\n \t\t\t\t\t $parsedImages = parse_url($images[$i]);\n \t\t\t\t\t $parsedImages['scheme'] = $parsedUrl['scheme'];\n \t\t\t\t\t $parsedImages['host'] = $parsedUrl['host'];\n \t\t\t\t\t $images[$i] = http_build_url($parsedImages);\n \t\t\t\t\t */\n \t\t\t\t\tarray_splice($images, $i, 1);\n \t\t\t\t}\n \t\t\t}\n \t\t\t$res['images'] = $images;\n \t\t\treturn $res;\n \t\t} else {\n \t\t\treturn false;\n \t\t}\n \t} catch (\\Exception $e) {\n \t\tLog::error('Cannot fetch data from url: ' . $url . '; ' . $e);\n \t\treturn false;\n \t}\n }", "function read(){\n if($this->url != \"\"){\n if($this->url[strlen($this->url)-1] == \"/\") {\n $this->url = substr($this->url, 0,(strlen($this->url)-1));\n }\n $this->url_arr = explode(\"/\", $this->url);\n } else {\n $this->url_arr[0] = \"\";\n }\n \n return $this->url_arr;\n }", "public function getDiscoveryURLs()\n {\n return $this->discoveryURLs;\n }", "public function list(){\n\n $urls = Urls::all();\n \n $capturas = array();\n foreach($urls as $key=>$val){\n $status = $this->status_url($val['url']);\n $conteudo = $this->content_url($val['url']);\n /* bem simples. salva os dados no banco */\n $capturas[] = array('conteudo' => $conteudo, 'status' => $status, 'url_id' => $val['id']);\n }\n\n $this->salvar($capturas);\n }", "function getServerURLs() {\n\t\treturn $this->m_serverURLs;\n\t}", "public function getSocialUrls()\n {\n return $this->social_urls;\n }", "public function getResourceURIs()\n {\n $resources = array();\n\n $resources['logo'] = $this->getUrl('/resources/logo.png');//URI\n $resources['requestHandlerUrl'] = $this->getUrl('requestHandler.php');//URI //TODO: this should be an API URI (not sure if that will break something)\n $resources['self_apiUrl'] = self::$apiUrl;//URI\n\n return $resources;\n }", "protected function _getImageUrls($images) {\n\n $data = array();\n\n foreach ($images as $image) {\n $data[] = $image['url'];\n }\n\n return $data;\n }", "public function generateUrls()\n {\n $url_array[self::FORWARD_KEY] = $this->getForwardRoom();\n $url_array[self::LEFT_KEY] = $this->getLeftRoom();\n $url_array[self::RIGHT_KEY] = $this->getRightRoom();\n $url_array[self::BACK_KEY] = $this->getBackRoom();\n $url_array[self::CURRENT_KEY] = $this->getCurrentRoom();\n\n return $url_array;\n }", "public function getData(): array\n {\n $response = Http::get($this->apiUrl)\n ->throw()\n ->collect();\n\n return $response->filter(function ($value, $key) {\n return array_key_exists('location', $value);\n })->values()->toArray();\n }", "public function getConnections();", "public function getConnections();", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public static function provideUris(): array\n {\n return [\n 'default' => [\n 'http://domain.com',\n 'http://domain.com',\n ],\n\n 'without scheme' => [\n 'domain.com/path',\n 'domain.com/path',\n ],\n\n 'with port' => [\n 'domain.com:8080/path',\n 'domain.com:8080/path',\n ],\n\n 'with query' => [\n 'https://domain.com:8081/path?key=value',\n 'https://domain.com:8081/path?key=value',\n ],\n\n 'with fragment' => [\n 'https://domain.com:8081/path?key=value#some',\n 'https://domain.com:8081/path?key=value#some',\n ],\n\n 'with username' => [\n 'https://[email protected]/ping',\n 'https://[email protected]/ping',\n ],\n\n 'with password' => [\n 'https://user:[email protected]/ping',\n 'https://user:***@domain.com/ping',\n ],\n ];\n }", "public function getData() {\r\n $data = [];\r\n\r\n $model = Factory::getModel('landing-page-templates');\r\n $templates = $model->getTemplates();\r\n foreach ($templates as $template) {\r\n if ($template->showDetailed) {\r\n $data[] = [\r\n 'loc' => home_url($template->slug),\r\n 'priority' => '0.5',\r\n 'changefreq' => 'daily'\r\n ];\r\n }\r\n }\r\n\r\n return $data;\r\n }", "public function getUrls(): ?array {\n $val = $this->getBackingStore()->get('urls');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n /** @var array<string>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'urls'\");\n }", "private function generateUrls(): object\n\t{\n\t\treturn $this->get('gameMediaService/v2/c2s/ugc/' . $this->id() . '/url');\n\t}", "public function getAllUrls()\n {\n $urls = [];\n $stores = $this->storeManager->getStores(false);\n foreach($stores as $store) {\n $urls[] = $store->getBaseUrl();\n }\n\n return $urls;\n }", "public function toArray() {\n return [\n 'host' => $this->host,\n 'port' => $this->port,\n 'type' => $this->type,\n ];\n }", "function get_networks( $args = array() ) {\n\t$query = new WP_Network_Query();\n\n\treturn $query->query( $args );\n}", "public function collectData(){\n\t\t// Simple HTML Dom is not accurate enough for the job\n\t\t$content = getContents($this->getURI())\n\t\t\tor returnServerError('No results for LWNprev');\n\n\t\tlibxml_use_internal_errors(true);\n\t\t$html = new DOMDocument();\n\t\t$html->loadHTML($content);\n\t\tlibxml_clear_errors();\n\n\t\t$cat1 = '';\n\t\t$cat2 = '';\n\n\t\tforeach($html->getElementsByTagName('a') as $a){\n\t\t\tif($a->textContent === 'Multi-page format'){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$realURI = self::URI . $a->getAttribute('href');\n\t\t$URICounter = 0;\n\n\t\t$edition = $html->getElementsByTagName('h1')->item(0)->textContent;\n\t\t$editionTimeStamp = strtotime(\n\t\t\tsubstr($edition, strpos($edition, 'for ') + strlen('for '))\n\t\t);\n\n\t\tforeach($html->getElementsByTagName('h2') as $h2){\n\t\t\tif($h2->getAttribute('class') !== 'SummaryHL'){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item = array();\n\n\t\t\t$h2NextSibling = $h2->nextSibling;\n\t\t\t$this->jumpToNextTag($h2NextSibling);\n\n\t\t\tswitch($h2NextSibling->getAttribute('class')){\n\t\t\tcase 'FeatureByline':\n\t\t\t\t$item['author'] = $h2NextSibling->getElementsByTagName('b')->item(0)->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'GAByline':\n\t\t\t\t$text = $h2NextSibling->textContent;\n\t\t\t\t$item['author'] = substr($text, strpos($text, 'by '));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$item['author'] = 'LWN';\n\t\t\t\tbreak;\n\t\t\t};\n\n\t\t\t$h2FirstChild = $h2->firstChild;\n\t\t\t$this->jumpToNextTag($h2FirstChild);\n\t\t\tif($h2FirstChild->nodeName === 'a'){\n\t\t\t\t$item['uri'] = self::URI . $h2FirstChild->getAttribute('href');\n\t\t\t}else{\n\t\t\t\t$item['uri'] = $realURI . '#' . $URICounter;\n\t\t\t}\n\t\t\t$URICounter++;\n\n\t\t\t$item['timestamp'] = $editionTimeStamp + $URICounter;\n\n\t\t\t$h2PrevSibling = $h2->previousSibling;\n\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\tswitch($h2PrevSibling->getAttribute('class')){\n\t\t\tcase 'Cat2HL':\n\t\t\t\t$cat2 = $h2PrevSibling->textContent;\n\t\t\t\t$h2PrevSibling = $h2PrevSibling->previousSibling;\n\t\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\t\tif($h2PrevSibling->getAttribute('class') !== 'Cat1HL'){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'Cat1HL':\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\t$cat2 = '';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$h2PrevSibling = null;\n\n\t\t\t$item['title'] = '';\n\t\t\tif(!empty($cat1)){\n\t\t\t\t$item['title'] .= '[' . $cat1 . ($cat2 ? '/' . $cat2 : '') . '] ';\n\t\t\t}\n\t\t\t$item['title'] .= $h2->textContent;\n\n\t\t\t$node = $h2;\n\t\t\t$content = '';\n\t\t\t$contentEnd = false;\n\t\t\twhile(!$contentEnd){\n\t\t\t\t$node = $node->nextSibling;\n\t\t\t\tif(!$node || (\n\t\t\t\t\t\t$node->nodeType !== XML_TEXT_NODE && (\n\t\t\t\t\t\t\t$node->nodeName === 'h2' || (\n\t\t\t\t\t\t\t\t!is_null($node->attributes) &&\n\t\t\t\t\t\t\t\t!is_null($class = $node->attributes->getNamedItem('class')) &&\n\t\t\t\t\t\t\t\tin_array($class->nodeValue, array('Cat1HL', 'Cat2HL'))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t){\n\t\t\t\t\t$contentEnd = true;\n\t\t\t\t}else{\n\t\t\t\t\t$content .= $node->C14N();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$item['content'] = $content;\n\t\t\t$this->items[] = $item;\n\t\t}\n\t}", "public function asArray(): array {\n\t\treturn array(\n\t\t\t'originalUri' => $this->getOriginalUri(),\n\t\t\t'normalizedUri' => $this->getNormalizedUri(),\n\t\t\t'normalizedUriWithSlash' => $this->getNormalizedUriWithSlash(),\n\t\t\t'uriWithouQueryString' => $this->getUriWithoutQueryString(TRUE),\n\t\t\t'scheme' => $this->getScheme(),\n\t\t\t'host' => $this->getHost(),\n\t\t\t'hostWithoutSubdomains' => $this->getHost(TRUE),\n\t\t\t'tld' => $this->getTld(),\n\t\t\t'path' => $this->getPath(),\n\t\t\t'paths' => $this->getPaths(),\n\t\t\t'query' => $this->getQuery(),\n\t\t\t'originalQueryString' => $this->getOriginalQueryString(),\n\t\t\t'queryString' => $this->getQueryString(),\n\t\t\t'querySorted' => $this->getQuerySorted(),\n\t\t\t'queryStringSorted' => $this->getQueryStringSorted(),\n\t\t\t'port' => $this->getPort(),\n\t\t\t'uid' => $this->getUid(),\n\t\t\t'isHttps' => $this->isHttps(),\n\t\t\t'isFile' => $this->isFile(),\n\t\t\t'isWww' => $this->isWww(),\n\t\t);\n\t}", "public function getHtmlNetwork() {\n $ntworks = array(\n \n 'facebook',\n 'twitter',\n 'linkedin',\n 'pinterest',\n 'youtube',\n 'google',\n 'myspace',\n \n );\n \n $networks = array();\n \n foreach($ntworks as $name) {\n \n if (\n array_key_exists($name,$this->configWeb)\n && !empty($this->configWeb[$name])\n ) {\n $networks[$this->getUrl($name)] = $this->getImageSkin($name);\n }\n \n }\n \n $tplNetworks = Template::getWebsiteView('widgets/networks',$this->getTheme());\n ob_start(); if (is_file($tplNetworks)) { include $tplNetworks; } $out = ob_get_clean();\n \n return $out;\n \n }", "public function getHostInfo()\n {\n $host_info = [];\n\n $host_info['name'] = $this->getDataItem($this->ns_host, 'name');\n $host_info['roid'] = $this->getDataItem($this->ns_host, 'roid');\n $host_info['status'] = $this->getArrayElementsResponse($this->ns_host, 'status', null, true, 's');\n $host_info['clID'] = $this->getDataItem($this->ns_host, 'clID');\n $host_info['crID'] = $this->getDataItem($this->ns_host, 'crID');\n $host_info['crDate'] = $this->getDataItem($this->ns_host, 'crDate');\n\n return $host_info;\n }", "public function showAll(): array\n {\n\t\t$fileHandler = $this->getFileHandler('r');\n\t\t$data_arry = [];\n\t\twhile(!feof($fileHandler)){\n\t\t\t$line = fgets($fileHandler);\n\t\t\t$arry = explode('|', $line);\n\t\t\tif($arry[0]==\"\" || $arry[1]==null){ //To preempt possible empty lines at the end of the file.\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\t$name = $arry[0];\n\t\t\t$link = chop($arry[1]);\n\t\t\tarray_push($data_arry, ['name'=>$name, 'link'=>$link]);\n\t\t}\n\t\t$this->closeFile($fileHandler);\n\t\treturn $data_arry;\n\t}", "function getARecords() {\n\t\t$arecords = array();\n\t\tif ( isset( $this->hostInfo[0]['arecord'] ) ) {\n\t\t\t$arecords = $this->hostInfo[0]['arecord'];\n\t\t\tarray_shift( $arecords );\n\t\t}\n\n\t\treturn $arecords;\n\t}", "public function getInfoBoxLinks(): array\n {\n return $this->infoBoxLinks;\n }", "function getData($url) {\n $xml = parseHTML($url);\n $storeIDs = getStoreIDs($xml);\n $addresses = getAddresses($xml);\n $phoneNumbers = getPhone($xml);\n $latitudes = getLatitudes($xml);\n $longitudes = getLongitudes($xml);\n $latLng = combineLatLng($latitudes, $longitudes);\n return organizeData($storeIDs, $addresses, $phoneNumbers, $latLng);\n}", "public function get_data() {\n $rv = [\n 'standard' => [],\n 'counties' => []\n ];\n // echo 'url: '. $this->url;\n if ($this->is_remote($this->url)) {\n // Remote fetch\n // echo 'is remote';\n if ($this->user && $this->passwd) {\n // echo 'user:'.$this->user;\n $auth = base64_encode($this->user . \":\" . $this->passwd);\n $context = stream_context_create(['http' => ['header' => \"Authorization: Basic $auth\"]]);\n // $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS, false, $context );\n $data_standards = file($this->url . FileFetcher::FILE_STANDARDS, false, $context );\n // echo '$data_standards: '. $data_standards;\n // $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES, false, $context );\n $data_counties = file($this->url . FileFetcher::FILE_COUNTIES, false, $context );\n // echo '$data_counties: '. $data_counties;\n }\n else {\n $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS);\n $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES);\n }\n }\n else {\n // Local files\n $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS);\n $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES);\n }\n // $rv['standard'] = $this->read_standards_file($data_standards);\n // $rv['counties'] = $this->read_counties_file($data_counties, $data_standards);\n\n // return $rv;\n\n $standards_and_committees = $this->read_standards_file($data_standards);\n // var_dump($standards_and_committees[0]);\n $listings = $this->read_counties_file($data_counties, $standards_and_committees[0], $standards_and_committees);\n $listings['committees'] = $standards_and_committees[1];\n return $listings;\n }", "public function getLinks()\r\n {\r\n return $this->_links;\r\n }", "public function getData()\n {\n return array(\n\n );\n }", "public function implodeArrayForUrlDataProvider() {}", "public function getLinks() {\n\t\treturn $this->links;\n\t}", "private function getBaseLinks() {\r\n return array(\r\n array(\r\n 'rel' => 'self',\r\n 'type' => RestoUtil::$contentTypes['json'],\r\n 'title' => $this->context->dictionary->translate('_selfCollectionLink'),\r\n 'href' => RestoUtil::updateUrl($this->context->getUrl(false), $this->writeRequestParams($this->context->query))\r\n ),\r\n array(\r\n 'rel' => 'search',\r\n 'type' => 'application/opensearchdescription+xml',\r\n 'title' => $this->context->dictionary->translate('_osddLink'),\r\n 'href' => $this->context->baseUrl . '/api/collections/' . (isset($this->defaultCollection) ? $this->defaultCollection->name . '/' : '') . 'describe.xml'\r\n )\r\n );\r\n }", "public function getDataForMakeNicknameMethod(): array\n {\n return [\n 0 => [\n 0 => [\n 'nickname' => 'http://www.kris.com/sapiente-qui-quam-eos-officia-sunt-inventore-quas',\n ],\n ],\n ];\n }", "public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}", "public function get_data(): array;", "public function get_data(): array;" ]
[ "0.7076421", "0.6870894", "0.6870894", "0.6486147", "0.6485994", "0.6420609", "0.6361658", "0.6308883", "0.6297279", "0.6273784", "0.6253692", "0.61323243", "0.6124858", "0.61122096", "0.61116207", "0.6110511", "0.61076546", "0.6102141", "0.60993254", "0.60898405", "0.6083086", "0.60592586", "0.60113966", "0.5984917", "0.59605134", "0.59533006", "0.5947251", "0.59407574", "0.59363055", "0.5916912", "0.5916912", "0.5874379", "0.5865373", "0.5833681", "0.58048576", "0.5802327", "0.5789738", "0.5777374", "0.57765037", "0.5767017", "0.57336307", "0.5727467", "0.57222277", "0.56954426", "0.568192", "0.56731945", "0.56652653", "0.5631545", "0.5618332", "0.56165373", "0.56141007", "0.5601634", "0.5585147", "0.5582296", "0.5572091", "0.5567147", "0.5558634", "0.5558634", "0.5554536", "0.55508405", "0.5548462", "0.5548038", "0.5547154", "0.5544408", "0.5542131", "0.55404943", "0.5535892", "0.5525208", "0.5514879", "0.55133134", "0.55113506", "0.5509908", "0.5509908", "0.5505037", "0.5505037", "0.5505037", "0.5501812", "0.5501317", "0.54992646", "0.54991424", "0.54873425", "0.54764843", "0.5472613", "0.54691917", "0.54584897", "0.5453136", "0.54509103", "0.5439902", "0.543755", "0.54343283", "0.54340416", "0.54290473", "0.5428323", "0.5427749", "0.5421092", "0.54201764", "0.5419189", "0.5413445", "0.54054093", "0.54045", "0.54045" ]
0.0
-1
Return HTML network links
public function renderNetworks($args = []) { // Default method arguments $args = wp_parse_args($args, [ 'networks' => array_keys($this->getNetworks()), 'icons' => false, 'embed' => false, 'captions' => false, ]); // HTML class name prefix $prefix = apply_filters( 'cgit_socialize_class_prefix', 'cgit-socialize-' ); $networks = $this->getNetworks($args['networks']); $items = []; // Add a link to each network to the output foreach ($networks as $key => $network) { $name = $network['name']; $content = $name; // Use icons instead of text if ($args['icons']) { $content = '<img src="' . $network['icon'] . '" alt="' . $name . '" class="' . $prefix . 'icon-' . $key . '" />'; // Embed the icon if ($args['embed']) { $content = file_get_contents($network['icon_path']); } // Include the text after each icon if ($args['captions']) { $content .= ' <span class="' . $prefix . 'caption-' . $key . '">' . $name . '</span>'; } } // Add each link to the array for output $items[] = '<li class="' . $prefix . $key . '">' . '<a href="' . htmlspecialchars($network['url']) . '">' . $content . '</a></li>'; } return '<ul>' . implode(PHP_EOL, $items) . '</ul>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function links() {\n return array(\n\n );\n }", "public function getLink();", "public function getLink();", "public function getLinks()\n\t{\n\t\t$data = $this->curl->curlGetReq($this->baseURL);\n\t\t$query = \"//a/@href\";\n\t\t$links = $this->curl->getDOMData($data,$query);\n\t\t\n\n\t\t//var_dump($links[0]);\n\n\t\tforeach ($links as $link)\n\t\t{\n\t\t\t\n\t\t\tif($link->value == \"/calendar\")\n\t\t\t{\n\t\t\t\t$this->calendarLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t\n\t\t\t}\n\t\t\tif($link->value == \"/cinema\")\n\t\t\t{\n\t\t\t\t$this->cinemaLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t}\n\t\t\tif($link->value == \"/dinner\")\n\t\t\t{\n\t\t\t\t$this->dinnerLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t$this->dinnerLoginLink = $this->dinnerLink.\"login\";\n\t\t\t}\n\n\t\t\n\t\t\n\t\t}\n\t}", "public function get_links()\n {\n }", "public function getLinks()\n {\n $url = Yii::$app->getRequest()->getAbsoluteUrl();\n // change $url_cut_point if you have more prefix in the url of restful api\n $url_cut_point = 5;\n $url_slice = array_slice(preg_split(\"#[?/]#\", $url), 0, $url_cut_point);\n $link = implode('/', $url_slice).'/'.$this->id;\n\n return [ Link::REL_SELF => $link ];\n }", "public function getLink() {}", "protected function generateLinks()\n {\n if ( ! is_null($this->links) ) {\n foreach ( $this->links as $link ) {\n $this->addLine('<url>');\n $this->addLine('<loc>');\n $this->addLine($this->helpers->url(\n $link->link,\n $this->protocol,\n $this->host\n ));\n $this->addLine('</loc>');\n $this->addLine('<lastmod>' . date_format($link->updated_at, 'Y-m-d') . '</lastmod>');\n $this->addLine('</url>');\n }\n }\n }", "public function links_list() {\n\t\t$str = \"\";\n\n\t\tforeach ($this->def_json[\"links\"] as $link) {\n\t\t\t$str .= Builder::root(\"li\", NULL,\n\t\t\t\tBuilder::child(\"a\", array(\"href\" => $link[\"url\"]), $link[\"title\"])\n\t\t\t)->saveHTML();\n\t\t}\n\n\t\treturn $str;\n\t}", "public function getLinks(){\n\t\t\n\t\t// Get the global config\n\t\tglobal $CrawlerConfig;\n\t\t\n\t\t// Create DOM object and load HTML\n\t\t@$dom = new DOMDocument();\n\t\t@$dom->loadHTML($this->html);\n\t\t$dom->preserveWhiteSpace = false;\n\t\t\n\t\t// Return array\n\t\t$ret = array();\n\t\t\n\t\t// Get links\n\t\t$links = $dom->getElementsByTagName('a');\n\t\t\n\t\t// Extract links data\n\t\tforeach ($links as $tag){\n\t\t\t\n\t\t\t// Get the hyperlink reference\n\t\t\t$url = trim($tag->getAttribute('href'));\n\t\t\t\n\t\t\t// Make sure it's a complete URL\n\t\t\t$url = self::filterUrl($url);\n\t\t\tif($url === false) continue;\n\t\t\t\n\t\t\t// Skip URL's that start with #\n\t\t\tif(substr($url, \"0\", 1) == \"#\") continue;\n\t\t\t\n\t\t\t// Skip mailto links\n\t\t\tif(strpos($url, \"mailto:\") !== false) continue;\n\t\t\t\n\t\t\t// Skip links that don't match the 'FOLLOW_LINKS_LIKE' config param\n\t\t\tif(\n\t\t\t\t!empty($CrawlerConfig['FOLLOW_LINKS_LIKE']) &&\n\t\t\t\tstrpos($url, $CrawlerConfig['FOLLOW_LINKS_LIKE']) === false\n\t\t\t) continue;\n\t\t\t\n\t\t\t// Skip links that DO match the \"IGNORE_LINKS_LIKE\" config param\n\t\t\tif(!empty($CrawlerConfig['IGNORE_LINKS_LIKE'])){\n\t\t\t\tforeach($CrawlerConfig['IGNORE_LINKS_LIKE'] as $l){\n\t\t\t\t\tif(strpos($url, $l) !== false) continue 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Dump it to the array\n\t\t\tarray_push($ret, array(\n\t\t\t\t\"url\" => $url,\n\t\t\t\t\"title\" => $tag->textContent ///$tag->childNodes->item(0)->nodeValue\n\t\t\t));\t\t\t\n }\n\t\t\n\t\t$ret = self::doopScooper($ret, array(\"url\"));\n\t\t\t\t\n\t\treturn $ret;\n\t}", "public function links() {\n\t\t?>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/15uoww1\" target=\"_blank\"><?php echo __( 'Installation manual', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/W9GDQT\" target=\"_blank\"><?php echo __( 'Frequently Asked Questions', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/WW93Sk\" target=\"_blank\"><?php echo __( 'Report a bug', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/11UE2lF\" target=\"_blank\"><?php echo __( 'Request a function', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/XkivOW\" target=\"_blank\"><?php echo __( 'Submit a translation', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/UlDG4t\" target=\"_blank\"><?php echo __( 'More cool stuff by WPBuddy', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t</ul>\n\t<?php\n\t}", "public function getLinksList(){\n return $this->_get(9);\n }", "function raw_urls_to_links($text){\n\t\t$text = \" $text \";\n\t\t$text = preg_replace('#(https?://[^\\s<>{}()]+[^\\s.,<>{}()])#i', '<a href=\"$1\" rel=\"nofollow\">$1</a>', $text);\n\t\t$text = preg_replace('#(\\s)([a-z0-9\\-]+(?:\\.[a-z0-9\\-\\~]+){2,}(?:/[^ <>{}()\\n\\r]*[^., <>{}()\\n\\r])?)#i', \n\t\t\t'$1<a href=\"http://$2\" rel=\"nofollow\">$2</a>', $text);\n\n\t\t$text = trim($text);\n\t\treturn $text;\n\t}", "public function getLinks() {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->getProperty(\"Links\", new NotebookLinks());\n }", "public function getlinks()\n {\n $links = array();\n if (UserUtil::isLoggedIn()) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'inbox'),\n 'text' => $this->__('Inbox'),\n 'class' => 'z-icon-es-inbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'outbox'),\n 'text' => $this->__('Outbox'),\n 'class' => 'z-icon-es-outbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'archive'),\n 'text' => $this->__('Archive'),\n 'class' => 'z-icon-es-gears'\n );\n if ($this->getVar('messages_allow_emailnotification')|| $this->getVar('messages_allow_autoreply')) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'settings'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config'\n );\n }\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'newpm'),\n 'text' => $this->__('New message'),\n 'class' => 'z-icon-es-new'\n );\n }\n return $links;\n }", "public function links()\n\t{\n\t\techo view('sketchpad::help/output/links');\n\t}", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function linksProvider()\n {\n return [[[new \\Urbania\\AppleNews\\Format\\LinkedArticle()]]];\n }", "function noticias_links(){\n \t\n $html=site('http://www.jornalnoticias.co.mz/');\n\t\n\tforeach($html->find('.items-row')as $elms){\n\t\t\n\t\t\n\t\tforeach($elms->find ('.jn-postheader a') as $elms2){\n\t\t\n\t $j[]=mb_convert_encoding( \"http://www.jornalnoticias.co.mz\".$elms2->href, \"HTML-ENTITIES\", \"UTF-8\");\n\t\n\t\n\t\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $j;\n }", "public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_READ)) {\n $links[] = array('url' => ModUtil::url($this->name, 'user', 'hooks'),\n 'text' => $this->__('Frontend'),\n 'title' => $this->__('Switch to user area.'),\n 'class' => 'z-icon-es-home');\n }\n if (SecurityUtil::checkPermission($this->name . ':Twitterparm:', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view', array('ot' => 'twitterparm')),\n 'text' => $this->__('Twitterparms'),\n 'title' => $this->__('Twitterparm list'));\n }\n\n return $links;\n }", "public function links()\n {\n return $this->paginator->render(new BootstrapThreePresenter($this->paginator));\n }", "public function getHtmlNetwork() {\n $ntworks = array(\n \n 'facebook',\n 'twitter',\n 'linkedin',\n 'pinterest',\n 'youtube',\n 'google',\n 'myspace',\n \n );\n \n $networks = array();\n \n foreach($ntworks as $name) {\n \n if (\n array_key_exists($name,$this->configWeb)\n && !empty($this->configWeb[$name])\n ) {\n $networks[$this->getUrl($name)] = $this->getImageSkin($name);\n }\n \n }\n \n $tplNetworks = Template::getWebsiteView('widgets/networks',$this->getTheme());\n ob_start(); if (is_file($tplNetworks)) { include $tplNetworks; } $out = ob_get_clean();\n \n return $out;\n \n }", "public function getLinks()\n\t{\n\t\treturn $this->aLinks;\n\t}", "private function links()\n {\n foreach ($this->controller->links as $value)\n echo \"\\t<link rel='stylesheet' href='\" . DOMAIN . $value . \"' />\\n\";\n }", "public function getLinks() {\n\t\treturn $this->links;\n\t}", "public function getLinks()\n {\n $links = array();\n \n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_READ)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaysysinfo'),\n 'text' => $this->__('Server'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_OVERVIEW)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaybrowserinfo'),\n 'text' => $this->__('Client'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'backupdb'),\n 'text' => $this->__('Backup'),\n 'class' => 'z-icon-es-export');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'scripts'),\n 'text' => $this->__('Scripts'),\n 'class' => 'z-icon-es-gears');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url('Zfiler', 'admin', 'filer'),\n 'text' => $this->__('Filer'),\n 'class' => 'z-icon-es-folder');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => 'https://github.com/nmpetkov/Ztools/wiki',\n 'text' => $this->__('Wiki'),\n 'class' => 'z-icon-es-help');\n }\n\n return $links;\n }", "function quail_server_parse_links($address, $html, $options = array()) {\n\t$links = array();\n\t$dom = new DOMDocument();\n\t$result = @$dom->loadHTML($html);\n\tif(!$result) {\n\t\treturn $links;\n\t}\n\tforeach($dom->getElementsByTagName('a') as $a) {\n\t\tif($a->hasAttribute('href')) {\n\t\t\tif(substr($a->getAttribute('href'), 0, 1) != '#' && parse_url($a->getAttribute('href'))) {\n\t\t\t\t//We ignore anchor links to the same page\n\t\t\t\t$links[$a->getAttribute('href')] = $a->getAttribute('href');\n\t\t\t}\n\t\t}\n\t}\n\tforeach($dom->getElementsByTagName('frame') as $frame) {\n\t\tif($frame->hasAttribute('src')) {\n\t\t\t//We ignore anchor links to the same page\n\t\t\t$links[$frame->getAttribute('src')] = $frame->getAttribute('src');\n\t\t}\n\t}\n\tforeach($links as $k => $link) {\n\t\t$start = parse_url($options['start_uri']);\n\t\tif(!$options['span_hosts']) {\n\t\t\t$link_url = parse_url($link);\n\t\t\tif($link_url['host'] && $link_url['host'] != $start['host']) {\n\t\t\t\tunset($links[$k]);\n\t\t\t}\n\t\t\telseif(!isset($link_url['host']) && $link_url['path']) {\n\t\t\t\t$links[$k] = quail_server_build_absolute($address, $link);\n\t\t\t} \n\t\t}\n\t}\n\treturn $links;\n}", "function getLink(): string;", "public function href();", "public function getLinks()\r\n {\r\n return $this->_links;\r\n }", "function get_links_from_text($raw) {\r\n\t// via http://stackoverflow.com/a/5289151/2496685\r\n\t$reg_exUrl = \"(?i)\\b((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\\\".,<>?«»“”‘’]))\";\r\n\t$matches = array();\r\n\tpreg_match_all($reg_exUrl, $raw, $matches);\r\n\treturn $matches[0];\r\n}", "public function makeClickableLinks()\n {\n $this->texte = trim(preg_replace(\n \"#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i\",\n \"$1$3</a>\",\n preg_replace_callback(\n '#([\\s>])((www|ftp)\\.[\\w\\\\x80-\\\\xff\\#$%&~/.\\-;:=,?@\\[\\]+]*)#is',\n function ($matches) {\n return $this->makeClickableUrlCallback($matches, 'http://');\n },\n preg_replace_callback(\n '#([\\s>])([\\w]+?://[\\w\\\\x80-\\\\xff\\#$%&~/.\\-;:=,?@\\[\\]+]*)#is',\n function ($matches) {\n return $this->makeClickableUrlCallback($matches);\n },\n ' '.$this->texte\n )\n )\n ));\n\n return $this;\n }", "public function Link()\n {\n return $this->Url;\n }", "private static function links()\n {\n $files = ['Link'];\n $folder = static::$root.'Http/Links'.'/';\n\n self::call($files, $folder);\n\n $files = ['LinkKeyNotFoundException'];\n $folder = static::$root.'Http/Links/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public static function getLinks()\n\t{\n\t\treturn static::$links;\n\t}", "public function getLink(): string;", "public function getLink(): string;", "public static function getLinks() {\n $links = Yii::$app->cacheManage->links;\n if ($links) {\n return $links;\n }\n\n $links = LinkOption::getAllLinks();\n if ($links) {\n Yii::$app->cacheManage->links = $links;\n }\n return $links;\n }", "function linkUrlsInTrustedHtml($html)\n{\n return \\Kwi\\UrlLinker::getInstance()->linkUrlsInTrustedHtml($html);\n}", "public function links()\n {\n return view('developers.links.index');\n }", "public function Link()\n {\n return Controller::join_links('admin/admin-help/show/help', $this->ID);\n }", "public function generate_links($attr)\n\t{\n\t\t$source = \"http://www.marketingvillas.com/links_rev.php\";\n\t\t$source .= '?exc='.str_replace('uat.','www.',$_SERVER['SERVER_NAME']);\n\t\t\n\t\tif($attr['heading'] != '')\n\t\t\t$source .= '&heading='.$attr['heading'];\n\t\t\n\t\tif($attr['uriheading'] != '')\n\t\t\t$source .= '&url_heading='.$attr['uriheading'];\n\t\telse\n\t\t\t$source .= '&url_heading=h2';\n\t\t\n\t\tif($attr['what'] != '')\n\t\t\t$source .= '&what='.urlencode($attr['what']);\n\t\t\n\t\t$meme = $this->ret(ltrim($attr['sublocation']));\n\t\t$source .= '&location='.$meme['location'];\n\t\t$source .= '&area='.$meme['area'];\n\t\t//echo $source;\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $source);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\treturn $output;\n\t}", "public function getUrl()\n\t{\n\t\treturn App\\Purifier::decodeHtml($this->get('linkto'));\n\t}", "public function AbsoluteLinks()\n {\n return HTTP::absoluteURLs($this->forTemplate());\n }", "public function getFeedLink();", "public function getLinks()\n {\n return $this->getAllChildren();\n }", "public function link(): string\n {\n return $this->link;\n }", "public function getOfficialLink();", "public function getLinks(): array\n {\n return $this->links;\n }", "public function getLinks(): array\n {\n return $this->links;\n }", "public function getLinks()\n {\n if(null === $this->_link){\n\t\t\t$node = Mage::app()->getConfig()\n\t\t\t\t->getNode('global/faonni_accountnavigation/link');\n\t\t\t$this->_link = $node->asArray();\t\n\t\t}\n\t\treturn $this->_link;\n }", "function GetGoJpLinks($Url){\n\n $html = scraperWiki::scrape( $Url );\n\n $dom = new simple_html_dom();\n $dom->load($html);\n\n $arrDoamins = array();\n foreach($dom->find('a') as $el){\n //echo \"$el->href\\r\\n\";\n if(strpos($el->href,DOMAIN_GOJP)<>FALSE){\n $host = parse_url($el->href);\n if($host<>FALSE){\n if($host['scheme']<>\"\" && strpos($host['host'],DOMAIN_GOJP)<>FALSE){\n $url = $host['scheme'].'://'.$host['host'];\n $arrDoamins[$url] = $host;\n $arrDoamins[$url]['title'] = $el->plaintext;\n }\n }\n }\n }\n return $arrDoamins;\n}", "function GetGoJpLinks($Url){\n\n $html = scraperWiki::scrape( $Url );\n\n $dom = new simple_html_dom();\n $dom->load($html);\n\n $arrDoamins = array();\n foreach($dom->find('a') as $el){\n //echo \"$el->href\\r\\n\";\n if(strpos($el->href,DOMAIN_GOJP)<>FALSE){\n $host = parse_url($el->href);\n if($host<>FALSE){\n if($host['scheme']<>\"\" && strpos($host['host'],DOMAIN_GOJP)<>FALSE){\n $url = $host['scheme'].'://'.$host['host'];\n $arrDoamins[$url] = $host;\n $arrDoamins[$url]['title'] = $el->plaintext;\n }\n }\n }\n }\n return $arrDoamins;\n}", "public function getLinks()\r\r\n {\r\r\n $links = $this->parseParams();\r\r\n\r\r\n foreach ($links as &$link) {\r\r\n $key = key($link);\r\r\n unset($link[$key]);\r\r\n $link['url'] = trim($key, '<> ');\r\r\n }\r\r\n\r\r\n return $links;\r\r\n }", "function wp_dashboard_incoming_links_output()\n {\n }", "public function getLink()\n {\n $_link = $this->getData('url');\n\n if ($_link && parse_url($_link, PHP_URL_SCHEME)) {\n $_link = '<a href=\"' . $_link . '\" class=\"link\" target=\"_blank\">';\n } elseif ($_link) {\n $_link = '<a href=\"' . $this->getUrl() . $_link . '\" class=\"link\" >';\n } else {\n $_link = false;\n }\n\n return $_link;\n }", "function auto_discovery_link_tags()\n{\n $html = '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"'. __('Omeka RSS Feed') . '\" href=\"'. html_escape(items_output_url('rss2')) .'\" />';\n $html .= '<link rel=\"alternate\" type=\"application/atom+xml\" title=\"'. __('Omeka Atom Feed') .'\" href=\"'. html_escape(items_output_url('atom')) .'\" />';\n return $html;\n}", "public static function detect_links($text){\n// $dom->loadHTML($text);\n// $xPath = new \\DOMXPath($dom);\n// $texts = $xPath->query(\n// '/html/body//text()[\n// not(ancestor::a) and (\n// contains(.,\"http://\") or\n// contains(.,\"https://\") or\n// contains(.,\"ftp://\") )]'\n// );\n// foreach ($texts as $text) {\n// $fragment = $dom->createDocumentFragment();\n// $fragment->appendXML(\n// preg_replace(\n// \"~((?:http|https|ftp)://(?:\\S*?\\.\\S*?))(?=\\s|\\;|\\)|\\]|\\[|\\{|\\}|,|\\\"|'|:|\\<|$|\\.\\s)~ui\",\n// '<a href=\"$1\">$1</a>',\n// $text->data\n// )\n// );\n// $text->parentNode->replaceChild($fragment, $text);\n// }\n// return utf8_decode($dom->saveXML($dom->documentElement));\n// $m = \"~((?:http|https|ftp)://(?:\\S*?\\.\\S*?))(?=\\s|\\;|\\)|\\]|\\[|\\{|\\}|,|\\\"|'|:|\\<|$|\\.\\s)~ui\";\n// $r = '$1 <a href=\"$2\">$2</a>';\n// return preg_replace($m,$r,$text);\n return $text;\n\n }", "public static function links()\n {\n return \\Yii::t('yii', 'Designed by {developers}', [\n 'developers' => '<a href=\"http://www.yiiframework.com/\" rel=\"external\">' . \\Yii::t('yii', 'Yinan') . '</a>'\n ]);\n }", "public function getLinks()\n {\n // Define an empty array to hold the list of admin links\n $links = array();\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'view'),\n 'text' => $this->__('Tag List'),\n 'class' => 'z-icon-es-view');\n }\n if (SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'edit'),\n 'text' => $this->__('New tag'),\n 'class' => 'z-icon-es-new');\n }\n\n return $links;\n }", "function getAllLinks(){\r\n return $this->link_arry;\r\n }", "public function getURL()\n {\n return $this->page->getURL() . 'links-to-this/';\n }", "function Link()\n\t{\tif ($this->details[\"hblink\"])\n\t\t{\tif (strstr($this->details[\"hblink\"], \"http://\") || strstr($this->details[\"hblink\"], \"https://\"))\n\t\t\t{\treturn $this->details[\"hblink\"];\n\t\t\t} else\n\t\t\t{\treturn SITE_URL . $this->details[\"hblink\"];\n\t\t\t}\n\t\t}\n\t}", "abstract public function links(): JsonApiParser\\Collections\\Links;", "function getLink() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_LINK);\n\t}", "function getLink() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_LINK);\n\t}", "function getLink() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_LINK);\n\t}", "function getLink() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_LINK);\n\t}", "public function linksProvider()\n {\n return [[new \\Urbania\\AppleNews\\Api\\Objects\\ArticleLinks()]];\n }", "public function detect_links()\r\n\t{\r\n\t\t$this->loop_text_nodes(function($child) {\r\n\t\t\tpreg_match_all(\"/(?:(?:https?|ftp):\\/\\/|(?:www|ftp)\\.)(?:[a-zA-Z0-9\\-\\.]{1,255}\\.[a-zA-Z]{1,20})(?::[0-9]{1,5})?(?:\\/[^\\s'\\\"]*)?(?:(?<![,\\)\\.])|[\\S])/\",\r\n\t\t\t$child->get_text(),\r\n\t\t\t$matches,\r\n\t\t\tPREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE);\r\n\r\n\t\t\tif(count($matches[0]) == 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t$replacment = array();\r\n\t\t\t$last_pos = 0;\r\n\r\n\t\t\tforeach($matches[0] as $match)\r\n\t\t\t{\r\n\t\t\t\tif(substr($match[0], 0, 3) === 'ftp' && $match[0][3] !== ':')\r\n\t\t\t\t\t$url = 'ftp://' . $match[0];\r\n\t\t\t\telse if($match[0][0] === 'w')\r\n\t\t\t\t\t$url = 'http://' . $match[0];\r\n\t\t\t\telse\r\n\t\t\t\t\t$url = $match[0];\r\n\r\n\t\t\t\t$url = new SBBCodeParser_TagNode('url', array('default' => htmlentities($url, ENT_QUOTES | ENT_IGNORE, \"UTF-8\")));\r\n\t\t\t\t$url_text = new SBBCodeParser_TextNode($match[0]);\r\n\t\t\t\t$url->add_child($url_text);\r\n\r\n\t\t\t\t$replacment[] = new SBBCodeParser_TextNode(substr($child->get_text(), $last_pos, $match[1] - $last_pos));\r\n\t\t\t\t$replacment[] = $url;\r\n\t\t\t\t$last_pos = $match[1] + strlen($match[0]);\r\n\t\t\t}\r\n\r\n\t\t\t$replacment[] = new SBBCodeParser_TextNode(substr($child->get_text(), $last_pos));\r\n\t\t\t$child->parent()->replace_child($child, $replacment);\r\n\t\t}, $this->get_excluded_tags(SBBCodeParser_BBCode::AUTO_DETECT_EXCLUDE_URL));\r\n\r\n\t\treturn $this;\r\n\t}", "public static function Links($Mixed) {\n if (!is_string($Mixed))\n return self::To($Mixed, 'Links');\n else {\n $Mixed = preg_replace_callback(\n \"/\n (?<!<a href=\\\")\n (?<!\\\")(?<!\\\">)\n ((?:https?|ftp):\\/\\/)\n ([\\@a-z0-9\\x21\\x23-\\x27\\x2a-\\x2e\\x3a\\x3b\\/;\\x3f-\\x7a\\x7e\\x3d]+)\n /msxi\",\n array('Gdn_Format', 'LinksCallback'),\n $Mixed);\n\n return $Mixed;\n }\n }", "protected function addLinks()\n {\n }", "function linkify($s) {\n\n Octopus::loadExternal('simplehtmldom');\n\n $s = '<p>' . $s . '</p>';\n $dom = str_get_html($s);\n $regex = '/(\\s|^|\\()(https?:\\/\\/[^\\s<]+?[^\\.])(\\.?(\\s|$|\\)))/ims';\n $regex2 = '/(\\s|^|\\()([^\\s<\\(\\.]+\\.[\\w]{2,}[^\\s<]*?)(\\.?(\\s|$|\\)))/ims';\n\n foreach ($dom->nodes as $el) {\n\n if ($el->tag == 'text') {\n if (count($el->nodes) == 0 && $el->parent->tag != 'a') {\n $el->innertext = preg_replace($regex, '$1<a href=\"$2\">$2</a>$3', $el->innertext);\n $el->innertext = preg_replace($regex2, '$1<a href=\"http://$2\">$2</a>$3', $el->innertext);\n }\n }\n\n }\n\n return substr($dom->save(), 3, -4);\n\n }", "public function getlinks()\n {\n $links = array();\n\n if (Content_Util::contentHasPageCreateAccess()) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'newPage'),\n 'text' => $this->__('Add new page'),\n 'class' => 'z-icon-es-new');\n }\n if (SecurityUtil::checkPermission('Content::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url('Content', 'admin', 'main'),\n 'text' => $this->__('Page list'),\n 'class' => 'z-icon-es-edit',\n 'links' => array(\n array('url' => ModUtil::url('Content', 'user', 'sitemap'),\n 'text' => $this->__('Sitemap')),\n array('url' => ModUtil::url('Content', 'user', 'extlist'),\n 'text' => $this->__('Extended')),\n array('url' => ModUtil::url('Content', 'user', 'pagelist'),\n 'text' => $this->__('Complete')),\n array('url' => ModUtil::url('Content', 'user', 'categories'),\n 'text' => $this->__('Category list')),\n ));\n }\n\n return $links;\n }", "public function getLinkUrl(): string\n {\n return $this->linkUrl;\n }", "public function getLinksFormatted() { // @LOW work with a transient\n\t\tif (isset($this->links[0])) {\n\t\t\t$links = str_replace(\"\\r\\n\",\"\\n\",$this->links);\n\t\t\t$linkArray = GeneralUtility::trimExplode(\"\\n\", $links,1);\n\t\t\treturn $linkArray;\n\t\t}\n\t\treturn array();\n\t}", "public function link();", "function make_links_clickable($text)\r\n {\r\n return preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i', '<a href=\"$1\" target=\"_blank\">$1</a>', $text);\r\n }", "public function getLink() {\n\t\t\t// This is currently identical to drawLink()\n\t\t\t// but that's designed to return HTML, and may in the future contain formatting etc\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$this->guid}'\");\n\t\t\t$location = array();\n\t\t\t$html = '';\n\t\t\twhile ($data->parent != 0) {\n\t\t\t\t$html = '/'.$data->name.$html;\n\t\t\t\t$data = $db->get_row(\"SELECT parent,name FROM pages WHERE guid = '{$data->parent}'\");\n\t\t\t}\n\t\t\treturn $html . '/'; // .html removed and replaced by a /\n\t\t}", "public function getLinks($networks = array(), $separator = '')\n {\n if (is_string($networks)) {\n return $this->getLink($networks);\n } elseif (is_array($networks)) {\n $output = array();\n foreach ($networks as $network) {\n if ($this->supports($network)) {\n $output[] = $this->getLink($network);\n }\n }\n return implode($separator, $output);\n }\n\n return '';\n }", "public function getLink():string;", "public function getlinks()\r\n {\r\n $links = array();\r\n\r\n if (SecurityUtil::checkPermission('EZComments::', '::', ACCESS_ADMIN)) {\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'main'),\r\n 'text' => $this->__('View comments'),\r\n 'class' => 'z-icon-es-view');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'stats'),\r\n 'text' => $this->__('Comment statistics'),\r\n 'class' => 'z-icon-es-cubes');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings'),\r\n 'class' => 'z-icon-es-config',\r\n 'links' => array(\r\n array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'cleanup'),\r\n 'text' => $this->__('Delete orphaned comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'migrate'),\r\n 'text' => $this->__('Migrate comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'purge'),\r\n 'text' => $this->__('Purge comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'applyrules'),\r\n 'text' => $this->__('Re-apply moderation rules'))\r\n ));\r\n }\r\n return $links;\r\n }", "public function links()\n {\n if (isset($this->item['links'])) {\n return new Links($this->item['links']);\n }\n }", "function getlinkfromcontent($text)\n{\n$reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\n\n// The Text you want to filter for urls\n\n// Check if there is a url in the text\nif(preg_match($reg_exUrl, $text, $url)) {\n\n// make the urls hyper links\necho preg_replace($reg_exUrl, \"<a target='_new' href='\".$url[0].\"' target='_blank' style='color:#166cec;text-decoration:underline;'>\".$url[0].\"</a>\", $text);\n\n} else {\n\n// if no urls in the text just return the text\nreturn $text;\n\n}\n}", "function getHtmlLink() {\n\t\treturn $this->_HtmlLink;\n\t}", "public function index()\n {\n return Links::all();\n }", "public function getLinks()\n {\n $displayName = $this->getDisplayName();\n\n $links = $this->reddit->getLinksBySubreddit($displayName);\n\n return $links;\n }", "private function links() : \\Illuminate\\Database\\Eloquent\\Collection\n {\n return LinkModel::all();\n }", "public function link(): string {\n\t\treturn $this->page['link'] ?? '';\n\t}", "public function getLinks($entity)\n {\n }", "public function links() {\n\ttry{\n\t $res['errors'] = false;\n\t $res['links'] = view('links', ['links' => Link::all()])->render();\n\t return response()->json($res);\n\t} catch (Exception $e){\n\t $res['errors'] = true;\n\t $res['message'] = $e->getMessage();\n\t return response()->json($res);\n\t}\n }", "public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'main'), 'text' => $this->__('System summary'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 4)), 'text' => $this->__('PHP configuration'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 8)), 'text' => $this->__('PHP modules'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 16)), 'text' => $this->__('Server environment'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 32)), 'text' => $this->__('PHP variables'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'extensions'), 'text' => $this->__('Zikula extensions'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'filesystem'), 'text' => $this->__('Zikula file system'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'ztemp'), 'text' => $this->__('Zikula ztemp directory'));\n }\n\n return $links;\n }", "public function getlinks()\n {////\n // Define an empty array to hold the list of admin links\n $links = array();\n\n // Return the links array back to the calling function\n return $links;\n }", "public function links()\n\t{\n\t\tif ($this->last <= 1) return '';\n\n\t\t// Each pagination element is created by an element method. This allows\n\t\t// us to keep this class clean and simple, because pagination code can\n\t\t// become a mess. We would rather keep it simple and beautiful.\n\t\tforeach ($this->elements as $element)\n\t\t{\n\t\t\t$elements[] = $this->$element(Lang::line(\"pagination.{$element}\")->get());\n\t\t}\n\n\t\treturn '<div class=\"pagination\">'.implode(' ', $elements).'</div>'.PHP_EOL;\n\t}", "public function getLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n \t\t\t\t 'text' => $this->__(' Info'),\n \t\t\t\t 'class' => 'mediasharex-icon-laptop',\n\t\t\t\t\t\t\t 'links' => $this->getInfoLinks());\n }\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info_docs'),\n \t\t\t\t 'text' => $this->__(' Documentation'),\n \t\t\t\t 'class' => 'mediasharex-icon-cabinet');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'),\n \t\t\t\t 'text' => $this->__(' Settings'),\n \t\t\t\t 'class' => 'mediasharex-icon-cogs',\n\t\t\t\t\t\t\t 'links' => $this->getSettingsLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'),\n \t\t\t\t 'text' => $this->__(' Content manager'),\n \t\t\t\t 'class' => 'mediasharex-icon-folder',\n\t\t\t\t\t\t\t 'links' => $this->getManagerLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'),\n \t\t\t\t 'text' => $this->__(' Sources & Handlers'),\n \t\t\t\t 'class' => 'mediasharex-icon-equalizer',\n\t\t\t\t\t\t\t 'links' => $this->getSandHLinks());\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'media_types'),\n \t\t\t\t 'text' => $this->__(' Media types'),\n \t\t\t\t 'class' => 'mediasharex-icon-star',\n\t\t\t\t\t\t\t 'links' => $this->getMediaTypesLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'),\n \t\t\t\t 'text' => $this->__(' Import'),\n \t\t\t\t 'class' => 'mediasharex-icon-loop',\n\t\t\t\t\t\t\t 'links' => $this->getImportLinks());\n }\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\t\n\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mainsettings'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-config');\n }\n\n\n\n\n\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageitems'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managemediastore'), 'text' => $this->__('Media store'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managehandlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-display');\n }\n\t\t\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managesources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageinvitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-filter');\n }\t\n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t */\t\n \n return $links;\n }", "public function get_link() {\r\n return $this->link;\r\n }", "public function getLinkUrl()\n\t{\n\t\treturn $this->link_url;\n\t}", "function renderLinks($links, $prefix = \"\") {\n\n $value = \"\";\n if (!isset($links[0])) {\n $value .= sprintf('<a href=\"%s\" target=\"_blank\">%s</a>%s, ',\n $links[\"url\"], \n $links[\"url\"], \n (\"\" != $links[\"value\"]) ? \" - \" . $links[\"value\"] : \"\"\n );\n } else {\n\n reset($links);\n while (list($k, $link) = each($links)) {\n $value .= sprintf('<a href=\"%s\" target=\"_blank\">%s</a>%s, ',\n $link[\"url\"], \n $link[\"url\"], \n (\"\" != $link[\"value\"]) ? \" - \" . $links[\"value\"] : \"\"\n ); \n }\n\n }\n\n $value = substr($value, 0, -2);\n $this->tpl->setCurrentBlock(strtolower($prefix) . \"links\");\n $this->tpl->setVariable(\"LINK\", $value);\n $this->tpl->parseCurrentBlock();\n\n }" ]
[ "0.7116959", "0.6980968", "0.6980968", "0.6855992", "0.67972565", "0.67353255", "0.67115486", "0.6698864", "0.66507745", "0.6641909", "0.6597651", "0.6584429", "0.6563275", "0.6532909", "0.6528088", "0.6520233", "0.65106106", "0.65021634", "0.65021634", "0.65021634", "0.6498834", "0.648918", "0.6454978", "0.6427974", "0.64165324", "0.64105314", "0.640278", "0.6386637", "0.6380132", "0.63778", "0.6348874", "0.6326767", "0.6316524", "0.6306163", "0.62818944", "0.62749976", "0.62714386", "0.62701595", "0.6267772", "0.6267772", "0.6265338", "0.6256366", "0.6253946", "0.62391925", "0.6236451", "0.622415", "0.62165445", "0.6207216", "0.6192918", "0.6187856", "0.61798036", "0.61644626", "0.61644626", "0.6163808", "0.61606926", "0.61606926", "0.61441565", "0.613198", "0.6130108", "0.61292887", "0.6115376", "0.6114505", "0.61144656", "0.6111485", "0.61069703", "0.61046916", "0.6097166", "0.60965025", "0.60965025", "0.60965025", "0.60965025", "0.6086757", "0.6085681", "0.6077321", "0.6069766", "0.6069542", "0.60690105", "0.6068837", "0.6066959", "0.6061888", "0.60608566", "0.6055168", "0.6054741", "0.60399914", "0.60332566", "0.6030261", "0.60121334", "0.60081667", "0.5994061", "0.5990342", "0.59853256", "0.59851414", "0.5981632", "0.5961328", "0.5941325", "0.5940055", "0.58965886", "0.5884103", "0.5881348", "0.58788186", "0.58781016" ]
0.0
-1
Return list of all available networks
public function getAvailableNetworks() { return $this->networks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_networks()\n {\n }", "public function getNetworksList() {\n return $this->_get(1);\n }", "public function getNetworksList() {\n return $this->_get(4);\n }", "public function networks()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/networks');\n }", "public function getNetworks() {\n\n //GET NETWORK TABLE\n $tableNetwork = Engine_Api::_()->getDbtable('networks', 'network');\n\n //MAKE QUERY\n $select = $tableNetwork->select()\n ->from($tableNetwork->info('name'), array('network_id', 'title'))\n ->order('title');\n $result = $tableNetwork->fetchAll($select);\n\n $everyone = Zend_Registry::get('Zend_Translate')->_('Everyone');\n\n //MAKE DATA ARRAY\n $networksOptions = array('0' => $everyone);\n foreach ($result as $value) {\n $networksOptions[$value->network_id] = $value->title;\n }\n\n //RETURN\n return $networksOptions;\n }", "public function GetNetworks()\n {\n return $this->networkManager;\n }", "public function getAllowedNetworks() {\n $networks = CachedConferenceApi::getNetworks();\n if ((SettingsApi::getSetting(SettingsApi::ALLOW_NETWORK_CHAIRS_TO_SEE_ALL_NETWORKS) <> 1)\n && !LoggedInUserDetails::isCrew()\n ) {\n return NetworkApi::getOnlyNetworksOfChair($networks, LoggedInUserDetails::getUser());\n }\n return $networks;\n }", "function get_networks($args = array())\n {\n }", "function get_networks( $args = array() ) {\n\t$query = new WP_Network_Query();\n\n\treturn $query->query( $args );\n}", "function _tsuiseki_tracking_get_network_names() {\n return array(\n 'site',\n );\n}", "public function hasNetworks() {\n return $this->_has(1);\n }", "public function getAvailableSites();", "public function networkList($filter = array())\n {\n return $this->collection('OpenCloud\\Compute\\Resource\\Network');\n }", "public function hasNetworks() {\n return $this->_has(4);\n }", "public function hasNetworks() {\n return $this->_has(5);\n }", "public function get() {\n\n\t\t$args = func_get_args();\n\n\t\tif( empty( $args ) ) {\n\n\t\t\t$networks = $this->_networks;\n\n\t\t} else {\n\t\t\t$networks = array();\n\n\t\t\tforeach ( $args as $network ) {\n\n\t\t\t\tif( in_array( $network, $this->_networks) ) {\n\t\t\t\t\t$networks[] = $network;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$urls = array();\n\n\t\tforeach ( $networks as $network ) {\n\t\t\t$url = call_user_func( array( $this, str_replace( '-', '_', $network ) ) );\n\n\t\t\tif( $url ) {\n\t\t\t\t$urls[ $network ] = $url;\n\t\t\t}\n\t\t}\n\n\t\treturn $urls;\n\t}", "protected function get_network_ids()\n {\n }", "public static function get_allowed_on_network()\n {\n }", "public function getHtmlNetwork() {\n $ntworks = array(\n \n 'facebook',\n 'twitter',\n 'linkedin',\n 'pinterest',\n 'youtube',\n 'google',\n 'myspace',\n \n );\n \n $networks = array();\n \n foreach($ntworks as $name) {\n \n if (\n array_key_exists($name,$this->configWeb)\n && !empty($this->configWeb[$name])\n ) {\n $networks[$this->getUrl($name)] = $this->getImageSkin($name);\n }\n \n }\n \n $tplNetworks = Template::getWebsiteView('widgets/networks',$this->getTheme());\n ob_start(); if (is_file($tplNetworks)) { include $tplNetworks; } $out = ob_get_clean();\n \n return $out;\n \n }", "public function getAvailableWorkspaces() {}", "public function getNetworkTags()\n {\n return $this->network_tags;\n }", "function get_interface_list() {\n\n\tglobal $g;\n\n\t/* build interface list with netstat */\n\texec(\"/usr/bin/netstat -in -f inet\", $linkinfo);\n\tarray_shift($linkinfo);\n\n\t$iflist = array();\n\n\tforeach ($linkinfo as $link) {\n\t\t$alink = preg_split(\"/\\s+/\", $link);\n\t\t$ifname = chop($alink[0]);\n\t\t$iftype = chop($alink[2]);\n\t\tif (preg_match(\"/Link/\", $iftype)) {\n\t\t\tif (substr($ifname, -1) == \"*\")\n\t\t\t$ifname = substr($ifname, 0, strlen($ifname) - 1);\n\n\t\t\tif (!preg_match(\"/^(pflog|carp|pfsync|ppp|enc|sl|gif|faith|lo|ng|vlan|tun)/\", $ifname)) {\n\t\t\t\t$iflist[$ifname] = array();\n\n\n\t\t\t\t$iflist[$ifname]['mac'] = chop($alink[3]);\n\t\t\t\t$iflist[$ifname]['up'] = false;\n\n\t\t\t\t/* find out if the link on this interface is up */\n\t\t\t\tunset($ifinfo);\n\t\t\t\texec(\"/sbin/ifconfig {$ifname}\", $ifinfo);\n\n\t\t\t\tforeach ($ifinfo as $ifil) {\n\t\t\t\t\tif (preg_match(\"/status: active/\", $ifil)) {\n\t\t\t\t\t\t$iflist[$ifname]['up'] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $iflist;\n}", "public function index()\n\t{\n\t\t$networks = $this->network->all();\n\n\t\treturn View::make('networks.index', compact('networks'));\n\t}", "private function get_ipv4Nets()\n\t{\n\t\treturn $this->m_ipv4Nets;\n\t}", "public function get_most_trusted_routes()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $iface_manager = new Iface_Manager();\n\n $local_networks = $iface_manager->get_most_trusted_networks();\n $extra_networks = $this->get_extra_lans();\n\n // Harmonize format for /network (/24 versus /255.255.255.0)\n $raw_networks = array_merge($local_networks, $extra_networks);\n $networks = array();\n\n foreach ($raw_networks as $network) {\n list($ip, $netmask_or_prefix) = preg_split('/\\//', $network);\n\n if (Network_Utils::is_valid_netmask($netmask_or_prefix))\n $prefix = Network_Utils::get_prefix($netmask_or_prefix);\n else\n $prefix = $netmask_or_prefix;\n\n $networks[] = \"$ip/$prefix\";\n }\n\n return $networks;\n }", "public function getNetworks($keys = null, $templates = false)\n {\n // If no keys are specified, use the current active network list\n $keys = is_array($keys) ? $keys : $this->activeNetworks;\n $networks = [];\n\n // Add each valid network to the output array\n foreach ($keys as $key) {\n if (array_key_exists($key, $this->networks)) {\n $networks[$key] = $this->networks[$key];\n\n // Remove the URL template\n if (!$templates) {\n unset($networks[$key]['template']);\n }\n }\n }\n\n return $networks;\n }", "function wp_get_active_network_plugins()\n {\n }", "public function listNetworks($project, $optParams = array()) {\n $params = array('project' => $project);\n $params = array_merge($params, $optParams);\n $data = $this->__call('list', array($params));\n if ($this->useObjects()) {\n return new Google_NetworkList($data);\n } else {\n return $data;\n }\n }", "public static function getNewtorkIds()\n {\n return array_keys(self::$networks);\n }", "public function get_connections() {\n\t\t$sql = \"SELECT `id` FROM `devices` WHERE `tech` <> 'custom'\";\n\t\t$alldevices = FreePBX::create()->Database->query($sql)->fetchAll(PDO::FETCH_COLUMN, 0);\n\t\t$devices = array_flip($alldevices);\n\n\t\t$protocols = array(\"sip\", \"iax2\", \"pjsip\");\n\t\t$vars = array(\n\t\t\t\"users_online\", \"users_offline\", \"users_total\",\n\t\t\t\"trunks_online\", \"trunks_offline\", \"trunks_total\",\n\t\t\t\"registrations_online\", \"registrations_offline\", \"registrations_total\",\n\t\t);\n\n\t\t// Build array to return\n\t\tforeach ($protocols as $p) {\n\t\t\tforeach ($vars as $v) {\n\t\t\t\t$retarr[$p.\"_\".$v] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Add Totals\n\t\tforeach ($vars as $v) {\n\t\t\t$retarr[$v] = 0;\n\t\t}\n\n\t\tif (!$this->astman) {\n\t\t\treturn $retarr;\n\t\t}\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"sip show peers\"));\n\t\t$astout = explode(\"\\n\",$response['data']);\n\t\t$blacklist = \\FreePBX::Dashboard()->extIgnoreList();\n\t\tforeach ($astout as $line) {\n\t\t\t// Previous bug IRT trunks starting or ending with /'s here. Investigate.\n\t\t\t$exploded = preg_split('/\\s+/', $line);\n\t\t\tif (strpos($exploded[0], '/') === false) {\n\t\t\t\t$name = $exploded[0];\n\t\t\t} else {\n\t\t\t\tlist($name, $null) = explode('/', $exploded[0]);\n\t\t\t}\n\t\t\t//prefix blacklist\n\t\t\tforeach($blacklist as $num)\n\t\t\tif(substr($name,0,$num['length']) == $num['value'] && $name !== $num['value']){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// How to we see if a trunk is down?\n\t\t\tif ( $exploded[1] == \"(Unspecified)\" || // No IP Address\n\t\t\t\t$exploded[5] == \"UNREACHABLE\" || $exploded[6] == \"UNREACHABLE\") {\n\t\t\t\t// This is a device that's down\n\t\t\t\tif (!isset($devices[$name])) {\n\t\t\t\t\t// It is, actually a TRUNK that's down.\n\t\t\t\t\t$retarr['sip_trunks_offline']++;\n\t\t\t\t} else {\n\t\t\t\t\t$retarr['sip_users_offline']++;\n\t\t\t\t}\n\t\t\t} elseif (filter_var($exploded[1], FILTER_VALIDATE_IP)) {\n\t\t\t\t// This is a device that's up.\n\t\t\t\tif (!isset($devices[$name])) {\n\t\t\t\t\t$retarr['sip_trunks_online']++;\n\t\t\t\t} else {\n\t\t\t\t\t$retarr['sip_users_online']++;\n\t\t\t\t}\n\t\t\t} // else it's not a device.\n\t\t}\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"sip show registry\"));\n\t\t$astout = explode(\"\\n\",$response['data']);\n\t\t$pos = false;\n\t\tforeach ($astout as $line) {\n\t\t\tif (trim($line) != '') {\n\t\t\t\tif ($pos===false) {\n\t\t\t\t\t// find the position of \"State\" in the first line\n\t\t\t\t\t$pos = strpos($line,\"State\");\n\t\t\t\t} else {\n\t\t\t\t\t// subsequent lines, check if it says \"Registered\" at that position\n\t\t\t\t\tif (substr($line,$pos,10) == \"Registered\") {\n\t\t\t\t\t\t$retarr['sip_registrations_online']++;\n\t\t\t\t\t} elseif (strlen($line) > $pos) {\n\t\t\t\t\t\t$retarr['sip_registrations_offline']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"iax2 show peers\"));\n\t\t$astout = explode(\"\\n\",$response['data']);\n\t\tforeach ($astout as $line) {\n\t\t\tif (preg_match('/^(([a-z0-9\\-_]+)(\\/([a-z0-9\\-_]+))?)\\s+(\\([a-z]+\\)|\\d{1,3}(\\.\\d{1,3}){3})/i', $line, $matches)) {\n\t\t\t\t//matches: [2] = name, [4] = username, [5] = host, [6] = part of ip (if IP)\n\n\t\t\t\t// have an IP address listed, so its online\n\t\t\t\t$online = !empty($matches[6]);\n\n\t\t\t\tif (!isset($devices[$matches[2]])) {\n\t\t\t\t\t// this is a trunk\n\t\t\t\t\t//TODO match trunk tech as well?\n\t\t\t\t\t$retarr['iax2_trunks_'.($online?'online':'offline')]++;\n\t\t\t\t} else {\n\t\t\t\t\t$retarr['iax2_users_'.($online?'online':'offline')]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"iax2 show registry\"));\n\t\t$astout = explode(\"\\n\",$response['data']);\n\t\t$pos = false;\n\t\tforeach ($astout as $line) {\n\t\t\tif (trim($line) != '') {\n\t\t\t\tif ($pos===false) {\n\t\t\t\t\t// find the position of \"State\" in the first line\n\t\t\t\t\t$pos = strpos($line,\"State\");\n\t\t\t\t} else {\n\t\t\t\t\t// subsequent lines, check if it syas \"Registered\" at that position\n\t\t\t\t\tif (substr($line,$pos,10) == \"Registered\") {\n\t\t\t\t\t\t$retarr['iax2_registrations_online']++;\n\t\t\t\t\t} elseif (strlen($line) > $pos) {\n\t\t\t\t\t\t$retarr['iax2_registrations_offline']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$response = $this->astman->send_request('Command',array('Command'=>\"pjsip show endpoints\"));\n\t\t// This is an amazingly awful format to parse.\n\t\t$lines = explode(\"\\n\", $response['data']);\n\t\t$inheader = true;\n\t\t$istrunk = $isendpoint = false;\n\t\tforeach ($lines as $l) {\n\t\t\tif ($inheader) {\n\t\t\t\tif (isset($l[1]) && $l[1] == \"=\") {\n\t\t\t\t\t// Last line of the header.\n\t\t\t\t\t$inheader = false;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$l = trim($l);\n\t\t\tif (!$l) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If we have a line starting with 'Endpoint:' then we found one!\n\t\t\tif (strpos($l, \"Endpoint:\") === 0) {\n\t\t\t\tif (preg_match(\"/Endpoint:\\s+(.+)\\/(.+?)\\b\\s+(.+)/\", $l, $out)) {\n\t\t\t\t\t// Found a device\n\t\t\t\t\t$isendpoint = $out[1];\n\t\t\t\t\t$istrunk = false;\n\t\t\t\t\tif (isset($out[3]) && strpos($out[3], \"Unavail\") === 0) {\n\t\t\t\t\t\t// Unavailable endpoint.\n\t\t\t\t\t\t$retarr['pjsip_users_offline']++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$retarr['pjsip_users_online']++;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t} elseif (preg_match(\"/Endpoint:\\s+(.+?)\\b/\", $l, $out)) {\n\t\t\t\t\t// Found a trunk\n\t\t\t\t\t$isendpoint = false;\n\t\t\t\t\t$istrunk = $out[1];\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new \\Exception(\"Unable to parse endpoint $l\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we have a Contact: line, then that's something that's registered!\n\t\t\tif (strpos($l, \"Contact:\") === 0) {\n\t\t\t\tif ($isendpoint !== false) {\n\t\t\t\t\t// This is a registered endpoint\n\t\t\t\t\t$retarr['pjsip_registrations_online']++;\n\t\t\t\t} elseif ($istrunk !== false) {\n\t\t\t\t\t// Trunk status... Check for 'avail'\n\t\t\t\t\tif (strpos($l, \"Avail \") === false) {\n\t\t\t\t\t\t// Trunk down.\n\t\t\t\t\t\t$retarr['pjsip_trunks_offline']++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$retarr['pjsip_trunks_online']++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new \\Exception(\"Found a contact before I figured out what it is!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now figure out the totals.\n\t\tforeach ($protocols as $p) {\n\t\t\t$users = $retarr[$p.\"_users_online\"]+$retarr[$p.\"_users_offline\"];\n\t\t\t$retarr[$p.\"_users_total\"] = $users;\n\n\t\t\t$trunks = $retarr[$p.\"_trunks_online\"]+$retarr[$p.\"_trunks_offline\"];\n\t\t\t$retarr[$p.\"_trunks_total\"] = $trunks;\n\n\t\t\t$regs = $retarr[$p.\"_registrations_online\"]+$retarr[$p.\"_registrations_offline\"];\n\t\t\t$retarr[$p.\"_registrations_total\"] = $regs;\n\t\t}\n\n\t\tforeach ($vars as $v) {\n\t\t\tforeach ($protocols as $p) {\n\t\t\t\t$retarr[$v] += $retarr[$p.\"_\".$v];\n\t\t\t}\n\t\t}\n\n\t\treturn $retarr;\n\t}", "private function _network()\n {\n if (CommonFunctions::executeProgram('netstat', '-ni | tail -n +2', $netstat)) {\n $lines = preg_split(\"/\\n/\", $netstat, -1, PREG_SPLIT_NO_EMPTY);\n foreach ($lines as $line) {\n $ar_buf = preg_split(\"/\\s+/\", $line);\n if (! empty($ar_buf[0]) && ! empty($ar_buf[3])) {\n $dev = new NetDevice();\n $dev->setName($ar_buf[0]);\n $dev->setRxBytes($ar_buf[4]);\n $dev->setTxBytes($ar_buf[6]);\n $dev->setErrors($ar_buf[5] + $ar_buf[7]);\n //$dev->setDrops($ar_buf[8]);\n $this->sys->setNetDevices($dev);\n }\n }\n }\n }", "private function get_ipv6Nets()\n\t{\n\t\treturn $this->m_ipv6Nets;\n\t}", "public function getNetwork()\n {\n return $this->network;\n }", "public function getNetwork()\n {\n return $this->network;\n }", "function jb_list_all_network_sites()\n{\n global $wpdb;\n\n $result = '';\n $sites = array();\n $blogs = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0' and public='1'\"));\n\n if(!empty($blogs))\n {\n foreach($blogs as $blog)\n {\n $details = get_blog_details($blog->blog_id);\n\n if($details != false)\n {\n $url = $details->siteurl;\n $name = $details->blogname;\n\n if(!(($blog->blog_id == 1) && ($show_main != 1)))\n {\n $sites[$name] = $url;\n }\n }\n }\n\n ksort($sites);\n\n $count = count($sites);\n $current = 1;\n \n $result.= '<ul class=\"inside-site-list\">';\n foreach($sites as $name=>$url)\n {\n $result.= '<li class=\"inside-site\"><a href=\"'.$url.'\">'.$name.'</a></li>';\n\n ++$current;\n }\n $result.= '</ul>';\n }\n\n return $result;\n}", "public function getNetwork() {\n return $this->getValue('network');\n }", "function all_client_networks(){\n\t\t$user_id = $this->session->userdata('id');\t\n\t\t$role = $this->session->userdata('role');\n\t\tif($role == 'client'){\t\t\t\n\t\t\t$company_id = $this->InteractModal->get_user_meta($user_id, 'company_id');\n\t\t\t$network__list = $this->InteractModal->all_client_networks($company_id);\n\t\t\t$approve_network_list = $this->InteractModal->get_approve_netword_by_clint_id($user_id);\t\n\t\t $own_network__list = $this->InteractModal->all_client_own_networks($user_id);\t\t\n\t\t\t/*=====all network merge=====*/\n\t\t\tif(!empty($approve_network_list) && !empty($network__list)){\n\t\t\t $all_user_list=array_merge($network__list,$approve_network_list,$own_network__list);\t\t\t\t \n\t\t\t\t}elseif(!empty($own_network__list) && !empty($network__list)){\n\t\t\t\t\t$all_user_list=array_merge($network__list,$own_network__list);\n\t\t\t\t}else{\n\t\t\t\t\t$all_user_list=$own_network__list;\t\t\t\t\t \n\t\t\t\t}\n\t\t\t$uniqueArray = array();\n\t\t\tif(!empty($all_user_list)):\n\t\t\t foreach($all_user_list as $subArray){\n\t\t\t\tif(!in_array($subArray, $uniqueArray)){\n\t\t\t\t $uniqueArray[] = $subArray;\n\t\t\t\t}\n\t\t\t }\n\t\t\t\t$pagedata['network__list'] = $uniqueArray;\n\t\t\t else:\n\t\t\t\t$pagedata['network__list'] = $network__list;\n\t\t\tendif; \n\t\t\t/*=====all network merge=====*/\n\t\t\t$all_listing_as_buyer = $this->InteractModal->get_all_listing_buyer_seller( $user_id, 'for_buy' );\n\t\t\t$all_listing_as_seller = $this->InteractModal->get_all_listing_buyer_seller( $user_id, 'for_sale' );\n\t\t\t$footer_data['all_listing_as_buyer'] = $all_listing_as_buyer;\n\t\t\t$footer_data['all_listing_as_seller'] = $all_listing_as_seller;\n\t\t\t$footer_data['user__id'] = $user_id;\n\t\t\t$this->load->view('client/header');\n\t\t\t$this->load->view('client/client_all_network', $pagedata );\n\t\t\t$this->load->view('client/footer',$footer_data); \n\t\t\t}else{\n\t\t\t\tredirect( base_url() );\n\t\t\t} \n\t}", "public static function getAvailableAdapters()\n {\n return Image::getAvailableAdapters();\n }", "public function getConnections();", "public function getConnections();", "function getNodes() {\n\treturn db_query(\"SELECT nodename,ipaddress FROM Nodes\");\n}", "function getConnections(): array;", "public function getAllOnline()\n {\n return $this->query()->online()->get();\n }", "public function getAvailableServices();", "public function index()\n {\n $networks = Network::all();\n\n// return $clients;\n return view('IT.index', compact('networks'));\n }", "public function getActiveNetwork()\n {\n return $this->active_network;\n }", "public function getAvailablePlatforms()\n {\n return ExternalPlatforms::find()->where([\n 'status' => ExternalPlatforms::STATUS_ACTIVE,\n ])->all();\n }", "public function getNetwork() {\n return $this->_network;\n }", "function wp_get_network($network)\n {\n }", "public function getNetworkAllowableValues()\n {\n return [\n self::NETWORK_NERPANET,\n self::NETWORK_MAINNET,\n ];\n }", "public function getNodes();", "function listNetworkIp($net,$broadcast,$sn) {\n\n $lista=[]; // lista da ritornare \n\n $no = explode('.', $net); // array con gli ottetti dell'indirizzo NET\n $bo = explode('.', $broadcast); // array con gli ottetti dell'indirizzo NET\n\n $nbit = 32-$sn; // numero di bit assegnati agli host\n \n $nhost = pow(2,$nbit); // numero totale degli host\n\n $start = (int) $no[3]+1;\n $end = (int) $bo[3]-1;\n $roots = $no[0].\".\".$no[1].\".\".$no[2].\".\";\n $roote = $bo[0].\".\".$bo[1].\".\".$bo[2].\".\";\n $primo = $roots.$start;\n $ultimo = $roote.$end;\n $hosts = [];\n\n //echo $start.\" - \".$end.\"<br>\";\n\n // verifica che gli IP disponibili non superino le 5000 unità -> stila la lista\n if($nhost > 35000) {\n $lista[0] = $primo;\n $lista[1] = $ultimo;\n }\n else {\n for($i=ip2long($primo); $i<=ip2long($ultimo); $i++) {\n\n $ip2conv = $i;\n $ip2write = long2ip($ip2conv);\n $lista[] = $ip2write;\n \n $host=gethostbyaddr($ip2write); // prelevo il nome del host (se disponibile)\n //echo $host.\" | \";\n\n // se il nome host NON è uguale all'IP -> salvo il nome Host in una lista\n if(!filter_var($host, FILTER_VALIDATE_IP)) {\n $hosts[] = \"IP: $ip2write ==> Nome Host:<b> $host </b><br>\";\n }\n\n }\n }\n\n $ret['hostnames'] = $hosts;\n $ret['primo'] = $primo;\n $ret['ultimo'] = $ultimo;\n $ret['lista'] = $lista;\n $ret['nhost'] = $nhost; \n\n return $ret;\n}", "public function getAvailablePackages() {}", "function getApnList()\n {\n \t$activeApn = $this->getApn();\t//get the current apn being used by the device\n \tdebug('(cell_controller.inc|getApnList()) current apn being used on the device'.$activeApn); \t\t\t\t//DEBUG\n \t\n \t$sh_args = 'getapnlist';\t\t//admin client command for getting secondary apn list\n \t$sh_out = atsexec(escapeshellcmd($sh_args));\t//socket call\n \tdebug('(cell_controller.inc|getApnList()) admin client api command getapnlist output: sh_out', $sh_out); \t//DEBUG\n \t\n \tif(($sh_out != 'phpcmd: fail') && ($sh_out != 'phpcmd: invalid command'))\n \t{\n \t\t$xml = new SimpleXMLElement($sh_out);\t//create SimpleXML object\n\t \t$html =''; \t\t\t\t\t\t\t\t\t//store the html markup\n\t \tdebug('(cell_controller.inc|getApnList()) apn list converted into SimpleXMLElement object '.$xml); \t\t//DEBUG\n\t \t\n\t \tforeach($xml->network as $network)\t\t\t\n\t \t{\n\t \t\t$html .= '<optgroup label=\"'.$network->attributes()->name.'\">';\t \t\t//create Carrier section\n\t \t\tforeach ($network->apn as $apn)\t\t\t\t\t\t\t\t\t\t\t//group apns under each Carrier\n\t \t\t{\n\t \t\t\tdebug('(cell_controller.inc|getApnList()) $apn '.$apn); \t\t//DEBUG\n\t \t\t\t$html .= '<option '.((strcasecmp($apn,$activeApn) == 0) ? 'selected=\"selected\"':'').' value=\"'.$apn.'\">'.$apn.'</option>';\n\t \t\t}\n\t \t\t$html .= '</optgroup>';\n\t \t}\n\n\t \treturn $html;\n \t}\n \telse\n \t{\n \t\treturn '<option value=\"\">Failed to retrieve APN list</option>';\n \t}\n }", "function listNetworkAdd($searchadd){\n #sends the deconstructed IP to the networkAdd function\n\n\t\t$iplist = explode(\".\", $searchadd);\n\n\t\t$networkList = [];\n\n\t\tfor($i = 8; $i < 33; $i++){\n\t\t\t$ipvar = explode(\".\", $searchadd);\n\t\t\t$temp = networkAdd($ipvar, $i);\n\t\t\t$networkList[] = $temp;\n\t\t}\n\n\t\t#echo\"All network addresses</br>\";\n\n\t\treturn $networkList;\n\t}", "public function fetchNetworks($organizationId)\n {\n return $this->callApi(\"organizations/$organizationId/networks\");\n }", "function listnetwork_function() {\n global $wpdb;\n\t\t\t\n\t\t// Query all blogs from multi-site install\n\t\t$blogs = $wpdb->get_results(\"SELECT blog_id,domain,path FROM wp_blogs where blog_id > 1 ORDER BY path\");\n\t\n\t\t// Start unordered list\n\t\techo '<ul>';\n\t\n\t\t// For each blog search for blog name in respective options table\n\t\tforeach( $blogs as $blog ) {\n\t\n\t\t\t// Query for name from options table\n\t\t\t$blogname = $wpdb->get_results(\"SELECT option_value FROM wp_\".$blog->blog_id .\"_options WHERE option_name='blogname' \");\n\t\t\tforeach( $blogname as $name ) { \n\t\n\t\t\t\t// Create bullet with name linked to blog home pag\n\t\t\t\techo '<li>';\n\t\t\t\techo $name->option_value;\n\t\t\t\techo '<a href=\"http://';\n\t\t\t\techo $blog->domain;\n\t\t\t\techo $blog -> path;\n\t\t\t\techo '\">';\n\t\t\t\techo ' Visit';\n\t\t\t\techo '</a> or ';\n\t\t\t\techo '<a href=\"http://';\n\t\t\t\techo $blog->domain;\n\t\t\t\techo $blog -> path;\n\t\t\t\techo '/wp-admin\">';\n\t\t\t\techo 'Edit';\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\n\t\t\t}\n\t\t}\n\t\n\t\t// End unordered list\n\t\techo '</ul>';\n}", "public function all()\n {\n $gateways = [];\n\n foreach ($this->gateways as $name => $gateway) {\n $class = $gateway['gateway'];\n if (class_exists($class)) {\n $gateways[$name] = $gateway;\n }\n }\n\n ksort($gateways);\n\n return $gateways;\n }", "protected function connections()\n {\n return [];\n }", "public function get_all(): array\n {\n return $this->nodes;\n }", "public function getOurNetwork()\n {\n $data = HomeController::getPage('our-network');\n return view('our_network')->with(['data' => $data]);\n }", "public function noDefaultGateway(){\n $array = array();\n $mikrotiks = Device::get();\n foreach ($mikrotiks as $device){\n if ($device->default_gateway == \"\"){\n $array[$device->id][$device->name] = $device->ip;\n }\n }\n return $array;\n }", "function update_network_cache($networks)\n {\n }", "public function all()\n {\n return $this->connections;\n }", "public function listaddressgroupings(){\n return $this->bitcoin->listaddressgroupings();\n }", "public function getSocialNetworkInfo() {\n $retVal = array();\n// $retVal[] = \"Điện thoại: \" . $this->getPhone();\n if (isset($this->rSocialNetwork)) {\n foreach ($this->rSocialNetwork as $value) {\n $retVal[] = SocialNetworks::TYPE_NETWORKS[$value->type_network] . \": $value->value\";\n }\n }\n return implode('<br>', $retVal);\n }", "public function all()\n {\n return $this->machine->all();\n }", "public static function graphInterfaces(){\n $devices = Device::where('devicetype_id',\"1\")->get();\n $themikrotiklibrary = new MikrotikLibrary();\n $themikrotiklibrary->graphAllInterfaces($devices);\n }", "public function actionIndex()\n {\n $searchModel = new NetworkElementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $downloadProvider = $searchModel->search(Yii::$app->request->queryParams);\n $downloadProvider->setPagination(false);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'downloadProvider' => $downloadProvider,\n ]);\n }", "public function get_global_ipv4_net()\n {\n $l_sql = 'SELECT * FROM isys_cats_net_list\n\t\t\tINNER JOIN isys_obj ON isys_obj__id = isys_cats_net_list__isys_obj__id\n\t\t\tLEFT JOIN isys_net_type ON isys_cats_net_list__isys_net_type__id = isys_net_type__id\n\t\t\tWHERE isys_obj__const = \"C__OBJ__NET_GLOBAL_IPV4\"\n\t\t\tAND isys_obj__undeletable = 1;';\n\n return $this->retrieve($l_sql)\n ->get_row();\n }", "public function getSites() {\n $result = $this->query('GET', 'site', array(), array('list'));\n return isset($result['list']) ? $result['list'] : $result;\n }", "public static function getNetworkAuthenticatedSubnets(){\n\t\t\tglobal $wpdb;\n\t\t\tglobal $switched;\n\n\t\t\tswitch_to_blog(1);\n\n\t\t\t$authenticatedSubnets = $wpdb->get_results(\n\t\t\t\t\"SELECT *\n\t\t\t\t FROM \".$wpdb->prefix.\"wps_subnets\",\n\t\t\tARRAY_A );\n\n\t\t\trestore_current_blog();\n\n\t\t\treturn $authenticatedSubnets;\n\t\t}", "public function getAllGateways()\n {\n if (!isset($this->_gateways)) {\n $this->_gateways = $this->_getGateways();\n }\n\n return $this->_gateways;\n }", "public static function getInterfaceList() {\n\t\t$i = 0;\n\t\t$interfaces = array();\n\n\t\t$temp = Functions::shellCommand('ifconfig');\n\t\t$temp = explode(\"\\n\",$temp);\n\n\t\twhile($i < count($temp)){\n\t\t\tif(stristr($temp[$i],'flags')){\n\t\t\t\t$position = strpos($temp[$i],\":\",0);\n\t\t\t\t$tmp = substr($temp[$i],0,$position);\n\n\t\t\t\tif($tmp != 'lo0'){\n\t\t\t\t\t$interfaces[] = $tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $interfaces;\n\t}", "public function getShopgateConnections()\n {\n return Mage::getModel('core/config_data')\n ->getCollection()\n ->addFieldToFilter('path', Shopgate_Framework_Model_Config::XML_PATH_SHOPGATE_SHOP_NUMBER)\n ->addFieldToFilter('value', array('neq' => array('')));\n }", "public function gatewayStatus(Request $request)\n {\n $list = [];\n $onlineGateways = Gateway::with('room')\n ->with('floor')\n ->whereIn('MANUFACTURER_ID',[1,2])\n ->where([['ONLINE_FLAG',1], ['REG_FLAG',1]])\n ->get();\n\n foreach($onlineGateways as $onlineGateway){\n $json = array(\n 'onlineGatewayIP' => $onlineGateway->GATEWAY_IP,\n 'onlineFloor' => $onlineGateway->floor->FLOOR_NAME,\n 'onlineRoom' => $onlineGateway['room']['ROOM_NAME'],\n );\n array_push($list, $json);\n }\n $offlineGateways = Gateway::with('room')\n ->with('floor')\n ->whereIn('MANUFACTURER_ID',[1,2])\n ->where([['ONLINE_FLAG',0], ['REG_FLAG',1]])\n ->get();\n foreach($offlineGateways as $offlineGateway){\n $json = array(\n 'offlineGatewayIP' => $offlineGateway->GATEWAY_IP,\n 'offlineFloor' => $offlineGateway->floor->FLOOR_NAME,\n 'offlineRoom' => $offlineGateway['room']['ROOM_NAME'],\n );\n array_push($list, $json);\n }\n return $list;\n }", "function getCellNetwork($if)\n {\n \t$arlines = array();\t\t//Store result of ifconfig command\n \texec('ifconfig '.escapeshellarg($if).' '.'2>&1 ', $arlines);\t//execute ifconfig\n \tdebug('(cell_controller.inc|getCellNetwork()) admin client api command: ifconfig '.escapeshellarg($if).' '.'2>&1 '); \t//DEBUG\n \tdebug('(cell_controller.inc|getCellNetwork()) admin client api command output: $arlines', $arlines); \t\t\t\t\t//DEBUG\n \t\n \t//convert array into single line of text\n \t$str='';\n \tforeach($arlines as $line)\n \t{\n \t\t$str=$str.$line;\n \t}\n \t\n \t//run regex on string and find: IP, Gateway, Subnet\n \t$regex=array();\n \tpreg_match(\"/^([A-z]*\\d)\\s+Link\\s+encap:([A-z-]*)\\s.*\\sinet addr:([0-9.]+)\\s*P-t-P:([0-9.]+)\\s*Mask:([0-9.]+)/ims\", $str, $regex);\n \t\n \t$interface = array();\n \tif( !empty($regex) ){\n \t\t$interface['name'] = $regex[1];\n \t\t$interface['type'] = $regex[2];\n \t\t$interface['ip'] = $regex[3];\n \t\t$interface['broadcast'] = $regex[4];\n \t\t$interface['mask'] = $regex[5];\n \t}\n \tdebug('(cell_controller.inc|getCellNetwork()) $interface array '.$interface); \t\t\t\t//DEBUG\n \t\n \treturn $interface;\n }", "function yz_get_social_networks_fields() {\n\n // Init Vars\n $networks_fields = array();\n\n // Get Social Networks\n $social_networks = yz_option( 'yz_social_networks' );\n\n if ( empty( $social_networks ) ) {\n return false;\n }\n\n // Unserialize data\n if ( is_serialized( $social_networks ) ) {\n $social_networks = unserialize( $social_networks );\n }\n\n // Check if there's URL related to the icons.\n foreach ( $social_networks as $network => $data ) {\n $networks_fields[ $network ] = array( 'title' => $data['name'] );\n }\n\n return $networks_fields;\n}", "public function getAvailablePrefixes();", "abstract public function listDevices();", "public static function getConnections()\n {\n }", "public function all(): array\n {\n return $this->algorithms;\n }", "private function all_sites()\r\n {\r\n return $this->sites_repository()->all_sites();\r\n }", "public static function getAvailable()\n {\n $associated_ids = DB::table('campaigns')->pluck('website_id');\n return DB::table('websites')->whereNotIn('id', $associated_ids)\n ->pluck('url', 'id')\n ->toArray();\n }", "public function getAll() {\n $list = $this->_tableGw->select();\n return $list;\n }", "public function index(GetNetworkRequest $request, Server $server): array\n {\n return $this->fractal->collection($server->allocations)\n ->transformWith($this->getTransformer(AllocationTransformer::class))\n ->toArray();\n }", "public function getNetworkSettings() : NetworkSettings\n {\n return $this->networkSettings;\n }", "public function getMagentoWebsites();", "public function all()\n {\n $cacheTime = $this->config()->get('ip_list_cache_expire_time');\n\n if ($cacheTime > 0 && $list = $this->cache()->get(static::IP_ADDRESS_LIST_CACHE_NAME)) {\n return $list;\n }\n\n $list = $this->mergeLists(\n $this->getAllFromDatabase(),\n $this->toModels($this->getNonDatabaseIps())\n );\n\n if ($cacheTime > 0) {\n $this->cache()->put(static::IP_ADDRESS_LIST_CACHE_NAME, $list, $cacheTime);\n }\n\n return $list;\n }", "public function getGateways()\n {\n if (empty($this->cached_gateways)) {\n // results are cached within this object\n $definedIntf = $this->getDefinedInterfaces();\n $dynamic_gw = array();\n $gatewaySeq = 1;\n $i = 0; // sequence used in legacy edit form (item in the list)\n $reservednames = array();\n\n // add loopback, lowest priority\n $this->cached_gateways[$this->newKey(255)] = [\n 'name' => 'Null4',\n 'if' => 'lo0',\n 'interface' => 'loopback',\n 'ipprotocol' => 'inet',\n 'gateway' => '127.0.0.1',\n 'priority' => 255,\n 'is_loopback' => true\n ];\n $this->cached_gateways[$this->newKey(255)] = [\n 'name' => 'Null6',\n 'if' => 'lo0',\n 'interface' => 'loopback',\n 'ipprotocol' => 'inet6',\n 'gateway' => '::1',\n 'priority' => 255,\n 'is_loopback' => true\n ];\n // iterate configured gateways\n if (!empty($this->configHandle->gateways)) {\n foreach ($this->configHandle->gateways->children() as $tag => $gateway) {\n if ($tag == \"gateway_item\" && !empty($gateway)) {\n if (in_array((string)$gateway->name, $reservednames)) {\n syslog(LOG_WARNING, 'Gateway: duplicated entry \"' . $gateway->name . '\" in config.xml needs manual removal');\n }\n $reservednames[] = (string)$gateway->name;\n $gw_arr = array();\n foreach ($gateway as $key => $value) {\n $gw_arr[(string)$key] = (string)$value;\n }\n if (empty($gw_arr['priority'])) {\n // default priority\n $gw_arr['priority'] = 255;\n }\n if (empty($gw_arr['ipprotocol'])) {\n // default address family\n $gw_arr['ipprotocol'] = 'inet';\n }\n $gw_arr['if'] = $this->getRealInterface($definedIntf, $gw_arr['interface'], $gw_arr['ipprotocol']);\n $gw_arr['attribute'] = $i++;\n if (Util::isIpAddress($gateway->gateway)) {\n if (empty($gw_arr['monitor_disable']) && empty($gw_arr['monitor'])) {\n $gw_arr['monitor'] = $gw_arr['gateway'];\n }\n $gwkey = $this->newKey($gw_arr['priority'], !empty($gw_arr['defaultgw']));\n $this->cached_gateways[$gwkey] = $gw_arr;\n } else {\n // dynamic gateways might have settings, temporary store\n if (empty($dynamic_gw[(string)$gateway->interface])) {\n $dynamic_gw[(string)$gateway->interface] = array();\n }\n $gw_arr['dynamic'] = true;\n $dynamic_gw[(string)$gateway->interface][] = $gw_arr;\n }\n }\n }\n }\n // add dynamic gateways\n foreach ($definedIntf as $ifname => $ifcfg) {\n if (empty($ifcfg['enable'])) {\n // only consider active interfaces\n continue;\n }\n foreach ([\"inet\", \"inet6\"] as $ipproto) {\n // filename suffix and interface type as defined in the interface\n $descr = !empty($ifcfg['descr']) ? $ifcfg['descr'] : $ifname;\n $realif = $this->getRealInterface($definedIntf, $ifname, $ipproto);\n $ctype = self::convertType($ipproto, $ifcfg);\n $ctype = $ctype != null ? $ctype : \"GW\";\n // default configuration, when not set in gateway_item\n $thisconf = [\n \"interface\" => $ifname,\n \"weight\" => 1,\n \"ipprotocol\" => $ipproto,\n \"name\" => strtoupper(\"{$descr}_{$ctype}\"),\n \"descr\" => \"Interface \" . strtoupper(\"{$descr}_{$ctype}\") . \" Gateway\",\n \"monitor_disable\" => true, // disable monitoring by default\n \"gateway_interface\" => false, // Dynamic gateway policy\n \"if\" => $realif,\n \"dynamic\" => true,\n \"virtual\" => true\n ];\n // set default priority\n if (strstr($realif, 'gre') || strstr($realif, 'gif') || strstr($realif, 'ovpn')) {\n // consider tunnel type interfaces least attractive by default\n $thisconf['priority'] = 255;\n } else {\n $thisconf['priority'] = 254;\n }\n // locate interface gateway settings\n if (!empty($dynamic_gw[$ifname])) {\n foreach ($dynamic_gw[$ifname] as $gwidx => $gw_arr) {\n if ($gw_arr['ipprotocol'] == $ipproto) {\n // dynamic gateway for this ip protocol found, use config\n unset($dynamic_gw[$ifname][$gwidx]);\n $thisconf = $gw_arr;\n break;\n }\n }\n }\n if (!empty($thisconf['virtual']) && in_array($thisconf['name'], $reservednames)) {\n /* if name is already taken, don't try to add a new (virtual) entry */\n } elseif (($router = $this->getRouterFromFile($realif, $ipproto)) != null) {\n $thisconf['gateway'] = $router;\n if (empty($thisconf['monitor_disable']) && empty($thisconf['monitor'])) {\n $thisconf['monitor'] = $thisconf['gateway'];\n }\n $gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));\n $this->cached_gateways[$gwkey] = $thisconf;\n } elseif (!empty($ifcfg['gateway_interface']) || substr($realif, 0, 5) == 'ovpnc') {\n // XXX: ditch ovpnc in a major upgrade in the future, supersede with interface setting\n // gateway_interface\n\n // other predefined types, only bound by interface (e.g. openvpn)\n $gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));\n // gateway should only contain a valid address, make sure its empty\n unset($thisconf['gateway']);\n $thisconf['gateway_interface'] = true;\n $this->cached_gateways[$gwkey] = $thisconf;\n } elseif (\n $ipproto == 'inet6'\n && in_array($ifcfg['ipaddrv6'] ?? null, ['slaac', 'dhcp6', '6to4', '6rd'])\n ) {\n // Dynamic IPv6 interface, but no router solicit response received using rtsold.\n $gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));\n // gateway should only contain a valid address, make sure its empty\n unset($thisconf['gateway']);\n $this->cached_gateways[$gwkey] = $thisconf;\n } elseif (empty($thisconf['virtual'])) {\n // skipped dynamic gateway from config, add to $dynamic_gw to handle defunct\n $dynamic_gw[$ifname][] = $thisconf;\n }\n }\n }\n // sort by priority\n krsort($this->cached_gateways);\n // entries left in $dynamic_gw are defunct, add them in in disabled state\n foreach ($dynamic_gw as $intfgws) {\n foreach ($intfgws as $gw_arr) {\n if (!empty($gw_arr)) {\n $gw_arr['disabled'] = true;\n $gw_arr['defunct'] = true;\n unset($gw_arr['gateway']);\n $this->cached_gateways[] = $gw_arr;\n }\n }\n }\n }\n return $this->cached_gateways;\n }", "function _tsuiseki_tracking_get_network($opts = array(), $max_length = 254) {\n $max_length = (int)($max_length);\n $network = NULL;\n foreach (_tsuiseki_tracking_get_network_names() as $key) {\n if (empty($opts)) {\n if (isset($_GET[\"$key\"]) && !empty($_GET[\"$key\"])) {\n $network = (string)(trim(_check_plain($_GET[\"$key\"])));\n if (mb_strlen($network) > $max_length) {\n $network = substr($network, 0, $max_length);\n }\n break; // Schleife beenden\n }\n }\n else {\n if (isset($opts[\"$key\"]) && !empty($opts[\"$key\"])) {\n $network = (string)(trim(_check_plain($opts[\"$key\"])));\n if (mb_strlen($network) > $max_length) {\n $network = substr($network, 0, $max_length);\n }\n break; // Schleife beenden\n }\n }\n } // foreach\n if (empty($network)) {\n $network = 'free';\n }\n return $network;\n}", "public function getList(): array\n {\n return $this->client->request(\"/ncm/v1\");\n }", "public function get_ibridge()\n {\n $out = array();\n $sql = \"SELECT COUNT(CASE WHEN model_name <> '' AND model_name IS NOT NULL THEN 1 END) AS count, model_name \n FROM ibridge\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter().\"\n GROUP BY model_name\n ORDER BY count DESC\";\n \n foreach ($this->query($sql) as $obj) {\n if (\"$obj->count\" !== \"0\") {\n $obj->model_name = $obj->model_name ? $obj->model_name : 'Unknown';\n $out[] = $obj;\n }\n }\n return $out;\n }", "public function get_all() {\n $query = $this->db->get('sites');\n return $query->result();\n }", "public function get_wifi_network( $context = 'view' ) {\n\t\treturn $this->get_prop( 'wifi_network', $context );\n\t}", "public static function getSupportedCountriesOffline()\n {\n return static::getSupportedCountries();\n }", "public function allOnline()\n {\n return $this->model->where('active', '=', true)\n ->orderBy('created_at', 'DESC')\n ->get();\n }", "public function getServers();", "public function getNetworkTypeAllowableValues()\n {\n return [\n self::NETWORK_TYPE_WIRED,\n self::NETWORK_TYPE_WIFI,\n self::NETWORK_TYPE_PPP,\n self::NETWORK_TYPE_CELLULAR,\n self::NETWORK_TYPE_OTHERS,\n ];\n }", "public function get_wifi_name()\n {\n $out = array();\n $sql = \"SELECT COUNT(CASE WHEN ssid <> '' AND ssid IS NOT NULL THEN 1 END) AS count, ssid \n FROM wifi\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter().\"\n GROUP BY ssid\n ORDER BY count DESC\";\n \n foreach ($this->query($sql) as $obj) {\n if (\"$obj->count\" !== \"0\") {\n $obj->ssid = $obj->ssid ? $obj->ssid : 'Unknown';\n $out[] = $obj;\n }\n }\n \n return $out;\n }" ]
[ "0.78085506", "0.7778569", "0.7701551", "0.76748836", "0.7319537", "0.6873914", "0.6843829", "0.6622548", "0.64519954", "0.6382405", "0.6335826", "0.6311104", "0.6277313", "0.62575454", "0.62363994", "0.6200874", "0.6153595", "0.6099858", "0.6035701", "0.6005851", "0.59477526", "0.59379256", "0.5895047", "0.58945376", "0.5851114", "0.58465314", "0.5832988", "0.58085364", "0.573232", "0.57261693", "0.5696719", "0.5635643", "0.5585287", "0.5585287", "0.5581475", "0.55587506", "0.5525411", "0.5524448", "0.5516474", "0.5516474", "0.5502634", "0.54975784", "0.54944044", "0.54734856", "0.54659885", "0.5443529", "0.5434736", "0.54244906", "0.5406287", "0.5402768", "0.5375236", "0.5359516", "0.5354386", "0.5348099", "0.5329025", "0.53194094", "0.53156143", "0.53018105", "0.52886605", "0.5268196", "0.5236975", "0.52337545", "0.52295035", "0.5223078", "0.52164197", "0.5212319", "0.52014506", "0.5190877", "0.5190441", "0.5184663", "0.51842904", "0.51824266", "0.5174197", "0.517203", "0.516495", "0.51640046", "0.5163679", "0.51540166", "0.5144667", "0.51354027", "0.51275116", "0.5120447", "0.5120125", "0.5110546", "0.51088786", "0.51055276", "0.51043785", "0.5098479", "0.50952363", "0.50942206", "0.5078269", "0.5078062", "0.5077721", "0.5074285", "0.5064556", "0.50496286", "0.5037026", "0.50217044", "0.5019356", "0.501572" ]
0.7887625
0
Run the database seeds.
public function run() { $users_role = [ ['role_name' => 'Super Admin', 'role_type' => 'superadmin'], ['role_name' => 'Admin', 'role_type' => 'admin'], ['role_name' => 'Editor', 'role_type' => 'editor'], ['role_name' => 'Author', 'role_type' => 'author'], ['role_name' => 'Blogger', 'role_type' => 'blogger'], ]; foreach($users_role as $role){ DB::table('user_roles')->insert([ 'role' => $role ]); } }
{ "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
Returns an array to be used by `json_encode` to serialize objects of this class.
public function jsonSerialize(): array { return [ 'sys' => $this->sys, 'name' => $this->name, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function jsonSerialize(): array\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n if (method_exists($this, 'toArray')) {\n return $this->toArray();\n }\n\n return [];\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return $this->toArray();\n }", "function jsonSerialize() {\n return $this->asArray();\n }", "function jsonSerialize()\n {\n return $this->to_array();\n }", "function jsonSerialize()\r\n {\r\n return $this->to_array();\r\n }", "public function jsonSerialize() : array\n {\n return $this->all();\n }", "public function jsonSerialize()\n {\n return array_merge(parent::jsonSerialize(),[]);\n }", "public function jsonSerialize()\n {\n return array_map(function ($value) {\n if ($value instanceof JsonSerializable) {\n return $value->jsonSerialize();\n } elseif ($value instanceof static) {\n return $value->toArray();\n }\n\n return $value;\n }, $this->toArray());\n }", "public function jsonSerialize() {\n\t\treturn $this->toArray();\n\t}", "public function jsonSerialize()\r\n {\r\n return array_merge(parent::jsonSerialize(), []);\r\n }", "public function jsonSerialize() {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return array_map(function ($value) {\n if ($value instanceof JsonSerializable) {\n return $value->jsonSerialize();\n } elseif ($value instanceof Arrayable) {\n return $value->toArray();\n }\n \n return $value;\n }, $this->all());\n }", "public function jsonSerialize()\n {\n return [\n self::CLASS_INDEX => $this->class,\n self::CONSTRUCTOR_ARGUMNETS_INDEX => $this->constructorArguments,\n self::PROPERTIES_INDEX => $this->properties,\n ];\n }", "final public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return array_map(function ($value) {\n if ($value instanceof JsonSerializable) {\n return $value->jsonSerialize();\n }\n\n return $value;\n }, $this->store);\n }", "public function jsonSerialize()\r\n {\r\n return $this->toArray();\r\n }", "public function jsonSerialize(): array\n {\n return $this->all();\n }", "function jsonSerialize()\n {\n return $this->toArray();\n }", "function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n // TODO: Implement jsonSerialize() method.\n return $this->toArray();\n }", "public function jsonSerialize(): array;", "public function jsonSerialize() : array {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $this->getId(),\n\t\t\t\t\t'cep' => $this->getCep(),\n\t\t\t\t\t'bairro' => $this->getBairro(),\n\t\t\t\t\t'cidade' => $this->getCidade(),\n\t\t\t\t\t'rua' => $this->getRua(),\n\t\t\t\t\t'estado' => $this->getEstado(),\n\t\t\t\t];\n\t\t\t}", "public function asJson()\n {\n return array();\n }", "public function jsonSerialize() : array\n {\n return $this->entries;\n }", "public function toArray()\n {\n return json_decode(json_encode($this), true);\n }", "public function toArray()\n {\n return json_decode(json_encode($this), true);\n }", "public function __serialize(): array\n {\n $array = $this->jsonSerialize();\n array_walk_recursive($array, function (&$item, $key): void {\n if ($item instanceof SimpleXMLElement) {\n $item = json_decode((string)json_encode((array)$item), true);\n }\n });\n\n /** @var array */\n return $array;\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n\t{\n\n\t\treturn get_object_vars($this);\n\n\t}", "public function toArray() {\n return json_decode(json_encode($this), true);\n }", "public function jsonSerialize()\n {\n $json = array();\n foreach($this as $key => $value) {\n $json[$key] = $value;\n }\n return $json; // or json_encode($json)\n }", "public function jsonSerialize(): array\n {\n $data = ['name' => $this->name()];\n\n if (! is_null($id = $this->id())) {\n $data['id'] = $id;\n }\n\n return $data;\n }", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize(): array\n {\n return $this->values;\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize(): mixed {\n\t\t\treturn $this->toArray();\n\t\t}", "public function jsonSerialize(): array\n {\n return [\n 'tags' => $this->tags,\n 'duration' => $this->duration,\n 'mimeType' => $this->mimeType,\n ];\n }", "public function jsonSerialize()\r\n {\r\n return get_object_vars($this);\r\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public final function __toArray()\n {\n $data = array();\n \n $all_fields = $this->__get_fields();\n \n foreach ($all_fields as $key => $value)\n {\n $data[$key] = $value;\n }\n \n $data[self::CLASS_FIELD_KEY] = $this->__getRawClassName();\n \n return $data;\n }", "public function jsonSerialize(): mixed\n {\n return $this->toArray();\n }", "public function jsonSerialize(): mixed\n {\n return $this->toArray();\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "function jsonSerialize()\n {\n return get_object_vars($this);\n // TODO: Implement jsonSerialize() method.\n }", "public function jsonSerialize():array\n {\n $rv = [\n 'name' => $this->name,\n 'price' => $this->price,\n 'sidelength' => $this->sidelength,\n 'area' => $this->getArea(),\n 'specials' => $this->specials\n\n ];\n return $rv;\n }", "public function jsonSerialize() {\n\t\treturn(get_object_vars($this));\n\t}", "public function jsonSerialize(): array\n {\n return [\n 'id' => $this->getId(),\n 'firstname' => $this->getFirstName(),\n 'surname'=> $this->getSurname()\n ];\n }", "public function jsonSerialize() :Array\n {\n return [\n 'questionId' => $this->questionId(),\n 'user' => $this->user,\n 'title' => $this->title,\n 'body' =>$this->body,\n 'tag' => $this->tags,\n 'datePublished'=>$this->datePublished\n ];\n }", "public function toArray()\n\t{\n\t\t$string = array();\n\t foreach (get_class_vars(get_class($this)) as $name => $value) \n\t {\n\t \t$string[$name] = $value;\n\t }\n\t return $string;\n\t}", "public function toArray()\n {\n return array_values(\n array_filter(\n $this->jsonSerialize()\n )\n );\n }", "public function jsonSerialize()\n {\n return [\n 'fields' => $this->fields,\n 'entries' => $this->entries\n ];\n }", "public function serialize(): array\n {\n return [\n 'className' => get_class($this),\n 'id' => $this->id,\n 'backendId' => $this->backendId,\n 'queue' => $this->queue,\n 'arguments' => serialize(new ArrayObject($this->arguments)),\n 'attempts' => $this->attempts,\n 'enqueued' => $this->enqueued,\n 'serialized' => date('Y-m-d H:i:s'),\n ];\n }", "public function jsonSerialize()\n {\n return [\n 'id' => $this->getId(),\n 'done' => $this->getDone(),\n 'title' => $this->getTitle(),\n 'author' => $this->getAuthor()->getId(),\n ];\n }", "public function jsonSerialize(): array\n {\n return array(\n 'id' => $this->id,\n 'username' => utf8_encode($this->username),\n 'email' => utf8_encode($this->email),\n 'enabled' => $this->enabled,\n 'admin' => $this->isAdmin\n );\n }", "public function __toArray()\n {\n return $this->toArray();\n }", "public function jsonSerialize(): array\n {\n return array_merge(parent::jsonSerialize(), [\n 'cropable' => $this->cropable,\n 'ratio' => $this->ratio,\n 'size' => $this->size,\n ]);\n }", "public function json_serialize() {\n\t\t$items = $this->to_array();\n\n\t\tforeach ( $items as $key => $value ) {\n\t\t\tif ( $value instanceof Jsonable ) {\n\t\t\t\t$items[$key] = $value->json_serialize();\n\t\t\t}\n\t\t}\n\n\t\treturn $items;\n\t}", "public function jsonSerialize()\n\t{\n\t\treturn array(\n\t\t\t'count' => $this->count, \n\t\t\t'objects' => $this->tableObjects\n\t\t\t);\n }", "public function jsonSerialize()\n {\n $json = array();\n foreach ($this as $key => $value) {\n if ($value) {\n $json[$key] = $value;\n }\n }\n return $json;\n }", "public function toArray(): array\r\n {\r\n return get_object_vars($this);\r\n }", "public function jsonSerialize(): array\n {\n return array_merge(parent::jsonSerialize(), [\n 'multiple' => $this->multiple,\n ]);\n }", "public function __toArray(): array\n {\n return call_user_func('get_object_vars', $this);\n }", "function jsonSerialize()\n\t{\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'metadata' => $this->getMetadata()\n\t\t];\n\t}" ]
[ "0.8408555", "0.84072495", "0.8337336", "0.8337336", "0.8337336", "0.8337336", "0.8337336", "0.8285617", "0.82463217", "0.8210737", "0.81828326", "0.8127949", "0.8118406", "0.8109143", "0.81060106", "0.8075153", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.8056973", "0.80547947", "0.8037746", "0.8029899", "0.80239326", "0.80214614", "0.79936016", "0.79932815", "0.79932815", "0.79686075", "0.7941047", "0.789789", "0.7860768", "0.7830274", "0.78294235", "0.78294235", "0.78215194", "0.77910185", "0.7768247", "0.7762385", "0.7761405", "0.7759099", "0.7755134", "0.7755134", "0.7752521", "0.7752521", "0.7752521", "0.7752521", "0.7752521", "0.7752521", "0.77289796", "0.77209157", "0.77209157", "0.77102387", "0.7706872", "0.77027947", "0.76973087", "0.76973087", "0.76973087", "0.76924044", "0.7688102", "0.7688102", "0.7676105", "0.7666413", "0.76625866", "0.7641449", "0.7628553", "0.7623405", "0.7612296", "0.7603957", "0.75930595", "0.7589795", "0.7586243", "0.7569466", "0.7564824", "0.7563662", "0.7559983", "0.75585854", "0.75376004", "0.753739", "0.75361836", "0.750272", "0.7498625" ]
0.7660073
82
Enqueue Scripts and CSS Files
function enqueueFiles() { wp_enqueue_style('style', get_stylesheet_uri(), array(), '1.22'); wp_enqueue_script('script', get_template_directory_uri() . '/assets/js/custom.js', array(), '1.22'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}", "function enqueue_scripts() {\n\t\tinclude $this->dir_path . 'scripts.php';\n\t}", "public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }", "public function enqueueScripts(){}", "public function enqueue_scripts() {\n wp_enqueue_style( $this->name, plugins_url( '/assets/css/admin.css', IMFILE ), '', $this->version, 'all' );\n \n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( $this->name, plugins_url( '/assets/js/admin.js', IMFILE ), array( 'jquery' ), $this->version, true );\n }", "public function enqueueScripts()\n {\n wp_enqueue_style('gfbitpay-admin', $this->plugin->urlBase . 'style-admin.css', false, GFBITPAY_PLUGIN_VERSION);\n }", "public function enqueueAssets()\n {\n wp_enqueue_style( WPADW_DOMAIN . '-admin-style', WPADW_URL . '/assets/style.css' );\n }", "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'pt-style', plugins_url( 'assets/css/style.css', __FILE__ ), array(), '1.0.0', false );\n\n\t\twp_enqueue_script( 'pt-script', plugins_url( 'assets/js/script.js', __FILE__ ), array(), '1.0.0', true );\n\t}", "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "function assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}", "public function action_wp_enqueue_scripts() {\n\n\t\twp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/lib/bootstrap/dist/css/bootstrap.css' );\n\t\twp_enqueue_style( 'core-style', get_stylesheet_directory_uri() . '/assets/stylesheets/core.css' );\n\n\t}", "public function enqueue_scripts() {\n\n\t\twp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' );\n\n\t}", "public function enqueue_scripts() {\r\n\r\n\t\t}", "function enqueue() {\n\n\t$js_path = trailingslashit( get_template_directory() ) . 'assets/js/main.min.js';\n\t$css_path = trailingslashit( get_template_directory() ) . 'assets/css/main.min.css';\n\t$req_path = trailingslashit( get_template_directory() ) . 'assets/js/vendor.min.js';\n\n\twp_enqueue_script(\n\n\t\t'req_js',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/js/vendor.min.js',\n\t\tfalse,\n\t\tfilemtime($req_path),\n\t\ttrue\n\n\t);\n\n\twp_enqueue_script(\n\n\t\t'main_js',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/js/main.min.js',\n\t\tfalse,\n\t\tfilemtime($js_path),\n\t\ttrue\n\n\t);\n\n\twp_enqueue_style(\n\n\t\t'main_css',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/css/main.min.css',\n\t\tfalse,\n\t\tfilemtime($css_path),\n\t\t'all'\n\n\t);\n\n}", "public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }", "public function wp_enqueue_scripts() {\n wp_enqueue_style('normalize', get_template_directory_uri() .\n '/normalize.css', array(), '8.0.1');\n wp_enqueue_style('theme-css', get_stylesheet_uri(),\n array(), '1.0');\n wp_enqueue_script('jquery');\n }", "public function enqueue()\n {\n foreach ($this->assets as $name => $asset) {\n if (preg_match('/\\.js$/', $asset)) {\n wp_enqueue_script($name, $this->assetsUrl . $asset, [], false, true);\n }\n if (preg_match('/\\.css$/', $asset)) {\n wp_enqueue_style($name, $this->assetsUrl . $asset);\n }\n }\n }", "public function enqueue_scripts() {\n\t\t// wp_enqueue_style( 'simple-grams', plugins_url( '/assets/css/simple-grams.css', __FILE__ ) );\n\t}", "public function enqueue_scripts() {\n\n\t}", "public function scripts(){\n //Enqueue scripts\n /**\n * wp_enqueue_script('sample-script',$this->directory_uri . '/sample.min.js',array('jquery'),false,false);\n * ...\n * ....\n */\n }", "public function enqueue_assets() {\n\t\twp_enqueue_script( 'satispress-admin' );\n\t\twp_enqueue_style( 'satispress-admin' );\n\t}", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "public function enqueue_front_end_scripts() {}", "function berry_scripts() {\n\n\twp_dequeue_style( 'seed-style');\n\twp_enqueue_style( 'berry-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'berry-main', get_stylesheet_directory_uri() . '/js/main.js', array(), '2016-1', true );\n\n}", "public function enqueue_scripts() {\n\n\t\tif ($this->js) {\n\t\t\tforeach ($this->js as $js) {\n\t\t\t\t$fileTitle = basename($js['link']);\n\t\t\t\t$fileTitle = str_replace('.js', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $js['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_script($fileTitle, $js['link'], array(), $js['version']);\n\t\t\t}\n\t\t}\n\t}", "function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_files ()\n\t{\n\t\t// Flowdrive\n\t\twp_register_style( 'flowdrive_admin_css', plugin_dir_url( __DIR__ ) . 'assets/css/flowdrive-admin.css', false, $this->version );\n\t\twp_enqueue_style( 'flowdrive_admin_css' );\n\t\t\n\t\t// wp_enqueue_script( $this, plugin_dir_url( __FILE__ ) . 'js/cloudoki-smmp-admin.js', array( 'jquery' ), $this->version, false );\n\t\t\n\t\t// Chosen\n\t\twp_register_style( 'chosen_admin_css', plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/css/chosen.min.css', false, $this->version );\n\t\twp_enqueue_style( 'chosen_admin_css' );\n\t\t\n\t\twp_register_script( 'chosen_admin_js', plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/js/chosen.jquery.min.js', ['jquery'], $this->version );\n\t\twp_enqueue_script( 'chosen_admin_js' );\n\t\t\n\t\t// wp_enqueue_script( $this, plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/js/chosen.jquery.min.js', array( 'jquery' ), $this->version, false );\n\t}", "public function adminThemeStylesAndScripts()\n {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.admin.min.css', array());\n wp_enqueue_style('my-admin-theme', get_template_directory_uri() . '/includes/snv/Theme/admin/style.css');\n wp_enqueue_script('my-admin-script', get_template_directory_uri() . '/includes/snv/Theme/admin/script.js', array('jquery'), '1.0', true);\n\n // for the contactonfo page\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_enqueue_style('thickbox');\n }", "function innelyz_scripts() {\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '3.3.7', false);\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap.css', array(), false, 'all' );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lora|Pacifico|Roboto');\n wp_enqueue_style( 'innelyz-style', get_stylesheet_uri() );\n }", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array('jquery'), BRAND_VER );\n\t\t\twp_enqueue_style('jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css');\n\t\t\twp_enqueue_style('jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css');\n\n\t\t}", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function enqueue_scripts(){\n\t\t\t// Add the color picker JS & CSS files\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t}", "function krypton_scripts() {\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n\twp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css' );\n\t//wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.js');\n}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue_scripts() {\n\t\t/**\n\t\t * Filters the path to the admin JS script.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $path The path to the admin JS script.\n\t\t */\n\t\t$script_path = apply_filters( 'stellarwp/telemetry/' . Config::get_hook_prefix() . 'script_path', $this->get_asset_path() . 'resources/js/scripts.js' );\n\n\t\twp_enqueue_script(\n\t\t\tself::SCRIPT_HANDLE,\n\t\t\t$script_path,\n\t\t\t[ 'jquery' ],\n\t\t\tself::SCRIPT_VERSION,\n\t\t\ttrue\n\t\t);\n\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "function wpstarter_scripts() {\n\n\t// Set a dynamic version for cache busting\n\t$theme = wp_get_theme();\n\t$version = $theme['Version'];\n\n\twp_enqueue_style( 'wpstarter-style', get_template_directory_uri() . '/dist/css/main.css' );\n\n\twp_enqueue_script( 'wpstarter-vendorjs', get_template_directory_uri() . '/dist/js/vendor.min.js', array(), $version, true );\n\n wp_enqueue_script( 'wpstarter-customjs', get_template_directory_uri() . '/dist/js/main.js', array(), $version, true );\n\n}", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "function theme_scripts() {\n\t\twp_enqueue_style('bootstrap-css', get_template_directory_uri().'/styles/bootstrap/css/bootstrap.min.css');\n\t\twp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\t\twp_enqueue_script('bootstrap-js', get_template_directory_uri().'/styles/bootstrap/js/bootstrap.min.js');\n\t\twp_enqueue_script('custom-js', get_template_directory_uri().'/js/functions.js');\n\t}", "function enqueue_vpr_assets() {\n\n\t\t// Enqueue Theme Scripts\n \t\twp_deregister_script( 'jquery' );\n \twp_register_script( 'jquery', includes_url( '/js/jquery/jquery.js' ), false, NULL, true );\n \twp_enqueue_script( 'jquery' );\n\n\n\t\t// Enqueue Theme Scripts\n\n\t\twp_enqueue_script( 'Scripts', get_template_directory_uri() . '/app/scripts/script.min.js', null, '1.0.0', true );\n\n\t\t// Enqueue Theme Styles\n\n\t\twp_enqueue_style( 'Style', get_template_directory_uri() . '/app/style/style.min.css', null, '1.0.0' );\n\n\t}", "function aurum_wp_enqueue_scripts() {\n\t// Styles\n\t$rtl_include = '';\n\n\twp_enqueue_style( 'icons-entypo' );\n\twp_enqueue_style( 'icons-fontawesome' );\n\twp_enqueue_style( 'bootstrap' );\n\twp_enqueue_style( 'aurum-main' );\n\t\n\tif ( ! is_child_theme() ) {\n\t\twp_enqueue_style( 'style' );\n\t}\n\n\t// Right to left bootstrap\n\tif ( is_rtl() ) {\n\t\twp_enqueue_style( array( 'bootstrap-rtl' ) );\n\t}\t\n\n\t// Custom Skin\n\tif ( get_data( 'use_custom_skin' ) ) {\n\t\tif ( false == apply_filters( 'aurum_use_filebased_custom_skin', aurum_use_filebased_custom_skin() ) ) {\n\t\t\twp_enqueue_style( 'custom-skin', site_url( '?custom-skin=1' ), null, null );\n\t\t}\n\t}\n\n\t// Scripts\n\twp_enqueue_script( array( 'jquery', 'bootstrap', 'tweenmax' ) );\n}", "function cam_enqueue_related_pages_scripts_and_styles(){\n // wp_enqueue_style('related-styles', plugins_url('/css/bootstrap.min.css', __FILE__));\n wp_enqueue_script('releated-script', plugins_url( '/js/custom.js' , __FILE__ ), array('jquery','jquery-ui-droppable','jquery-ui-draggable', 'jquery-ui-sortable'));\n }", "public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fastnetmarketing-admin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "public function enqueue_scripts() {\n\t\tif ( is_singular() ) wp_enqueue_script( 'comment-reply' );\n\n\t\twp_enqueue_style( 'app', get_template_directory_uri().'/assets/css/app.css', false, '1.0.0', 'all' );\n\t\twp_enqueue_script( 'foundation-modernizr', get_template_directory_uri().'/bower_components/foundation/js/vendor/modernizr.js', false, '', false );\n\t\twp_enqueue_script( 'foundation-fastclick', get_template_directory_uri().'/bower_components/foundation/js/vendor/fastclick.js', false, '', true );\n\t\twp_enqueue_script( 'foundation', get_template_directory_uri().'/bower_components/foundation/js/foundation.min.js', array('jquery'), '', true );\n\t\twp_enqueue_script( 'main', get_template_directory_uri().'/assets/js/main.js', array('jquery', 'foundation'), '1.0.0', true );\n\t}", "function wpdocs_theme_name_scripts() {\n wp_enqueue_style('pva-style', get_stylesheet_uri());\n wp_enqueue_style('pva-bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(), '1.0.0', 'all');\n wp_enqueue_script('pva-script', get_template_directory_uri() . '/js/sitescript.js', array(), '1.0.0', true);\n}", "public function admin_enqueue_scripts()\n\t\t{\n\t\t\tglobal $pagenow; \n\t\t\tif (is_admin() || $pagenow === 'wc_prd_vendor') { \n\t\t\t\twp_register_script( 'bootstrap-tooltip', $this->assets_url . 'js/bootstrap-tooltip.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'select2', $this->assets_url . 'js/select2/select2.min.js', array( 'jquery' ), '3.5.2' );\n\t\t\t\twp_register_script( 'topgroupshops-media', $this->assets_url . 'js/topgroupshops-media.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'sf-scripts', $this->assets_url . 'js/sf-jquery.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_style( 'select2', $this->assets_url . 'js/select2/select2.css' );\n\t\t\t\twp_register_style( 'sf-styles', $this->assets_url . 'css/sf-styles.css' );\n\t\t\t}\n\t\t}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/deeppress-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }", "function awesome_script_enqueue() {\r\n\t//css\r\n\twp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.4', 'all');\r\n\twp_enqueue_style('customstyle', get_template_directory_uri() . '/css/katayam.css', array(), '1.0.0', 'all');\r\n\t//js\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('bootstrapjs', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '3.3.4', true);\r\n\twp_enqueue_script('customjs', get_template_directory_uri() . '/js/katayam.js', array(), '1.0.0', true);\r\n\t\r\n}", "public function admin_scripts() {\n\t\twp_enqueue_style( 'wpex-font-awesome', WPEX_CSS_DIR_URI .'font-awesome.min.css' );\n\t}", "protected function enqueue_scripts()\n {\n\n }", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->andmoraho_vendors, plugin_dir_url(__FILE__) . 'js/andmoraho-vendors-admin.js', array( 'jquery' ), $this->version, false);\n }", "function startertheme_enqueue_files() {\n wp_enqueue_script('startertheme_scripts', get_theme_file_uri('/assets/dist/js/frontend/app.js'), NULL, '1.0', true);\n wp_enqueue_style('startertheme_style', get_theme_file_uri('/assets/dist/css/style.css'), NULL, '1.0');\n}", "protected function addAssets(): void\n {\n $this->enqueue('assets/dashifen-2022.js');\n $font1 = $this->enqueue('//fonts.googleapis.com/css2?family=El+Messiri&display=swap');\n $font2 = $this->enqueue('//fonts.googleapis.com/css2?family=Roboto&display=swap');\n $css = $this->enqueue('assets/dashifen-2022.css', [$font1, $font2]);\n \n $dir = trailingslashit($this->getStylesheetDir());\n if (file_exists($dir . 'assets/dashifen-2022-components.css')) {\n $this->enqueue('assets/dashifen-2022-components.css', [$css]);\n }\n }", "function theme_scripts() {\n wp_enqueue_style('main', CSS . '/main.css');\n wp_enqueue_style('my', CSS . '/my.css');\n wp_enqueue_script('scripts', JS . '/main.js', array('jquery'), null, true);\n }", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "function theme_files() {\n \n wp_register_style('style', get_template_directory_uri() . '/dist/app.css', [], 1, 'all');\n wp_enqueue_style('style');\n\n wp_enqueue_script('jquery');\n\n wp_register_script('app', get_template_directory_uri() . '/dist/app.js', ['jquery'], 1, true);\n wp_enqueue_script('app');\n}", "public function admin_enqueue_scripts()\n\t{\n\t\twp_register_style( 'go-git', plugins_url( 'components/css/go-git.css', __DIR__ ), array(), 1 );\n\t\twp_enqueue_style( 'go-git' );\n\t}", "public function enqueue_assets()\n\t{\n\t\twp_enqueue_script( 'automatic-link-title', plugins_url( '/script.js', __FILE__ ), array(), false, true );\n\t}", "public function enqueue_scripts()\n {\n }", "public function admin_print_scripts()\n\t\t{\n\t\t\tglobal $wp_version;\n\n\t\t\t//Check wp version and load appropriate scripts for colorpicker.\n\t\t\tif ( 3.5 <= $wp_version ) {\n\t\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t\t} else {\n\t\t\t\twp_enqueue_style( 'farbtastic' );\n\t\t\t\twp_enqueue_script( 'farbtastic' );\n\t\t\t}\n\n\t\t\twp_enqueue_script( 'bootstrap-tooltip' );\n\t\t\twp_enqueue_script( 'select2' );\n\t\t\twp_enqueue_script( 'topgroupshops-media' );\n\t\t\twp_enqueue_script( 'sf-scripts' );\n\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_style( 'select2' );\n\t\t\twp_enqueue_style( 'sf-styles' );\n\t\t}", "function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}", "public function theme_assets_handler() {\n\t\t\n\t\t$version = wp_get_theme()->get('Version');\n\n\t\t//Enqueue stylesheets\n\t\tforeach ($this->styles as $style) {\n\t\t\twp_register_style($this->prefix . $style['slug'], get_template_directory_uri() . $style['path'], $style['deps'], $version);\n\t\t\twp_enqueue_style($this->prefix . $style['slug']);\n\n\n\n\t\t}\n\t\t\n\t\t//Enqueue Scripts\n\t\tforeach ($this->scripts as $script) {\n\t\t\twp_register_script($this->prefix . $script['slug'], get_template_directory_uri() . $script['path'], $script['deps'], $version);\n\t\t\twp_enqueue_script($this->prefix . $script['slug']);\n\t\t}\n\t\t\n\t\t//Enqueue WP Scripts\n\t\tif(is_array($this->wp_scripts)){\n\t\t\t\n\t\t\tforeach ($this->wp_scripts as $script) {\n\t\t\t\twp_enqueue_script($script);\n\t\t\t}\n\t\t}\n\t}", "function add_theme_scripts() {\n wp_enqueue_style( 'main_style_file', get_stylesheet_uri());\n /********** Including all.min css file ***********/\n wp_enqueue_style( 'minified_file', get_template_directory_uri() .'/css/all.min.css', array(), '1.1', 'all');\n /********** Including style css file ***********/\n wp_enqueue_style( 'style', get_template_directory_uri() .'/css/style.css', array(), '1.1', 'all');\n /********* Including bootstrap file ************/ \n wp_enqueue_style( 'bootstrap_file', get_template_directory_uri() .'/css/bootstrap.min.css', array (),'1.1', 'all'); \n //********* Including script files ************/\n wp_enqueue_script( $handle, get_template_directory_uri().'/js/bootstrap.min.js', array(), '1.1' , true ); \n}", "function mk_resources() {\t\t\n\twp_enqueue_style('style', get_stylesheet_uri());\n\twp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery-3.1.1.min.js', array(), '20120206', true );\n\twp_enqueue_script( 'custom-script', get_template_directory_uri() . '/js/script.js', array( 'jquery'), '1.1', true );\n}", "function assets() {\n\t\tif ( ! is_admin() ) {\n\t\t\twp_enqueue_style( '_yourthemename-style', get_theme_file_uri( '/dist/css/bundle.css' ), array(), _YOURTHEMENAME_VER );\n\n\t\t\twp_deregister_script( 'jquery' );\n\t\t\twp_enqueue_script( '_yourthemename-scripts', get_theme_file_uri( '/dist/js/bundle.min.js' ), array(), _YOURTHEMENAME_VER, true );\n\t\t}\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( 'slick-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/slick.min.js', array( 'jquery' ), '1.8.1', false );\n\t\twp_enqueue_script( 'index-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/index.js', array( 'jquery', 'slick-js' ), '1.0.0', true );\n\t}", "function enqueue_scripts() {\n\n wp_register_style( 'dg-text-css', plugins_url('css/dg-text.css', __FILE__), null, '1', 'all' );\n wp_enqueue_style( 'dg-text-css' );\n }", "function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}", "private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}", "function autodidact_script_enqueue() {\n wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/auto.css', array(), '1.0.0', 'all');\n wp_enqueue_script('customjs', get_template_directory_uri() . '/js/auto.js', array(), '1.0.0', true);\n}", "public function enqueue_assets()\n {\n $style_path = '/assets/css/block.style.css';\n wp_enqueue_style(\n $this->namespace . '-block',\n _get_plugin_url() . $style_path,\n null,\n filemtime( _get_plugin_directory() . $style_path )\n );\n }", "function grd_scripts() {\n\twp_enqueue_style( 'main-style', get_stylesheet_uri() );\n\tif( !is_admin() ) {\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/bower_components/modernizr/modernizr.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'plugins', get_template_directory_uri() . '/assets/scripts/plugins.min.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/assets/scripts/main.min.js', array('jquery'), NULL, true );\n\t\tif( DEV ) {\n\t\t\twp_enqueue_script( 'livereload', '//localhost:35729/livereload.js', NULL, NULL, true);\n\t\t}\n\t}\n}", "final public function wp_enqueue_scripts()\n {\n // Bypass\n if (!self::tFyAppConfig('enqueue_scripts')) {\n return;\n }\n\n if (self::tFyAppConfig('modal')) :\n wp_enqueue_style('tiFyComponentsPdfViewerModal');\n wp_enqueue_script('tiFyComponentsPdfViewerModal');\n else :\n wp_enqueue_style('tiFyComponentsPdfViewer');\n wp_enqueue_script('tiFyComponentsPdfViewer');\n endif;\n }", "public function enqueue_scripts() {\n\n /**\n * All styles goes here\n */\n wp_enqueue_style( 'wp-allmeta-styles', plugins_url( 'css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n\n /**\n * All scripts goes here\n */\n wp_enqueue_script( 'wp-allmeta-scripts', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery' ), false, true );\n\n\n /**\n * Example for setting up text strings from Javascript files for localization\n *\n * Uncomment line below and replace with proper localization variables.\n */\n // $translation_array = array( 'some_string' => __( 'Some string to translate', 'baseplugin' ), 'a_value' => '10' );\n // wp_localize_script( 'base-plugin-scripts', 'baseplugin', $translation_array ) );\n\n }", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/drinkers-edition-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "public function myScripts()\n {\n //wp_register_script('angularjs',plugins_url('bower_components/angular/angular.min.js', __FILE__));\n wp_enqueue_style('grimagecss', plugins_url('style.css', __FILE__));\n //wp_enqueue_script('grimagescripts',plugins_url('/app.js',__FILE__));\n }", "public function wp_enqueue_scripts() {\n\t\t// Javascript default arguments\n\t\t$js_defaults = array( 'dependencies' => array(), 'version' => $this->version, 'load_in_footer' => true );\n\n\t\tforeach ( $this->enabled_scripts as $name => $args ) {\n\n\t\t\t$args = array_merge( $js_defaults, $args );\n\t\t\twp_register_script( \n\t\t\t\t$name, \n\t\t\t\tsprintf( \"%s/js/%s\", $this->plugin_dir_url, $args['file'] ), \n\t\t\t\t$args['dependencies'], \n\t\t\t\t$args['version'], \n\t\t\t\t$args['load_in_footer'] \n\t\t\t);\n\t\t\twp_enqueue_script( $name );\n\t\t}\t\n\n\t\t// CSS default arguments\n\t\t$css_defaults = array( 'dependencies' => array(), 'version' => $this->version, 'media' => 'all' );\n\n\t\tforeach ( $this->enabled_stylesheets as $name => $args ) {\n\n\t\t\t$args = array_merge( $css_defaults, $args );\n\t\t\twp_register_style( \n\t\t\t\t$name, \n\t\t\t\tsprintf( \"%s/css/%s\", $this->plugin_dir_url, $args['file'] ), \n\t\t\t\t$args['dependencies'], \n\t\t\t\t$args['version'], \n\t\t\t\t$args['media'] \n\t\t\t);\n\t\t\twp_enqueue_style( $name );\n\t\t}\t\n\t}", "function mgr_add_scripts(){\n wp_enqueue_style('mgr-main-style',plugins_url().'/includes/my-github-repos/css/style.css');\n wp_enqueue_script('mgr-main-script',plugins_url().'/includes/my-github-repos/js/main.js');\n}", "public function load_assets() {\n\t\t\t// get_template_directory_uri() . '/assets/js/scripts-bundled.js',\n\n\t\tif ( strstr( $_SERVER['SERVER_NAME'], 'one.wordpress.test' ) ) {\n\t\t\twp_enqueue_script(\n\t\t\t\t'university-javascript',\n\t\t\t\t'http://localhost:3000/bundled.js',\n\t\t\t\tnull,\n\t\t\t\t1,\n\t\t\t\ttrue\n\t\t\t);\n\t\t} else {\n\t\t\twp_enqueue_script(\n\t\t\t\t'university-vendor-js',\n\t\t\t\tget_theme_file_uri( '/bundled-assets/vendors~scripts.8c97d901916ad616a264.js' ),\n\t\t\t\tnull,\n\t\t\t\t1,\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_enqueue_script(\n\t\t\t\t'university-script-js',\n\t\t\t\tget_theme_file_uri( ' / bundled - assets / scripts.9407ba0c9e80d0b7c41d.js' ),\n\t\t\t\tnull,\n\t\t\t\t1,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'main-style',\n\t\t\t\tget_theme_file_uri( ' / bundled - assets / styles.9407ba0c9e80d0b7c41d.css' ),\n\t\t\t\tnull,\n\t\t\t\t1,\n\t\t\t\tfalse\n\t\t\t);\n\t\t}\n\n\t\twp_enqueue_style(\n\t\t\t'font-awesome-style',\n\t\t\t'//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',\n\t\t\tarray(),\n\t\t\t'4.7.0',\n\t\t\tfalse\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'roboto-font-style',\n\t\t\t'//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i',\n\t\t\tarray(),\n\t\t\t'1.0.0',\n\t\t\tfalse\n\t\t);\n\n\t}", "function theme_assets() {\n\t// load css\n\twp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/css/fontawesome.css' );\n\twp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css' );\n\twp_enqueue_style( 'style-css', get_template_directory_uri() . '/style.css', false, time() );\n\n\t// load javascript\n\twp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '', true );\n wp_enqueue_script( 'waterfall-js', get_template_directory_uri() . '/js/waterfall.js', array(), '', true );\n\twp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', array(), '', true);\n}", "public static function action_admin_enqueue_scripts() {\n wp_register_style( 'jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css' );\n wp_enqueue_style( 'jquery-ui' );\n wp_register_style( 'chosen', plugins_url( 'stashbox/css/chosen.css' ) );\n wp_enqueue_style( 'chosen' );\n wp_register_script( 'chosen', plugins_url( 'stashbox/js/chosen.jquery.min.js' ), array( 'jquery' ), '1.0' );\n wp_enqueue_script( 'chosen' );\n wp_register_script( 'jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js' );\n wp_enqueue_script( 'jquery-ui' );\n wp_register_script( 'stashbox-domain', plugins_url( 'stashbox/js/stashbox.domain.js' ), array( 'jquery', 'jquery-ui', 'chosen' ), '1.0' );\n wp_enqueue_script( 'stashbox-domain' );\n }", "public function enqueue_styles_and_scripts() {\n wp_enqueue_style($this->plugin_slug . '-plugin-styles', plugins_url('h5p/h5p-php-library/styles/h5p.css'), array(), self::VERSION);\n }", "function queue_scripts() {\n\n if (!is_admin()) {\n\n // Deregister scripts.\n wp_deregister_script('jquery');\n\n\n // Scripts in header.\n wp_register_script('modernizr-js', get_stylesheet_directory_uri() . '/assets/js/vendor/modernizr-2.7.1.min.js', array(), '2.7.1', false);\n\n\n // Scripts in footer.\n wp_register_script('jquery', get_stylesheet_directory_uri() . '/assets/js/vendor/jquery-1.10.2.min.js', array(), '1.10.2', true);\n wp_register_script('main-js', get_stylesheet_directory_uri() . '/assets/js/main.min.js', array(), '', true);\n\n\n // Queue scripts.\n wp_enqueue_script('modernizr-js');\n // wp_enqueue_script('jquery');\n // wp_enqueue_script('main-js');\n\n }\n}", "function kinectiv_start_scripts() {\n\twp_enqueue_style('kinectiv-start-style', get_stylesheet_directory_uri() . '/style.min.css', array(), '0.1.0');\n//\twp_enqueue_style('kinectiv-start-vendor-style', get_stylesheet_directory_uri() . '/css/vendor.min.css', array(), '1.0.0');\n \n wp_deregister_script('wp-embed');\n wp_deregister_script('jquery');\n wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-3.6.2.min.js', array(), null, true);\n\twp_enqueue_script('kinectiv-start-script', get_template_directory_uri() . '/js/script.min.js', array('jquery'), '0.1.0', true);\n}", "function dw_schemas_add_assets() {\n\twp_enqueue_script('schemas-admin-js', '/wp-content/plugins/dw_schemas/assets/scripts.js');\n\twp_enqueue_style('schemas-admin-css', '/wp-content/plugins/dw_schemas/assets/styles.css');\n}", "function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}" ]
[ "0.82608676", "0.8150055", "0.8100823", "0.8067467", "0.806", "0.8048101", "0.79924625", "0.7987911", "0.7943542", "0.7933302", "0.79248744", "0.7889524", "0.78542596", "0.78514344", "0.7839154", "0.7817309", "0.7816526", "0.77853644", "0.7773356", "0.77624995", "0.77515423", "0.77512044", "0.77449477", "0.7742794", "0.77364767", "0.7736176", "0.77269703", "0.7701426", "0.77006555", "0.7699916", "0.76995414", "0.7696341", "0.76903135", "0.7688449", "0.76774055", "0.7673735", "0.76690984", "0.76657575", "0.7662261", "0.76503325", "0.7647865", "0.7646742", "0.7646742", "0.7646742", "0.7638855", "0.76325506", "0.76325506", "0.76265657", "0.7612342", "0.7610761", "0.7586462", "0.75802356", "0.75733125", "0.75710636", "0.7565786", "0.75645304", "0.75643545", "0.75632447", "0.7562495", "0.75617296", "0.75591886", "0.7555181", "0.7547335", "0.7547254", "0.75446385", "0.75432426", "0.75408196", "0.75376743", "0.7534377", "0.7529713", "0.75295955", "0.75279295", "0.75216436", "0.75168234", "0.75148124", "0.7513287", "0.75125176", "0.7510296", "0.75076556", "0.7507107", "0.7500365", "0.7497616", "0.7489315", "0.7485175", "0.7479509", "0.7475057", "0.7474392", "0.74724317", "0.7471628", "0.7470818", "0.74686503", "0.7464449", "0.7464038", "0.7463179", "0.74596876", "0.7455552", "0.74539", "0.7453883", "0.7452574", "0.74477565" ]
0.7650611
39
Get a free API key on this page:
public function __construct($key) { $this->key = $key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_api_key()\n{\n return get_global_value('api-key');\n}", "private function getApiKey()\n\t{\n\t\treturn Mage::helper('core')->decrypt(Mage::getStoreConfig('whitePages_configuration/options/api_key'));\n\t}", "function key(){\n\t\t$api_key = '42b85431eba6a84d17266021e817d2a6';\n\t\treturn $api_key;\n\t}", "public function getApiKey () {\n syslog( LOG_INFO, 'Get an api key \\n' );\n\n $url = '/api_key';\n\n return $this->runRequest($url, 'GET', null);\n }", "public function getAPIKey()\n\t{\n\t\treturn $this->getGMapClient()->getAPIKey();\n\t}", "public function getApiKey();", "function placester_get_api_key() { return PL_Option_Helper::api_key(); }", "public function get_api_key(){\n\t\t$apikey = array_key_exists( 'apikey', $this->bvars) ? $this->bvars['apikey'] : false;\n\t\tif (!$apikey) {\t\t\t\n\t\t\t$this->get_errors()->add( new \\gcalc\\error( 10100 ) );\n\t\t\treturn 'anonymous';\n\t\t}\n\t\treturn $apikey;\n\t}", "public function getApiKey(): string;", "public function getAPIKey()\n\t{\n\t\treturn $this->api_key;\n\t}", "private function getApikey() {\n\t\treturn $this->_apikey;\n\t}", "public function public_api_key()\n {\n $paypal = $this->CI->Payment_model->getPaypalGateway();\n return $paypal->pg_api_public_key;\n }", "public function getAPIKey()\n {\n return (string)Mage::getStoreConfig(self::CONFIG_API_KEY);\n }", "function showspace_api_key() {\n $options = get_option('showspace_options');\n return $options['showspace_api_key'];\n}", "public function getApi_Key()\n\t{\n\t\treturn $this->api_key;\n\t}", "function api_key() {\n\tif(check_value(chevereto_config('api_key'))) return chevereto_config('api_key');\n}", "public function getApiKey()\n {\n return Mage::getStoreConfig('magebridge/settings/api_key');\n }", "public function getApiKey(): string\n {\n return $this->apiKey;\n }", "public function getDeveloperKey();", "public function get_api_key()\n {\n if ( ! isset($this->api_key) ) return 'No API Key is set.';\n return $this->api_key;\n }", "public function apiKey(): string;", "function get_user_api_key() {\n $currentUser = current_user();\n if ($currentUser) {\n $db = get_db();\n $res = $db->getTable('Key')->findBy(array('user_id' => $currentUser->id));\n if (sizeof($res) > 0) {\n return $res[0]->key;\n }\n }\n}", "public function getApiKey()\n {\n return $this->settings->get('google.maps.api_key');\n }", "public function getApiKey()\n {\n return $this->getGeneralSetting('ApiKey');\n }", "public function getApiKey()\n {\n return $this->api_key;\n }", "private function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n return $this->apiKey;\n }", "function auth_apikey($key){\n\t\n}", "public function getAPIKey() {\n\t\tif (is_null($this->userData['APIKey']) || $this->userData['APIKey'] == \"\" || intval($this->userData['APIKey']) < 0) {\n\t\t\t$key = new APIKey($this->userData['userId'], $this->userData['teamNumber'], $this->userData['uniqId']);\n\t\t\t$this->__set(\"APIKey\", $key->getKey());\n\t\t\t$this->APIKey = $key->getKey();\n\t\t} else {\n\t\t\t$this->APIKey = $this->userData['APIKey'];\n\t\t}\n\n\t\treturn $this->APIKey;\n\t}", "public function getApiKey(){\n\t\treturn $this->apiKey;\n\t}", "public function getApiKey() {\n\n return $this->apiKey;\n }", "protected function getApiKey()\n {\n return $this->_apiKey;\n }", "private function getApiKey()\n {\n if ($this->options['api-version'] == 0) {\n if (!empty($this->options['secret'])) {\n return $this->options['secret'];\n }\n } elseif ($this->options['api-version'] >= 1) {\n if (!empty($this->options['api-key'])) {\n return $this->options['api-key'];\n }\n }\n if (!empty(getenv('WPC_API_KEY'))) {\n return getenv('WPC_API_KEY');\n }\n return '';\n }", "public function getApiKey()\n {\n return $this->getParameter('apiKey');\n }", "public function getApiKey()\n {\n return $this->getParameter('apiKey');\n }", "public function getApiKey() {\n\t\treturn $this->apiKey;\n\t}", "public function getApiKey(): ?string;", "public function getApiKey()\n {\n return $this->_apiKey;\n }", "function aurum_get_google_api() {\n\treturn apply_filters( 'aurum_google_api_key', get_data( 'google_maps_api' ) );\n}", "public function display_api_key() {\r\n\t\t$key = 'inf_key';\r\n\r\n\t\tif ( isset( $this->existing_options[$key] ) && $this->existing_options[$key] )\r\n\t\t\t$existing_value = $this->existing_options[$key];\r\n\t\telse\r\n\t\t\t$existing_value = '';\r\n\r\n\t\t$id = $key;\r\n\t\tsettings_errors( $id );\r\n\t\techo '<input type=\"password\" name=\"' . self::OPTION_NAME . '[' . $key . ']\" id=\"' . $id . '\"';\r\n\t\tif ( $existing_value )\r\n\t\t\techo ' value=\"' . esc_attr( $existing_value ) . '\"';\r\n\t\techo ' size=\"40\" autocomplete=\"off\" pattern=\"[a-zA-Z0-9-_]+\" />';\r\n\r\n\t\techo '<p class=\"description\">' . __( 'Not sure what the API key is or where to get it? <a target=\"_blank\" href=\"http://kb.infusionsoft.com/index.php?/article/AA-00442/0/How-do-I-enable-the-Infusionsoft-API.html\">Click here</a>', 'fb-eventpresso' ) . '</p>';\r\n\t}", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function get_api_key() {\n\t\tif ( ! $this->is_api_key_in_config() ) {\n\n\t\t\treturn (string) get_option( 'algolia_api_key', '' );\n\t\t}\n\n\t\t$this->assert_constant_is_non_empty_string( ALGOLIA_API_KEY, 'ALGOLIA_API_KEY' );\n\n\t\treturn ALGOLIA_API_KEY;\n\t}", "public function getApiKey()\n {\n return $this->getParameter('appid');\n }", "public function getApiKey()\n\t\t\t{\n\t\t\t\treturn $this->apiKey;\n\t\t\t}", "public function getAuthKey()\n {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n switch ($this->getApiMode()) {\n case Carrier::MODE_PRODUCTION:\n return $this->scopeConfig->getValue(self::XML_PATH_PRODUCTION_API_KEY, ScopeInterface::SCOPE_WEBSITES);\n default:\n return $this->scopeConfig->getValue(self::XML_PATH_TESTING_API_KEY, ScopeInterface::SCOPE_WEBSITES);\n\n }\n }", "public function getKey() {\n\t\tif (!empty($this->api_key)) {\n\t\t\treturn $this->api_key;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getApiKey() {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n $cfg = $this->di->get(\"configuration\");\n $config = $cfg->load(\"apikeys.php\");\n return $config[\"config\"][\"darksky\"];\n }", "function get_google_api_key(){\n if( function_exists( 'get_field' ) ){\n $google_api_key = get_field('google_api_key','option');\n\n return $google_api_key;\n }\n\n}", "public function getAppKey();", "protected function getApiKey()\n {\n return $this->config['api_key'];\n }", "public function getKnackRestApiKey();", "public function getAppKey(): string;", "public function getApiKey()\n {\n return $this->config['api_key'];\n }", "public function getApiKeyById($id, $page) {\n $stmt = $this->conn->prepare(\"SELECT api_key FROM \".$page.\" WHERE id = ?\");\n $stmt->bind_param(\"i\", $id);\n if ($stmt->execute()) {\n // $api_key = $stmt->get_result()->fetch_assoc();\n // TODO\n $stmt->bind_result($api_key);\n $stmt->close();\n return $api_key;\n } else {\n return NULL;\n }\n }", "public function getApiKeyPublic()\n {\n return $this->getParameter('apiKeyPublic');\n }", "private function generateApiKey()\n {\n return md5(uniqid(rand(), true));\n }", "private function generateApiKey()\n {\n return md5(uniqid(rand(), true));\n }", "public static function getApiKey()\n {\n if (static::$key) {\n return static::$key;\n }\n\n if ($key = getenv('FIRST_PROMOTER_KEY')) {\n return $key;\n }\n\n return config('services.first_promoter.key');\n }", "function getAndValidateEligibleAPIKey(){\n if(!file_exists('../APIKeys/Eligible.key')){\n $output = new stdClass();\n $output->{'Error'} = true;\n $output->{'Error_Description'} = 'Eligible API key is not present.';\n echo json_encode($output);\n die();\n }\n\n return trim(file_get_contents('../APIKeys/Eligible.key'));\n}", "function lbcb_print_kuler_api( $name ){\n\t$lbcb_options = get_option( 'lbcb_options' );\n\t?>\n\t<input type=\"text\" name=\"lbcb_options[kuler_api_key]\" id=\"lbcb_options[kuler_api_key]\" value=\"<?php echo $lbcb_options['kuler_api_key']; ?>\" /><br /><br />\n\t<span class=\"description\"><a href=\"http://kuler.adobe.com/\">Kuler</a> <?php _e(' is a color palette-sharing web site/service from Adobe. You can sign up for an API key ', 'lbcb_textdomain' ); ?><a href=\"http://kuler.adobe.com/api/\"><?php _e('right here', 'lbcb_textdomain' ); ?></a>.</span>\n\t<?php\n}", "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "private function generateApiKey(){\n\n return md5(uniqid(rand(), true));\n\n }", "public function getApiKey(){\n if (empty($this->apiKey)){\n throw new InvalidArgumentException(\"Missing API KEY!\");\n }\n return $this->apiKey;\n }", "public function getPageKey();", "public function getApiTokenKey()\n {\n return $this->apiTokenKey;\n }", "private function getKey()\n {\n if (!empty($this->options['api-key'])) {\n return $this->options['api-key'];\n }\n if (!empty(getenv('EWWW_API_KEY'))) {\n return getenv('EWWW_API_KEY');\n }\n return false;\n }", "private function get_key() {\n\t\t$key = get_option( 'github_oembed_key' );\n\t\tif ( ! $key ) {\n\t\t\t$key = md5( time() . rand( 0, 65535 ) );\n\t\t\tadd_option( 'github_oembed_key', $key, '', 'yes' );\n\t\t}\n\t\treturn $key;\n\t}", "public function get_search_api_key() {\n\t\tif ( ! $this->is_search_api_key_in_config() ) {\n\n\t\t\treturn (string) get_option( 'algolia_search_api_key', '' );\n\t\t}\n\n\t\t$this->assert_constant_is_non_empty_string( ALGOLIA_SEARCH_API_KEY, 'ALGOLIA_SEARCH_API_KEY' );\n\n\t\treturn ALGOLIA_SEARCH_API_KEY;\n\t}", "private function generateApiKey()\n {\n try {\n $rawXMLResponse = $this->soapClient->GenerateApiKey(\n array(\n 'environmentNameOrURL' => $this->config->getEnvironment(),\n 'userName' => $this->config->getUsername(),\n 'password' => $this->config->getPassword()\n ),\n array(\n 'wsdl_cache' => 1\n )\n );\n $xmlString = $this->getResponse($rawXMLResponse, 'GenerateApiKey');\n $domXml = XmlUtils::stringToDomDocument($xmlString);\n return $domXml->getElementsByTagName('apiKey')->item(0)->getAttribute('key');\n\n } catch (\\Exception $e) {\n throw new ChiliSoapCallException($e->getMessage(), $e->getCode());\n }\n }", "function twispay_tw_get_live_private_key() {\n // Wordpress database refference\n global $wpdb;\n $table_name = $wpdb->prefix . 'twispay_tw_configuration';\n\n $live_key = $wpdb->get_results( \"SELECT live_key FROM $table_name\" );\n\n if ( $live_key ) {\n return $live_key[0]->live_key;\n }\n else {\n return '';\n }\n}", "public static function createApiKey()\n\t{\n\t\treturn Str::random(32);\n\t}", "public function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "public function getAuthKey()\n {}", "public function get_sendgrid_api_key() {\n\t\t$query = $this->db\n\t\t\t->select(\"variable, value\")\n\t\t\t->where('variable', 'sendgrid_api_key')\n\t\t\t->get('settings');\n\t\tif ($query->num_rows() === 1) {\n\t\t\t$res = $query->row();\n\t\t\treturn $res->value ? $res->value : $res->default_value;\n\t\t}\n\t\treturn NULL;\n\t}", "public function showApiKeyInput()\n\t{\n\t\t$id = 'revendless-api-key';\n\t\t$option = 'api_key';\n\n\t\t$value = (isset($this->options[$option]) && $this->options[$option]) ? ' value=\"'.esc_attr($this->options[$option]).'\"' : '';\n\n\t\tsettings_errors($id);\n\n\t\tprint '<input type=\"text\" name=\"'.self::OPTION_NAME.'['.$option.']\"'.$value.' id=\"'.$id.'\" maxlength=\"40\" size=\"45\" autocomplete=\"off\" pattern=\"[a-zA-Z0-9]+\" />';\n\t\tprint '<p class=\"description\">'.esc_html( __('An API Key associates your product integrations with your personal Revendless account.', 'revendless')).'</p>';\n\t}", "public function getApiKeySettings();", "private function getCompanyApiKey()\n {\n $company = $this->getCompany();\n\n if (!isset($company['company']['api_key'])) {\n throw new BiglionException('Company \"api_key\" not defined', 1);\n }\n\n return $company['company']['api_key'];\n }", "function twispay_tw_get_staging_private_key() {\n // Wordpress database refference\n global $wpdb;\n $table_name = $wpdb->prefix . 'twispay_tw_configuration';\n\n $staging_key = $wpdb->get_results( \"SELECT staging_key FROM $table_name\" );\n\n if ( $staging_key ) {\n return $staging_key[0]->staging_key;\n }\n else {\n return '';\n }\n}", "function GetMyClubApiKeyHeader()\n{\n\t$returnString=\"\";\n\t// Get secret myclub token from separate file to access your club's API services\n\t$myClubApiKey=file_get_contents(plugin_dir_path( __FILE__ ) . \"myclubapi.key\");\n\tif (strlen($myClubApiKey)<10)\n\t{\n\t\t$returnString= \"<div class='myclubapi-error'>\";\n\t\t$returnString=$returnString . \"Error: api key file not found or content is invalid</div>\";\n\t\treturn $returnString;\n\t}\n\t$myClubApiKey=\"X-myClub-token: \" . $myClubApiKey;\n\treturn $myClubApiKey;\n}", "function permly_api($api_key=''){\n\t\t$this->api_key = $api_key;\n\t\t$this->url = $this->api_server_protocol.\"://\".$this->api_server.\"/?remote_service=rs_external_api&key=1&interface=eai_permly&version=\".$this->api_version;\n\t}", "public function getAuthKey()\n {\n }", "public function getAuthKey()\n {\n }", "public function getAuthKey()\n {\n }", "public function getAuthKey()\n {\n }", "private function generateAPIAuth()\n {\n $ts = time();\n return '&ts='.$ts.'&apikey='.getenv('PUBLIC_KEY').'&hash='.md5($ts.getenv('PRIVATE_KEY').getenv('PUBLIC_KEY'));\n }", "protected function getFinalApiKey(): string\n {\n if (isset($this->settings['ff']) && is_array($this->settings['ff']) && $this->settings['ff']['apiKey']) {\n $apiKeyRecord = $this->keyRepository->findByUid((int)$this->settings['ff']['apiKey']);\n if ($apiKeyRecord) {\n return $apiKeyRecord->getApiKey();\n }\n }\n\n return $this->settings['apiKey'] ?: '';\n }", "public function retrieveAPIKey($keyId)\n {\n return $this->start()->uri(\"/api/api-key\")\n ->urlSegment($keyId)\n ->get()\n ->go();\n }", "public function getBeezupApiToken(){\n\t\t\treturn $this->sBeezupApiToken;\n\t\t}", "function aurum_google_api_key_acf() {\n\t$api = array(\n\t\t'libraries' => 'places',\n\t\t'key' => aurum_get_google_api(),\n\t);\n\n\treturn $api;\n}", "private function getApiKey() {\n\n // If a key was configured, use it.\n if( $this->apiKey !== null ) return $this->apiKey;\n\n // Get the GoogleApiKey library option.\n $apiKey = \\RWC\\Library::load()->get_option( 'GoogleApiKey' );\n\n // If it's a string, use it.\n if( is_string( $apiKey ) ) return $apiKey;\n\n // If it's callable, execute it and use return value as key.\n if( is_callable( $apiKey ) ) {\n\n return $apiKey();\n }\n\n throw new MissingApiKeyException(\n 'No Google API key has been configured.' );\n }", "function getPackageKey() ;", "function getAndValidateDatabaseAPIKey(){\n if(!file_exists('../APIKeys/Database.key')){\n $output = new stdClass();\n $output->{'Error'} = true;\n $output->{'Error_Description'} = 'Database API key is not present.';\n echo json_encode($output);\n die();\n }\n\n return trim(file_get_contents('../APIKeys/Database.key'));\n}", "public static function publicApiKey()\n {\n //Database\n $dbOption = self::getOption()['public_api_key'];\n if (!empty($dbOption) && is_string($dbOption)) {\n return $dbOption;\n }\n \n if (defined('ALGOLIAINDEX_PUBLIC_API_KEY') && !empty(ALGOLIAINDEX_PUBLIC_API_KEY)) {\n return ALGOLIAINDEX_PUBLIC_API_KEY;\n }\n \n return false;\n }", "public static function getApiKey()\n {\n if (self::$apiKey === null) {\n throw new Everypay_Exception_RuntimeException(\n \"You must set first an API key in order to continue.\"\n );\n }\n \n return self::$apiKey;\n }", "public function setApikey()\n {\n $this->apiKey = Config::get('leanpub.API_KEY');\n }" ]
[ "0.73272085", "0.72463554", "0.7244106", "0.70818406", "0.7056448", "0.69647217", "0.69219965", "0.6900263", "0.6897834", "0.68621695", "0.68551624", "0.6804759", "0.678223", "0.67805356", "0.6758618", "0.67334896", "0.67125905", "0.6700521", "0.6693529", "0.6683751", "0.6680855", "0.66756743", "0.6646481", "0.6583626", "0.6567712", "0.6549202", "0.6493374", "0.649273", "0.6457122", "0.6456792", "0.64522886", "0.642532", "0.64239746", "0.6421871", "0.6421871", "0.64194465", "0.6418573", "0.6412699", "0.64080566", "0.64073646", "0.6400918", "0.6400918", "0.6400918", "0.6400918", "0.6378712", "0.6368893", "0.6361286", "0.6357823", "0.6342471", "0.6333432", "0.6332625", "0.6267699", "0.6252518", "0.6214237", "0.61667705", "0.616133", "0.6160076", "0.61242443", "0.61056864", "0.6094905", "0.60884845", "0.60884845", "0.60836357", "0.6074169", "0.6070835", "0.6068003", "0.6068003", "0.604643", "0.60461354", "0.6019676", "0.59997296", "0.5996128", "0.5983231", "0.59812677", "0.59748214", "0.597021", "0.5960472", "0.5945167", "0.59367317", "0.5930471", "0.59127164", "0.5901464", "0.5892138", "0.58659947", "0.58631533", "0.5851803", "0.57910687", "0.57910687", "0.57910687", "0.57910687", "0.5779113", "0.5763978", "0.5759648", "0.5738108", "0.57378685", "0.57240057", "0.5700062", "0.56999797", "0.56952757", "0.5691618", "0.56911653" ]
0.0
-1
Compose URL for executing
protected function composeExecURL() { $exec_url = self::BASE_URI . "?key=" . $this->key . "&url=" . urlencode($this->url); if(!empty($this->options)) { foreach($this->options as $key => $value) { $exec_url .= "&" . $key . "=" . $value; } } $this->exec_url = $exec_url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildFrontendUri() {}", "public function url();", "public function url();", "public function url();", "private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\n }", "public function generate_url()\n {\n }", "public function toUrl()\n {\n $queryParams = '';\n\n $index = 0;\n\n foreach ($this->args as $key => $param) {\n $separator = '?';\n\n if ($index) {\n $separator = '&';\n }\n\n $queryParams .= \"{$separator}{$key}={$param}\";\n\n $index++;\n }\n\n return \"https://dev-ops.mee.ma/glenn/1/5/people.jpg{$queryParams}\";\n }", "public function url(): string;", "protected function get_endpoint_url() {\n\n\t\t$args = http_build_query( array( 'apikey' => $this->api_key ) );\n\t\t$base = $this->route . $this->app_id;\n\t\t$url = \"$base?$args\";\n\n\t\treturn $url;\n\t}", "public function outputUrl()\n\t{\n\t\techo App::e($this->url);\n\t}", "abstract public function url($manipulation_name = '');", "function _getCommand($name, $url)\n {\n if (substr($url, 0, 4) !== 'http') {\n $url = JURI::base().$url;\n }\n\n return $url;\n }", "public static function url()\n {\n return base_url(static::action());\n }", "public function getUrl(){\n return $this->server->getUrl() . \"/\" . $this->name;\n \n }", "public function renderUri();", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "abstract public function getCallUrl();", "public static function commandURI($mnt,$command)\n{\nreturn self::uri($mnt,'?'.$command);\n}", "protected function prepareUrl()\n {\n return 'http://'.$this->_host.'/service/v'.$this->_apiVersion.'/rest.php';\n }", "public function getURL();", "public function getURL();", "public function getUrl()\n {\n $url = $params = '';\n $url .= $this->getProtocol() . '://' . self::EBAY_HOST . self::EBAY_URI . '?';\n foreach ($this->getParams() as $name => $value) {\n $params .= '&' . $name . '=' . urlencode($value);\n }\n\n return $url . substr($params, 1);\n }", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "public function getURL ();", "public function GetFetchURL();", "public function get_command_url() {\r\n\t\t$language = ($this->has_language() ? $this->language : cur_lang());\r\n\t\t$controller = ($this->controller == 'home' && $this->action == 'index' && !$this->has_parameters() ? '' : $this->controller);\r\n\t\t$action = ($this->action == 'index' && !$this->has_parameters() ? '' : $this->action);\r\n\t\t$controller_parameters = ($this->has_parameters() ? implode('/', $this->parameters) : '/');\r\n\t\t$get_parameters = ($this->has_url_get_parameters() ? '?'.$this->url_get_parameters : '');\t\r\n\t\t\r\n\t\treturn DIRECTORY_ROOT.$language.($controller == '' ? '' : '/'.$controller).($action == '' ? '' : '/'.$action).($controller_parameters == '/' ? '' : '/'.$controller_parameters).$get_parameters;\r\n\t}", "public function getUrl() {\n\t\t$url = $this->getBaseUrl().$this->getBasePath().$this->getOperation();\n\t\t$params = http_build_query($this->getUrlParameters());\n\t\tif ($params) {\n\t\t\t$url .= '?'.$params;\n\t\t}\n\t\treturn $url;\n\t}", "public function buildBackendUri() {}", "public function uri();", "public function uri();", "public function uri();", "public abstract function getURL();", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}", "public function ___httpUrl() {\n\t\t$page = $this->pagefiles->getPage();\n\t\t$url = substr($page->httpUrl(), 0, -1 * strlen($page->url())); \n\t\treturn $url . $this->url(); \n\t}", "public function url()\n\t{\n\t\treturn Url::to($this->id);\n\t}", "public function url() {\n if (empty($this->parameters)) {\n return $this->url;\n }\n\n return $this->url . '?' . http_build_query($this->parameters);\n }", "public static function arprocUrl() {\n\t\treturn self::pw('pages')->get('pw_template=arproc')->url;\n\t}", "public function get_url();", "public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}", "public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }", "public function program_url() {\n $tipos = Feeds::all()->lists('nameFeed', 'id_feed');\n $combobox = array(0 => \"Seleccione ... \") + $tipos;\n $selected = array();\n $exito = 'hola';\n\n return View::make(\"escaleta.programsUrls\", compact('combobox', 'selected', 'hrs', 'tiphr', 'minust', 'exito'));\n }", "function toURL($action='index', $mod='', $args=array()){\r\n\t\t\r\n\t\t// detail at the 'fromURL()'\r\n\t\treturn $this->env['web_root'].(empty($mod)?$this->env['cur_mod']:$mod).$this->item('req_sep').$action\r\n\t\t\t.(empty($args) ? '' : '?'.http_build_query($args));\r\n\t}", "public function requestUri() {}", "function request_uri() {\n\t\tif(isset($_SERVER['argv'])) {\n\t\t\t$protocol = 'cli';\n\t\t\t$host = gethostname();\n\t\t\t$path = '/' . $_SERVER['SCRIPT_FILENAME'];\n\t\t\tif(count($_SERVER['argv']) > 1) {\n\t\t\t\tunset($_SERVER['argv'][0]);\n\t\t\t\t$query_string = '?' . http_build_query($_SERVER['argv']);\n\t\t\t} else {\n\t\t\t\t$query_string = '';\n\t\t\t}\n\n\t\t\treturn $protocol . '://' . $host . $path . $query_string;\n\t\t} else {\n\t\t\tif (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) {\n\t\t\t\t$protocol = 'https';\n\t\t\t} else {\n\t\t\t\t$protocol = 'http';\n\t\t\t}\n\t\t\t$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';\n\t\t\t$path = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';\n\t\t\t$query_string = isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING']) ? ('?' . $_SERVER['QUERY_STRING']) : '';\n\t\t\treturn $protocol . '://' . $host . $path . $query_string;\n\t\t}\n\t}", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "public function url(){\r\n\t\techo $_SERVER['SERVER_NAME'].\" => \".$_SERVER['PHP_SELF'];\r\n\t}", "public function url() {\n if ($this->no_results)\n return false;\n\n $config = Config::current();\n\n return url(\"view/\".$this->url, ExtendController::current());\n }", "protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}", "public function getUrl()\n {\n return trim(implode('/', $this->path), '/').$this->getParams();\n }", "abstract protected function getMethodUrl(): string;", "public function url($p)\n {\n if (!is_array($p))\n $p = array('_action' => @func_get_arg(0));\n\n $task = $p['_task'] ? $p['_task'] : ($p['task'] ? $p['task'] : $this->task);\n $p['_task'] = $task;\n unset($p['task']);\n\n $url = './';\n $delm = '?';\n foreach (array_reverse($p) as $key => $val) {\n if ($val !== '' && $val !== null) {\n $par = $key[0] == '_' ? $key : '_'.$key;\n $url .= $delm.urlencode($par).'='.urlencode($val);\n $delm = '&';\n }\n }\n return $url;\n }", "public function to_url()\n {\n $post_data = $this->to_postdata();\n $out = $this->get_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n\n return $out;\n }", "function writeUrl() {\n\n }", "public function url() {\n return Magic::url();\n }", "public function getURL() {\n\t\treturn $this->urlStub() .'/' . $this->publicContainer .'/' . $this->getId();\n\t}", "public static function generateURL()\n {\n return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n }", "public function url() \n\t{\n\t\treturn static::protocol().'://'.static::host().$this->server('REQUEST_URI', '/' );\n\t}", "public function createUrl(){\n\t\t$urlObj [\"id\"] =KuaiDi100Conf_pub::APPKEY;// $this->appid; //WxPayConf_pub::APPID;\n\t\t$urlObj [\"com\"] = $this->typeCom;\n\t\t$urlObj [\"typeNu\"] = $this->typeNu;\n\t\t$urlObj [\"show\"] = KuaiDi100Conf_pub::SHOW;\n\t\t$urlObj[\"muti\"] = KuaiDi100Conf_pub::MUTI;\n\t\t$urlObj[\"order\"] = KuaiDi100Conf_pub::ORDER;\n\t\t$bizString = $this->formatBizQueryParaMap ( $urlObj, false );\n\t\treturn KuaiDi100Conf_pub::URL . $bizString;\n\t}", "public function getExecuteUrl()\r\n\t{\r\n\t\treturn $this->payment->links[2]->getHref();\r\n\t}", "public function url($controller) {\n\t\t$protocol = ( ! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http';\n\t\t$host = $_SERVER['HTTP_HOST'];\n\t\t$script = $_SERVER['SCRIPT_NAME'] . '/';\n\t\treturn $protocol . '://' . $host . $script . $controller;\n\t}", "public function fullCommand() {\n \n return str_finish(self::EXECUTABLE.' '.$this->options, ' ').$this->url;\n }", "public function url()\n {\n $scheme = $this->scheme();\n $scheme = $scheme ? $scheme . '://' : '//';\n $query = $this->query() ? '?' . http_build_query($this->query()) : '';\n $fragment = $this->fragment() ? '#' . $this->fragment() : '';\n return $scheme . $this->host() . $this->path() . $query . $fragment;\n }", "public function generateUrl(){\n if(($this->getGetMethodResult('task') != null) && ($this->getGetMethodResult('action') != null)) {\n $urlFromArray = [];\n\n foreach ($this->getMethodUrlPathArray() as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $argsKey => $argsValue) {\n $urlFromArray[] = $argsKey . '=' . $argsValue;\n }\n } else {\n $urlFromArray[] = $key . '=' . $value;\n }\n }\n return implode('&', $urlFromArray);\n }\n else{\n return null;\n }\n }", "protected function getUrl() {\r\n $url = \\Nette\\Utils\\Strings::endsWith($this->url, \"/\") ? $this->url : $this->url . \"/\"; \r\n $script = \\Nette\\Utils\\Strings::startsWith($this->script, \"/\") ? $this->script : \"/\" . $this->script; \r\n \r\n return $url . $script;\r\n }", "public function get_url()\n {\n }", "protected function buildUrl()\n {\n $basePath = env('SLACK_API_HOST');\n $postUri = \"chat.postMessage\";\n $this->url = $basePath . $postUri;\n }", "public function create_url( string $url ) {\n\n return esc_url_raw( add_query_arg( $this->action, (string) wp_create_nonce( $this->action ), $url ) );\n\n }", "function url_request(): string\n{\n return url_site() . input_server('REQUEST_URI');\n}", "function elgg_http_build_url(array $parts) {\n\t// build only what's given to us.\n\t$scheme = isset($parts['scheme']) ? \"{$parts['scheme']}://\" : '';\n\t$host = isset($parts['host']) ? \"{$parts['host']}\" : '';\n\t$port = isset($parts['port']) ? \":{$parts['port']}\" : '';\n\t$path = isset($parts['path']) ? \"{$parts['path']}\" : '';\n\t$query = isset($parts['query']) ? \"?{$parts['query']}\" : '';\n\n\t$string = $scheme . $host . $port . $path . $query;\n\n\treturn $string;\n}", "function create_url( $args ) {\n\tglobal $base_url;\n\t\n\t$base_url = add_query_arg( 'wc-api', 'software-api', $base_url );\n\t\n\treturn $base_url . '&' . http_build_query( $args );\n}", "public function to($url = '')\n\t{\n\t\treturn $this->url.'/'.$this->name.'/'.$url;\n\t}", "public function actionIndex(){ \n echo 'REST API';\n //echo \\admin\\components\\GoogleURLShortner::widget([\"url\" => \"http://www.google.com\"]);\n }", "public function getUrl() {\n\t\t$this->getRublon()->log(__METHOD__);\n\t\treturn $this->getRublon()->getAPIDomain() .\n\t\t\tself::URL_PATH_CODE .\n\t\t\turlencode($this->getUrlParamsString());\n\t}", "function url($route,$params=array(),$ampersand='&')\n{\n\tif (Yii::app() instanceof CConsoleApplication)\n\t{\n\t\treturn Yii::app()->params['host'].Yii::app()->getUrlManager()->createUrl($route,$params,$ampersand);\n\t}\n\telse\t\n\t\treturn Yii::app()->createUrl($route,$params,$ampersand);\n}", "public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }", "private function _getURL()\n {\n\n $url = $this->_ect . '?';\n foreach ($this as $name => $var) {\n if ($name == 'ect') {\n continue;\n }\n $url .= \"$name=$var&\";\n }\n\n $this->url = $url;\n\n return $this->url;\n }", "function constructURL($object);", "public function url()\n {\n if (empty($this->parameters)) {\n return $this->url;\n }\n $total = array();\n foreach ($this->parameters as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $va) {\n $total[] = HttpClient::urlencodeRFC3986($k).\"[]=\".HttpClient::urlencodeRFC3986($va);\n }\n } else {\n $total[] = HttpClient::urlencodeRFC3986($k).\"=\".HttpClient::urlencodeRFC3986($v);\n }\n }\n $out = implode(\"&\", $total);\n\n return $this->url.'?'.$out;\n }", "public function getCustomUrl() : string;", "function jc_url() {\n\n}", "public function makeUrlFromRequest()\n {\n $id = __Request::get('id', null);\n $resolvedVO = $this->createResolvedVO($id);\n return $resolvedVO->url;\n }", "#[Pure]\n public function getRequestUrl() {}", "public function getUrl()\n\t{\n\t\treturn '/akce/' . $this->getActionId();\n\t}", "protected function _getUrl() {\n\t\t\t$this->_url =\timplode('/', array(\n\t\t\t\t$this->_baseUrlSegment,\n\t\t\t\t$this->_apiSegment,\n\t\t\t\timplode('_', array(\n\t\t\t\t\t$this->_type,\n\t\t\t\t\t$this->_language,\n\t\t\t\t\t$this->_locale,\n\t\t\t\t)),\n\t\t\t\t$this->_apiVersionSegment,\n\t\t\t\t$this->controller,\n\t\t\t\t$this->function\t\n\t\t\t));\n\n\t\t\tempty($this->_getFields) ?: $this->_url .= '?' . http_build_query($this->_getFields);\n\t\t}", "public static function getThisUrl() {}", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function url($url)\n {\n return App::getBaseURL() . \"$url\";\n }", "abstract public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "function get (string $url, array $args = []): string {\n\t$append = '';\n\tif (count($args) > 0) {\n\t\t$append .= '/'.parseUrlGet($args);\n\t}\n\n\t$curlCall = curl_init($url.$append);\n\n\tcurl_setopt($curlCall, CURLOPT_RETURNTRANSFER, 1);\n\n\t$return = curl_exec($curlCall);\n\tcurl_close($curlCall);\n\n\treturn $return;\n}", "function url($format, $args = null)\n {\n $d = array \n (\n '%route' => server('location.route'),\n '%url' => server('location.url'),\n '%base' => dirname(server('script.name')),\n '%scheme' => server('location.scheme'),\n '%domain' => server('location.domain'),\n '%auto' => server('router.force') ? 'index.php' : \"\",\n '%path' => ltrim(rtrim(server('router.haystack'), '/'), '/'),\n '%query' => rtrim(server('query.string'), '&')\n );\n\n $format = str_ireplace(array_keys($d), array_values($d), $format);\n $format = str_replace('://', $s = '{$s}', $format);\n $format = vsprintf($format, is_array($args) ? $args : array_slice(func_get_args(), 1));\n $format = preg_replace('/\\/+/', '/', $format);\n\n return rtrim(str_replace($s, '://', $format), '/');\n }", "private function _combineUrl()\n {\n $args = func_get_args();\n $url = '';\n foreach ($args as $arg) {\n if (!is_string($arg)) {\n continue;\n }\n if ($arg[strlen($arg) - 1] !== '/') {\n $arg .= '/';\n }\n $url .= $arg;\n }\n\n return $url;\n }" ]
[ "0.6541003", "0.6465577", "0.6465577", "0.6465577", "0.6306139", "0.62989175", "0.6225217", "0.6193616", "0.6191092", "0.61745036", "0.6170492", "0.6127379", "0.6114157", "0.6112213", "0.60921824", "0.60819685", "0.60546625", "0.60105264", "0.6007052", "0.6002942", "0.6002942", "0.5992949", "0.59928674", "0.598866", "0.59831256", "0.59721094", "0.5968817", "0.59596485", "0.5956524", "0.5956524", "0.5956524", "0.595539", "0.59396964", "0.5926997", "0.5915574", "0.5897392", "0.5894102", "0.5893903", "0.58934003", "0.5882155", "0.58722293", "0.5860508", "0.58496016", "0.58493686", "0.58491427", "0.5843571", "0.5843016", "0.58279014", "0.58239543", "0.58079535", "0.5804923", "0.57874304", "0.5781305", "0.5776769", "0.57694644", "0.57639825", "0.5760716", "0.57511294", "0.574862", "0.57471794", "0.5746317", "0.57313585", "0.57200557", "0.57168704", "0.57103336", "0.5707653", "0.56925946", "0.5679889", "0.56660724", "0.56589437", "0.5656806", "0.5654512", "0.5653977", "0.56457025", "0.5636825", "0.5629881", "0.5629203", "0.56223065", "0.5622111", "0.56192833", "0.5616586", "0.5615269", "0.56093186", "0.56074774", "0.5606964", "0.5605159", "0.5599396", "0.5597872", "0.5591709", "0.5589608", "0.5589608", "0.5589608", "0.5589608", "0.5589608", "0.5589608", "0.5589608", "0.5589608", "0.55888623", "0.5588292", "0.5585438" ]
0.71734166
0
Execute data from API
protected function executeData() { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->exec_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false); $json = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $data = json_decode($json); if($http_code != "200") { throw new Exception($http_code, $data); } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute() {\n $this->check();\n $this->buildQuery();\n $response = json_decode($this->getContents());\n $this->response = !empty($response) ? $response : NULL;\n }", "private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }", "public function processApi();", "public function run()\n {\n //\n $param=[\n 'message'=>'google',\n 'url'=>'google',\n ];\n $restdata=new Restdata;\n $restdata->fill($param)->save();\n $param=[\n 'message'=>'yahoo',\n 'url'=>'yahoo',\n ];\n $restdata=new Restdata;\n $restdata->fill($param)->save();\n $param=[\n 'message'=>'MSN',\n 'url'=>'msn',\n ];\n $restdata=new Restdata;\n $restdata->fill($param)->save();\n }", "public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}", "protected function _execute(){\n\t\t\t$this->_getUrl();\n\n\t\t\t$c = curl_init($this->_url);\n\t\t\tob_start();\n\t\t\tif(!empty($this->_postFields)) {\n\t\t\t\tcurl_setopt($c, CURLOPT_POST, 1);\n\t\t\t\tcurl_setopt($c, CURLOPT_POSTFIELDS, json_encode($this->_postFields));\n\t\t\t}\n\n\t\t\tcurl_exec($c);\n\t\t\tcurl_close($c);\n\t\t\t$this->_result = trim(ob_get_contents());\n\t\t\tob_end_clean();\n\t\t}", "abstract function do_api_request();", "public function run() {\n\n\t\t//业务数据\n\t\tModels\\DtiLocal::build(function (Builder $b) {\n\t\t\t$b->method_enum('post')->code(\"api/amiba/doc-bizs/batch\")->name(\"业务数据\")->path('api/amiba/doc-bizs/batch');\n\t\t\t$b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\n\t\t//财务数据\n\t\tModels\\DtiLocal::build(function (Builder $b) {\n\t\t\t$b->method_enum('post')->code(\"api/amiba/doc-fis/batch\")->name(\"财务数据\")->path('api/amiba/doc-fis/batch');\n\t\t\t$b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t}", "public function execute_http()\n {\n }", "public function execute(){\n try {\n $request = $this->getRestClient();\n $raw_response = $request->request();\n } catch (Zend_Http_Client_Exception $e) {\n Mage::helper('unbxd_recommendation')->log(Zend_Log::ERR,\n sprintf($this->getUrl() .\" failed because HTTP error: %s\", $e->getMessage()));\n return Mage::getModel('unbxd_recommendation/api_response')\n ->setErrorMessage(Unbxd_Recommendation_Model_Api_Response::SERVER_ERR);\n }\n return Mage::getModel(\"unbxd_recommendation/api_response\")\n ->setJsonResponse($this->isJsonResponse())\n ->setResponse($raw_response, $this->getUrl());\n }", "public function fromAPI($data);", "public function run() {\n\t\t$this->db->fetchAll('pundits');\n\t\t$this->response = array(\n\t\t\t'status' => 'success',\n\t\t\t'command'=> 'list',\n\t\t\t'data' => $this->db->get_last_result()\n\t\t);\n\t}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function run($param)\n {\n $apiTable = [\n 'users' => [\n 'get_is_user_registered' => ['GET', RESOURCES . DS .'RgUserApiRes.php', 'isRegisteredUser'],\n 'set_user_registry' => ['POST', RESOURCES . DS .'RgUserApiRes.php', 'setUser'] \n \n ],\n \n 'files' => [\n 'get_file_info' => ['GET', RESOURCES . DS .'RgFileApiRes.php', 'getFileInfo'],\n 'set_user_file_info' => ['POST', RESOURCES . DS .'RgFileApiRes.php', 'setUserFileInfo']\n ], \n ];\n \n //check validation, if not exit it.\n //$this->checkValidation($param);\n\n //excute api and get result\n $this->cmdApiResponse($apiTable, $param);\n }", "public function run()\n {\n $response = Http::get('https://swapi.dev/api/planets/');\n if ($response->status() == 200) {\n $response->json();\n $planetsQT = $response['count'];\n for ($i=1; $i < $planetsQT ; $i++) {\n $planet = Http::get(\"https://swapi.dev/api/planets/$i/\");\n if ($planet->status() == 200) {\n $planet->json();\n $newPlanet = new Planet();\n $newPlanet->name = $planet['name'];\n $newPlanet->rotation_period = $planet['rotation_period'];\n $newPlanet->orbital_period = $planet['orbital_period'];\n $newPlanet->diameter = $planet['diameter'];\n $newPlanet->climate = $planet['climate'];\n $newPlanet->gravity = $planet['gravity'];\n $newPlanet->terrain = $planet['terrain'];\n $newPlanet->surface_water = $planet['surface_water'];\n $newPlanet->population = $planet['population'];\n $newPlanet->save();\n }\n }\n }\n }", "public function api_call() {\n\n }", "public function getApiData();", "public function api()\n {\n $postData = $this->request->post;\n $getData = $this->request->get;\n\n $action = explode('/', $getData['route']);\n $action = array_pop($action);\n\n $data = [\n 'post' => $postData,\n 'get' => $getData\n ];\n\n $verb = strtolower($_SERVER['REQUEST_METHOD']);\n\n $api = new Api($data, $verb, $this);\n $result = $api->{$action}();\n\n $this->sendResponse($result);\n }", "public function execute() {\n\t\t$data = $this->getResultData();\n\t\t$this->printText($data[0]);\n\t}", "public function execute()\r\n {\r\n if ($this->is_searchdata_api) {\r\n if (!isset($this->engine) || empty($this->engine)) {\r\n throw new Exception('Missing \"engine\" parameter');\r\n }\r\n if (!isset($this->api_key) || empty($this->api_key)) {\r\n throw new Exception('Missing \"api_key\" parameter');\r\n }\r\n }\r\n return $this->apiCall($this->params);\r\n }", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "public function execute();", "private function _execute()\n {\n //convert data into json\n $data = json_encode($this->data);\n //build url\n $url = $this->host . ':' \n . $this->port \n . sprintf(self::UPDATE_URL, $this->core, $this->dataType) \n . '?commit=' . $this->commit;\n //initialize curl request\n $ch = curl_init();\n //set request url\n curl_setopt($ch, CURLOPT_URL, $url);\n //set to return the result on success and 'false' on failure\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n //set request's post data\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n //set the request type to HTTP POST\n curl_setopt($ch, CURLOPT_POST, 1);\n //build headers\n $headers = array();\n $headers[] = $this->cacheControl;\n $headers[] = $this->contentType;\n //set http headers\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n // decode curl response to json\n $response = json_decode(curl_exec($ch), true);\n // get the request's return code\n $http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);\n // check if the return code is OK\n if($http_code != 200) {\n throw new \\Exception('Error: Failed to recieve response from ' . $url);\n }\n // close the connection\n curl_close($ch);\n // return response\n return $response;\n }", "public function processApi() {\n $request = $this->_request['request'];\n $values = $this->_request;\n\n // WARNING: This method needs to add some ways to authenticate the user\n // and should also filter out any dangerous or magic methods before it\n // would be safe. This code is for demonstration purposes only!\n\n if (method_exists($this->database, $request)) {\n if (!empty($_REQUEST['request'])) {\n unset($values['request']);\n $result = $this->database->processRequest($request, $values);\n if (!empty($result)) {\n $this->response($this->json($result), 200);\n }\n else {\n // If no records \"No Content\" status\n $this->response('',204);\n }\n }\n else {\n // If the method not exist with in this class, response would be \"Page not found\".\n $this->response('',404);\n }\n }\n }", "public function execute () {\n $input = [\n 'active' => [0,1]\n ];\n $categories = $this->_api_client->get('/category', $input);\n\n // set returned value to the view\n $this->set('categories', $categories);\n\n // get products using the API\n $input = [\n 'active' => [0,1]\n ];\n $products = $this->_api_client->get('/product', $input);\n\n // set returned value to the view\n $this->set('products', $products);\n }", "public function process() {\n\n\t\t\t/**\n\t\t\t * Decode all data from JSON\n\t\t\t *\n\t\t\t * @var array $data\n\t\t\t */\n\t\t\t$data = json_decode($this->getData(), true);\n\n\t\t\t/**\n\t\t\t * Get keys from first row of data set\n\t\t\t *\n\t\t\t * @var array $columNames\n\t\t\t */\n\t\t\t$columnNames = array_keys($data[0]);\n\n\t\t\t/**\n\t\t\t * Generate tablename from given columns\n\t\t\t *\n\t\t\t * @var string $tableName\n\t\t\t */\n\t\t\t$tableName = \"tmp_plista_api_\" . md5(implode($columnNames));\n\n\t\t\t/**\n\t\t\t * Building the query for creating the temporary Table\n\t\t\t * Note: This function does not fires a DROP TABLE. If the\n\t\t\t * table already exists the data gets filled in again. So the\n\t\t\t * client is responsible for droping the table after usage\n\t\t\t *\n\t\t\t * @var string $sql\n\t\t\t */\n\t\t\t$sql = \"CREATE TABLE IF NOT EXISTS `\" . $tableName . \"`\n\t\t\t(\" . implode( $columnNames, \" VARCHAR(255), \" ) . \" VARCHAR(255))\n\t\t\tENGINE=MEMORY\n\t\t\tDEFAULT CHARSET=utf8;\";\n\n\t\t\t/**\n\t\t\t * Build the query for inserting data into the temporary table\n\t\t\t *\n\t\t\t * @var string $sql\n\t\t\t */\n\t\t\tforeach ($data as $row) {\n\t\t\t\t$sql .= \"\\nINSERT INTO $tableName (\" . implode($columnNames, \", \") . \") VALUES ('\" . implode($row, \"', '\") . \"');\";\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * set the data\n\t\t\t */\n\t\t\t$this->setData(\n\t\t\t\tarray(\n\t\t\t\t\t\"table_name\"\t=> $tableName,\n\t\t\t\t\t\"query\"\t\t=> $sql\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function proccess(){\n\t\t#Get endpoint params\n\t\t$endpointParams = $this->getEndpointParams();\n\t\t#Check if endpoint was read\n\t\tif($endpointParams == []) return [\"success\" => 0, \"msg\" => \"The requested endpoint ({$this->endpointURL}) didn't match any expected command. Please give a check on <a href='index.php'>index.php</a> for a list of available endpoints.\"];\n\t\t#Get current command (the first part of endpoint) and also removes it from the arguments array\n\t\t$currentCommand = array_shift($endpointParams);\n\t\t#Execute command and return output\n\t\tswitch ($currentCommand) {\n\t\t\t#List upcoming movies\n\t\t\tcase 'upcoming': return $this->retrieveUpcomingMovies($endpointParams);\n\t\t\t#Get movie info\n\t\t\tcase 'movie': return $this->retrieveMovie($endpointParams);\n\t\t\t#Search for movies using terms\n\t\t\tcase 'search': return $this->retrieveSearch($endpointParams);\n\t\t\t#Fallback\n\t\t\tdefault: return [\"success\" => 0, \"msg\" => \"The command '{$currentCommand}' is unknown! Please give a check on <a href='index.php'>index.php</a> for a list of available endpoints.\"];\n\t\t}\n\t}", "public function execute() { }", "public function execute()\n {\n $resultJson = $this->jsonFactory->create();\n $answer = null;\n $success = true;\n $question = $this->getQuestion();\n if ($question) {\n try {\n $answer = $this->helperData->getAnswer($question);\n } catch (\\Exception $e) {\n $answer = $e->getMessage();\n $success = false;\n }\n if (!empty($answer)) {\n $answer = trim($answer);\n }\n } else {\n $success = false;\n $answer = __('Please add some context so the AI can come up with the right content.');\n }\n\n return $resultJson->setData([\n 'answer' => $answer,\n 'success' => $success\n ]);\n }", "public function callApi()\n {\n // Call URL\n $fetchUsers = $this->requestUsingCurl($this->url);\n \n if (!$fetchUsers) {\n return false;\n }\n // Get Data in array format\n $this->users = json_decode($fetchUsers, true);\n }", "public function execute()\n\t{\n\t\tob_start();\n\t\t$return = curl_exec($this->curlRessource);\n\t\t$datas = ob_get_contents();\n\t\tob_end_clean();\n\t\tcurl_close($this->curlRessource);\n\t\tif(!$return)\n\t\t\tthrow new Exception(\"Impossible d'acceder e l'url : <b>\".$this->url.\"</b>\");\n\t\treturn $datas;\n\t}", "public function run()\n\t\t{\n\t\t\tswitch ($_GET['act']) {\n\t\t\t\tcase 'create':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->create();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'lists':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->lists();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'listsDetails':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->listsDetails();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'get':\n\t\t\t\t\t//Obtener una Remision\n\t\t\t\t\t$this->getRemision();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'getFolio':\n\t\t\t\t\t$this->getFolio();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\techo $this->json_encode(array('error'=>SERVICIO_INEXISTENTE,'data'=>NULL,'mensaje'=>'Este servicio no está disponible'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA DE SERVICIO INEXISTENTE\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function execute()\n {\n $nbpapi = \"http://api.nbp.pl/api/exchangerates/rates/a/rub/?format=json\";\n\n // get posdata from request\n $postdata = $this->getRequest()->getPostValue();\n\n // make sure that interessing data is float\n if (!isset($postdata[\"amount\"]) || empty($postdata[\"amount\"])) {\n $postdata[\"amount\"] = 0;\n }\n $postamount=floatval($postdata[\"amount\"]);\n\n // request to nbp api \n $this->_curl->get($nbpapi);\n \n // response will contain the output in form of JSON string\n // then change to assoc array\n $exchangerate = $this->_jsonHelper->jsonDecode($this->_curl->getBody());\n \n // how many pln we have\n $amount = $postamount * $exchangerate[\"rates\"][0][\"mid\"];\n \n // create JSON, which will be used to show resposne\n $result = $this->_resultJsonFactory->create();\n\n // set data to json\n $result->setData([\"success\"=>true,\"exchange_rate\"=>$exchangerate[\"rates\"][0][\"mid\"],\"amount\"=>$amount]);\n \n // return result to show json\n return $result;\n }", "public function send(): GetDataFromApiClass;", "public function perform()\n\t\t{\n##\t\t\t$data_string = json_encode($data);\n\t\t\t$ch = curl_init($this->endpoint);\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->request_type);\n\n\t\t\tif ($this->payload != NULL)\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $this->payload);\n\t\t\t\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t\t\t#curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json'));\n\t\t\t\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\t\t\t\n\t\t\t$this->result = curl_exec($ch);\n\t\t\t\n\t\t\tif ($ret = json_decode($this->result,true))\n\t\t\t\treturn $ret;\n\t\t\telse\n\t\t\t\tdie(\"ERROR: $this->result\");;\n\t\t\treturn json_decode($this->result,true);\n\t\t}", "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }", "public function execute() {\n\t\t$params = $this->extractRequestParams();\n\t\t$this->validateParams( $params );\n\t\t$eventId = $params['eventid'];\n\t\t$startDate = $params['startdate'];\n\t\t$endDate = $params['enddate'];\n\t\t$increment = $params['increment'];\n\t\t$userDefString = $params['userdefs'];\n\n\t\t// This is if it's asking for tableData\n\t\tif ( isset( $params['tabledata'] ) ) {\n\t\t\t$tableData = SpecialClickTracking::buildRowArray( $startDate, $endDate, $userDefString );\n\t\t\t$this->getResult()->addValue( array( 'tablevals' ), 'vals', $tableData );\n\t\t} else {\n\t\t\t// Chart data\n\t\t\ttry {\n\t\t\t\t$click_data = SpecialClickTracking::getChartData( $eventId, $startDate, $endDate, $increment, $userDefString );\n\t\t\t\t$this->getResult()->addValue( array( 'datapoints' ), 'expert', $click_data['expert'] );\n\t\t\t\t$this->getResult()->addValue( array( 'datapoints' ), 'basic', $click_data['basic'] );\n\t\t\t\t$this->getResult()->addValue( array( 'datapoints' ), 'intermediate', $click_data['intermediate'] );\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t/* No result */\n\t\t\t}\n\t\t}\n\t}", "public function run(){\t\t\n\t\t/* this startup function for any controller */\n\t\t\n\t\t//$data = $this->db->DB_Fetch_Grid(\"users\");\n\t\t//return $this->json($data);\n\n\t\treturn $this->json([\"test\"=>\"done\",\"response\"=>2244234,\"route\"=>\"users\"]);\n\t\n\t}", "public function execute(): object\n {\n $this->buildRequest();\n $client = new HttpClient();\n Log::debug('Creating Digicert Request', [\n 'Method' => $this->requestMethod,\n 'RequestURI' => $this->requestUri,\n 'Options' => $this->options,\n ]);\n RateLimiter::checkLimit();\n $request = $client->request($this->requestMethod, $this->requestUri, $this->options);\n \n return json_decode($request->getBody());\n }", "public function processApi()\n {\n\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['x'])));\n if ((int) method_exists($this, $func) > 0) {\n $this->$func();\n }\n else {\n $this->response('', 404);\n }\n }", "public function run()\n {\n $client = new \\GuzzleHttp\\Client();\n\t\t$response = $client->request('GET', 'http://dev.ftd.digital/doc/mockdata.json');\n\n\t\tif($response->getStatusCode() == 200){\n\t\t\t$livros = $response->getBody();\n\t\t\t$livros = json_decode($livros, TRUE);\n\n\t\t\tforeach($livros as $livro){\n\n\t\t\t\t//AUTHOR\n\t\t\t\t$authors = '';\n\t\t\t\t$qtdAut = count($livro['author']);\n\t\t\t\tfor($i = 0; $i < $qtdAut; $i++){\n\t\t\t\t\t$authors .= $livro['author'][$i] . ',';\n\t\t\t\t}\n\t\t\t\t$authors = substr($authors, 0, -1);\n\n\t\t\t\t//DISCIPLINES\n\t\t\t\t$disciplines = '';\n\t\t\t\t$qtdDisc = count($livro['discipline']);\n\t\t\t\tfor($i = 0; $i < $qtdDisc; $i++){\n\t\t\t\t\t$disciplines .= $livro['discipline'][$i] . ',';\n\t\t\t\t}\n\t\t\t\t$disciplines = substr($disciplines, 0, -1);\n\n\t\t\t\tLivros::create([\n\t\t 'isbn' \t\t => $livro['isbn'],\n\t\t 'title' \t => $livro['title'],\n\t\t 'cover' \t => $livro['cover'],\n\t\t 'author' \t => $authors,\n\t\t 'level' \t => $livro['level'],\n\t\t 'discipline' => $disciplines,\n\t\t 'price' \t => $livro['price']\n\t\t ]);\n\t\t\t} \n\t }\n }", "public function run()\n\t\t{\n\t\t\tswitch ($_GET['act']) {\n\t\t\t\tcase 'create':\n\t\t\t\t\t//Crear\n\t\t\t\t\tif(BaseCtrl::isAdmin())\n\t\t\t\t\t\t$this->create();\n\t\t\t\t\telse{\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>NO_PERMITIDO,'data'=>NULL,'mensaje'=>'No tienes permisos suficientes'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//CARGAR VISTA DE NO PERMITIDO\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'lists':\n\t\t\t\t\t//Listar \n\t\t\t\t\t$this->lists();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'listsDetails':\n\t\t\t\t\t//Crear \n\t\t\t\t\t$this->listsDetails();\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'get':\n\t\t\t\t\t//Obtener una Recepcion\n\t\t\t\t\t$this->getRecepcion();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'getFolio':\n\t\t\t\t\t$this->getFolio();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\techo $this->json_encode(array('error'=>SERVICIO_INEXISTENTE,'data'=>NULL,'mensaje'=>'Este recepcion no está disponible'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA DE SERVICIO INEXISTENTE\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function processApi()\n\t\t{\n\t\t\t$this->createEntry();\n\t\t}", "public function dataapiAction()\n\t{\n\t\t$this->getHelper('viewRenderer')->setNoRender(true);\n\t\t$this->getHelper('layout')->disableLayout();\n\t\t\n\t\t$dt = new Latihan_Model_Datatables_Skenario($this->_request->getParams());\n\t\techo $dt->result();\n\t}", "public function onRun()\n {\n try {\n $api = new PluginApi($this->secret, $this->dataFolder);\n $this->setResult($api->basicGet(\"/information\"));\n } catch (\\Exception $e) {\n $this->setResult($e);\n }\n }", "public function run()\n {\n $data = [\n [\n 'name' => '广西快乐十分',\n 'status' => Lottery::VALID_STATUS,\n 'code' => Lottery::GUANGXIKUAILE10_TYPE_CODE,\n 'lottery_category_id' => 1,\n 'limit_time' => 20,\n 'issue_num_day' => 40,\n 'is_official' => Lottery::IS_OFFICIAL_STATUS,\n 'started_at' => '09:00:00',\n 'ended_at' => '22:30:00',\n 'sort' => 0,\n ],\n [\n 'name' => '快三',\n 'status' => Lottery::VALID_STATUS,\n 'code' => Lottery::GUANGXIKUAILE10_TYPE_CODE,\n 'lottery_category_id' => 2,\n 'limit_time' => 20,\n 'issue_num_day' => 40,\n 'is_official' => Lottery::IS_OFFICIAL_STATUS,\n 'started_at' => '09:10:00',\n 'ended_at' => '22:35:00',\n 'sort' => 0,\n ]\n ];\n foreach ($data as $value) {\n Lottery::create($value);\n }\n }", "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n if((int)method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('',404);\n }", "public abstract function execute();", "public abstract function execute();", "public abstract function execute();", "private function dispatch(): void {\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"{$this->apiUrl}/{$this->endpoint}\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => \"CURL_HTTP_VERSION_1_1\",\n CURLOPT_CUSTOMREQUEST => $this->method\n ));\n\n $this->response = curl_exec($curl); \n curl_close($curl);\n }", "public function runRequest() {\n }", "public function run()\n {\n\n $curl_handle=curl_init();\n curl_setopt($curl_handle, CURLOPT_URL,'https://pokeapi.co/api/v2/pokemon/?limit=898');\n curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl_handle, CURLOPT_USERAGENT, 'PokemonApp (http://localhost, 1.0.0)');\n $results = json_decode(curl_exec($curl_handle), true);\n \n\n foreach($results['results'] as $row) {\n curl_setopt($curl_handle, CURLOPT_URL,$row['url']);\n\n $pokemon = curl_exec($curl_handle);\n $pokemon = json_decode($pokemon, true);\n\n Pokemon::firstOrCreate([\n 'id' => $pokemon['id'],\n 'name' => ucfirst($row['name']),\n 'sprite' => \"https://cdn.traction.one/pokedex/pokemon/{$pokemon['id']}.png\",\n 'weight' => $pokemon['weight'],\n 'height' => $pokemon['height'],\n 'description' => ''\n ]);\n }\n\n curl_close($curl_handle);\n }", "public function execute()\n {\n $error = __('invalid request');\n $httpCode = 400;\n $gaData = $this->_request->getParam('ga');\n $gaHash = $this->_request->getParam('h');\n /** @var \\Magento\\Framework\\Controller\\Result\\Raw $resultRaw */\n $resultRaw = $this->resultRawFactory->create();\n if ($gaData && $gaHash) {\n /** @var $helper \\Magento\\Backend\\Helper\\Dashboard\\Data */\n $helper = $this->_objectManager->get(\\Magento\\Backend\\Helper\\Dashboard\\Data::class);\n $newHash = $helper->getChartDataHash($gaData);\n if (Security::compareStrings($newHash, $gaHash)) {\n $params = null;\n $paramsJson = base64_decode(urldecode($gaData));\n if ($paramsJson) {\n $params = json_decode($paramsJson, true);\n }\n if ($params) {\n try {\n /** @var $httpClient \\Magento\\Framework\\HTTP\\ZendClient */\n $httpClient = $this->_objectManager->create(\\Magento\\Framework\\HTTP\\ZendClient::class);\n $response = $httpClient->setUri(\n \\Magento\\Backend\\Block\\Dashboard\\Graph::API_URL\n )->setParameterGet(\n $params\n )->setConfig(\n ['timeout' => 5]\n )->request(\n 'GET'\n );\n\n $headers = $response->getHeaders();\n\n $resultRaw->setHeader('Content-type', $headers['Content-type'])\n ->setContents($response->getBody());\n return $resultRaw;\n } catch (\\Exception $e) {\n $this->_objectManager->get(\\Psr\\Log\\LoggerInterface::class)->critical($e);\n $error = __('see error log for details');\n $httpCode = 503;\n }\n }\n }\n }\n $resultRaw->setHeader('Content-Type', 'text/plain; charset=UTF-8')\n ->setHttpResponseCode($httpCode)\n ->setContents(__('Service unavailable: %1', $error));\n return $resultRaw;\n }", "public function doProcessData() {}", "public function execute(){\n\n $body = '{\"payer_id\":\"' . $this->payer_id . '\"}';\n $client = new Client();\n try{\n $paymentInfo = $client->request('POST', $this->execute_url, ['headers' => [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->accessKey,\n ],\n 'body' => $body\n ]);\n }\n catch (\\Exception $ex) {\n $error = json_encode($ex->getMessage());\n return($error);\n }\n $this->parsePaymentBody($paymentInfo);\n return $this->paymentBody;\n\n }", "public function execute() {\n\t}", "private function execute() {\n\t\t// Max exec time of 1 minute.\n\t\tset_time_limit(60);\n\t\t// Open cURL request\n\t\t$curl_session = curl_init();\n\n\t\t// Set the url to post request to\n\t\tcurl_setopt ($curl_session, CURLOPT_URL, $this->url);\n\t\t// cURL params\n\t\tcurl_setopt ($curl_session, CURLOPT_HEADER, 0);\n\t\tcurl_setopt ($curl_session, CURLOPT_POST, 1);\n\t\t// Pass it the query string we created from $this->data earlier\n\t\tcurl_setopt ($curl_session, CURLOPT_POSTFIELDS, $this->curl_str);\n\t\t// Return the result instead of print\n\t\tcurl_setopt($curl_session, CURLOPT_RETURNTRANSFER,1);\n\t\t// Set a cURL timeout of 30 seconds\n\t\tcurl_setopt($curl_session, CURLOPT_TIMEOUT,30);\n\t\tcurl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, FALSE);\n\n\t\t// Send the request and convert the return value to an array\n\t\t$response = preg_split('/$\\R?^/m',curl_exec($curl_session));\n\n\t\t// Check that it actually reached the SagePay server\n\t\t// If it didn't, set the status as FAIL and the error as the cURL error\n\t\tif (curl_error($curl_session)){\n\t\t\t$this->status = 'FAIL';\n\t\t\t$this->error = curl_error($curl_session);\n\t\t}\n\n\t\t// Close the cURL session\n\t\tcurl_close ($curl_session);\n\n\t\t// Turn the response into an associative array\n\t\tfor ($i=0; $i < count($response); $i++) {\n\t\t\t// Find position of first \"=\" character\n\t\t\t$splitAt = strpos($response[$i], '=');\n\t\t\t// Create an associative array\n\t\t\t$this->response[trim(substr($response[$i], 0, $splitAt))] = trim(substr($response[$i], ($splitAt+1)));\n\t\t}\n\n\t\t// Return values. Assign stuff based on the return 'Status' value from SagePay\n\t\tswitch($this->response['Status']) {\n\t\t\tcase 'OK':\n\t\t\t\t// Transactino made succssfully\n\t\t\t\t$this->status = 'success';\n\t\t\t\t$_SESSION['transaction']['VPSTxId'] = $this->response['VPSTxId']; // assign the VPSTxId to a session variable for storing if need be\n\t\t\t\t$_SESSION['transaction']['TxAuthNo'] = $this->response['TxAuthNo']; // assign the TxAuthNo to a session variable for storing if need be\n\t\t\t\tbreak;\n\t\t\tcase '3DAUTH':\n\t\t\t\t// Transaction required 3D Secure authentication\n\t\t\t\t// The request will return two parameters that need to be passed with the 3D Secure\n\t\t\t\t$this->acsurl = $this->response['ACSURL']; // the url to request for 3D Secure\n\t\t\t\t$this->pareq = $this->response['PAReq']; // param to pass to 3D Secure\n\t\t\t\t$this->md = $this->response['MD']; // param to pass to 3D Secure\n\t\t\t\t$this->status = '3dAuth'; // set $this->status to '3dAuth' so your controller knows how to handle it\n\t\t\t\tbreak;\n\t\t\tcase 'REJECTED':\n\t\t\t\t// errors for if the card is declined\n\t\t\t\t$this->status = 'declined';\n\t\t\t\t$this->error = 'Your payment was not authorised by your bank or your card details where incorrect.';\n\t\t\t\tbreak;\n\t\t\tcase 'NOTAUTHED':\n\t\t\t\t// errors for if their card doesn't authenticate\n\t\t\t\t$this->status = 'notauthed';\n\t\t\t\t$this->error = 'Your payment was not authorised by your bank or your card details where incorrect.';\n\t\t\t\tbreak;\n\t\t\tcase 'INVALID':\n\t\t\t\t// errors for if the user provides incorrect card data\n\t\t\t\t$this->status = 'invalid';\n\t\t\t\t$this->error = 'One or more of your card details where invalid. Please try again.';\n\t\t\t\tbreak;\n\t\t\tcase 'FAIL':\n\t\t\t\t// errors for if the transaction fails for any reason\n\t\t\t\t$this->status = 'fail';\n\t\t\t\t$this->error = 'An unexpected error has occurred. Please try again.';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// default error if none of the above conditions are met\n\t\t\t\t$this->status = 'error';\n\t\t\t\t$this->error = 'An error has occurred. Please try again.';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// set error sessions if the request failed or was declined to be handled by controller\n\t\tif($this->status !== 'success') {\n\t\t\t$_SESSION['error']['status'] = $this->status;\n\t\t\t$_SESSION['error']['description'] = $this->error;\n\t\t}\n\t}", "public function getDataAction () {\n\t\t$this->getAnswer();\n\t}", "public function getDataAction () {\n\t\t$this->getAnswer();\n\t}", "public function processApi() {\n if (isset($_REQUEST['x']) && $_REQUEST['x'] != \"\") {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['x'])));\n if ((int)method_exists($this, $func) > 0) {\n $this->$func();\n } else {\n echo 'method not exist';\n exit;\n }\n } else {\n echo 'method not exist';\n exit;\n }\n }", "public function runHandle() {\n\n $storeId = $this->option('storeId') ? $this->option('storeId') : 0;\n\n $storeIds = $storeId ? [$storeId] : Store::pluck('id');\n foreach ($storeIds as $storeId) {\n $this->handleRequest($storeId);\n\n //设置时区\n FunctionHelper::setTimezone($storeId);\n\n $platform = FunctionHelper::getUniqueId(Constant::PLATFORM_SHOPIFY);\n\n $productModel = ActivityProductService::getModel($storeId, '');\n $productData = $productModel->select('id', 'asin', 'shop_sku', 'country', 'sku', 'act_id', 'business_type')->get(); //->where([['shop_sku', '!=', '']])\n foreach ($productData as $product) {\n $businessType = data_get($product, 'business_type');\n if ($businessType == 1) {\n $where = [\n Constant::DB_TABLE_STORE_ID => $storeId,\n Constant::DB_TABLE_PLATFORM => $platform,\n Constant::OWNER_RESOURCE => ActivityProductService::getMake(),\n Constant::OWNER_ID => $product['id'],\n Constant::NAME_SPACE => 'free_testing',\n Constant::DB_TABLE_KEY => 'country',\n ];\n $select = [Constant::DB_TABLE_VALUE];\n $counties = MetafieldService::getModel($storeId)->select($select)->buildWhere($where)->get();\n $country = data_get($counties, '0.value', '');\n empty($country) && $country = $product['country'];\n\n $amazonPriceData = ActivityProductService::getProductPrice($product['asin'], $product['shop_sku'], $country);\n if (data_get($amazonPriceData, Constant::RESPONSE_CODE_KEY, 0) != 1 || empty(data_get($amazonPriceData, Constant::RESPONSE_DATA_KEY, []))) {//如果拉取价格失败,就返回\n continue;\n }\n } else {\n $amazonPriceData = ActivityProductService::getProductPrice($product['asin'], $product['shop_sku'], $product['country']);\n if (data_get($amazonPriceData, Constant::RESPONSE_CODE_KEY, 0) != 1 || empty(data_get($amazonPriceData, Constant::RESPONSE_DATA_KEY, []))) {//如果拉取价格失败,就返回\n continue;\n }\n }\n\n $amazonPriceData = data_get($amazonPriceData, Constant::RESPONSE_DATA_KEY, []);\n $isQuerySuccessful = data_get($amazonPriceData, 'isQuerySuccessful', false);\n $queryResults = data_get($amazonPriceData, 'queryResults', 0);\n $priceData = data_get($amazonPriceData, 'priceData', []);\n $data = [\n 'query_at' => data_get($amazonPriceData, 'queryAt', ''), //查询时间\n 'is_query_successful' => $isQuerySuccessful, //是否查询成功 1:成功 0:失败\n 'query_results' => $queryResults, //查询结果 1:查询到价格数据 0:亚马逊和爬虫 价格数据为空\n ];\n\n if ($isQuerySuccessful && $priceData) {\n data_set($data, 'listing_price', data_get($priceData, 'listing_price', 0)); //销售价\n data_set($data, 'regular_price', data_get($priceData, 'regular_price', 0)); //原价\n data_set($data, 'price_updated_at', data_get($priceData, 'updated_at', '')); //销参产品价格更新时间\n data_set($data, 'price_source', data_get($priceData, 'price_source', '')); //价格来源\n }\n\n //更新活动产品价格数据\n ActivityProductService::update($storeId, ['id' => data_get($product, 'id', 0)], $data);\n }\n\n $this->handleResponse(); //处理响应\n }\n\n return true;\n }", "public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }", "public function processApi(){\r\n\t\t\t$service = explode(\"/\", $_GET['x']);\r\n\t\t\t$this->entity = ucfirst($service[0]);\r\n\t\t\t$this->methode = $service[1];\r\n\t\t\t$func = $this->methode.$this->entity;\r\n\t\t\t$this->addLog('--'.$this->methode.$this->entity);\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\r\n\t\t\t\t\r\n\t\t}", "function MyFatoorah($api, $userData)\n{\n // dd($userData);\n $token = $api;\n $basURL = \"https://apitest.myfatoorah.com\";\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"$basURL/v2/ExecutePayment\",\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $userData,\n CURLOPT_HTTPHEADER => array(\"Authorization: Bearer $token\", \"Content-Type: application/json\"),\n ));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n $err = curl_error($curl);\n curl_close($curl);\n if ($err) {\n return $err;\n } else {\n return $response;\n }\n}", "public function api()\n {\n $function = $this->getParameter('function',$this->api_functions);\n\n $this->fetchOrder();\n\n $actualFunc = $this->oOrder->getData('micropayment_last_function');\n $this->oOrder->setData('micropayment_last_function',$function)->save();\n\n $this->checkEventWorkFlow($actualFunc,$function);\n $this->fetchOrder();\n switch ($function) {\n case self::FUNCTION_INIT:\n if($actualFunc)\n $this->handleInit();\n break;\n case self::FUNCTION_PAYIN:\n \t $this->handlePayin();\n\t break;\n case self::FUNCTION_BILLING:\n $this->handleBilling();\n break;\n case self::FUNCTION_STORNO:\n $this->handleStorno();\n break;\n case self::FUNCTION_BACKPAY:\n $this->handleBackpay();\n break;\n case self::FUNCTION_REFUND:\n $this->handleRefund();\n break;\n case self::FUNCTION_EXPIRE:\n $this->handleExpire();\n break;\n case self::FUNCTION_CHANGE:\n $this->handleChange();\n break;\n case self::FUNCTION_TEST:\n $this->handleTest();\n break;\n case self::FUNCTION_ERROR:\n $this->handleError();\n break;\n }\n $this->sendStatus();\n }", "public function execute() {\n }" ]
[ "0.7214039", "0.68051755", "0.6801584", "0.67793506", "0.66443837", "0.66114146", "0.65564317", "0.64971286", "0.64713705", "0.6470685", "0.64648974", "0.64567095", "0.64390236", "0.64390236", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.64385724", "0.643817", "0.643817", "0.643817", "0.643817", "0.643817", "0.643817", "0.64354634", "0.64281744", "0.6423247", "0.6403238", "0.63824064", "0.63520145", "0.63510007", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.63343865", "0.6309831", "0.62356377", "0.62324625", "0.62111145", "0.61981493", "0.61693525", "0.6156426", "0.61557597", "0.615394", "0.61500835", "0.6113483", "0.6111969", "0.60913813", "0.60905135", "0.60863185", "0.60710305", "0.60191196", "0.6010566", "0.60080457", "0.5992605", "0.5980377", "0.59780705", "0.59761655", "0.5974623", "0.5973481", "0.5959163", "0.5959163", "0.5959163", "0.5946752", "0.59416336", "0.59385437", "0.59385085", "0.592079", "0.5916485", "0.5912588", "0.59100544", "0.5909682", "0.5909682", "0.59029317", "0.59028476", "0.5891485", "0.5891248", "0.5889072", "0.5884315", "0.5881656" ]
0.6998764
1
Set the collection for which entries need parsing
public function setCollection(Collection $collection): void { $this->collection = $collection; // Map the properties of the base collection $this->mapProperties($this->collection); $this->setUsers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCollection()\n {\n $cl = $this->nameCollection;\n $this->collection = self::$database->$cl;\n }", "public function __construct()\n {\n $this->feeds = new ArrayCollection();\n }", "public function setCollection($collection)\r\n {\r\n $collection->addAttributeToSelect('thumbnail')\r\n ->addAttributeToSelect('url_key')\r\n ->addAttributeToSelect('meta_title');\r\n $this->_collection = $collection;\r\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('lavi_news/news')->getResourceCollection();\n\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection() {\n $website_id = Mage::app()->getWebsite()->getId();\n $collection = Mage::getModel('inchoo_supportticket/ticket')\n ->getCollection();\n $this->setCollection($collection);\n parent::_prepareCollection();\n return $this;\n }", "public function __construct()\n {\n $this->tasks = new ArrayCollection();\n $this->comments = new ArrayCollection();\n $this->timeEntries = new ArrayCollection();\n }", "public function setCollection($collection){\r\n\t\t$this->_collection = $collection;\r\n\t\treturn $this;\r\n\t}", "public function __construct()\n {\n $this->categories = new ArrayCollection();\n $this->families = new ArrayCollection();\n $this->types = new ArrayCollection();\n $this->designations = new ArrayCollection();\n $this->makes = new ArrayCollection();\n }", "public function setCollection($collection){\n\t\t$this->_collection = $collection;\n\t\treturn $this;\n\t}", "protected function _prepareCollection()\n\t{\n\t\t$collection = Mage::getResourceModel($this->_getCollectionClass());\n\t\t$this->setCollection($collection);\n\t\t \n\t\treturn parent::_prepareCollection();\n\t}", "public function __construct()\n {\n $this->posts = new ArrayCollection();\n $this->parameters = new ArrayCollection();\n }", "public static function customCollection()\n\t{\n // recupera as features encontradas\n $features = Arr::flatten(parent::$collection);\n // limpa a collection\n parent::$collection = [];\n // realimenta a collection\n foreach ($features as $feature) {\n parent::$collection[$feature] = true;\n }\n\t}", "public function setCollection(\\Magento\\Framework\\Data\\Collection $collection) {\n $this->collection = $collection;\n }", "public function __construct()\n {\n $this->postules = new ArrayCollection();\n $this->competences = new ArrayCollection();\n $this->habilitations = new ArrayCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('iparcel/log')->getCollection();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "public function populateCollection() {\n\t\tif(empty($this->rawData)) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach($this->rawData as $item) {\n\t\t\t$feedItem = new TwitterItemAdapter($item);\n\t\t\t$this->feed->addItem($feedItem);\n\t\t}\n\t}", "public function setElements($collection)\n {\n if (is_array($collection)) {\n $collection = new ArrayCollection($collection);\n }\n $this->collection = $collection;\n return $this;\n }", "protected function _prepareCollection()\n {\n /* @var $collection Scandi_MenuManager_Model_Resource_Item_Collection */\n $collection = Mage::getModel('scandi_menumanager/item')->getResourceCollection()\n ->addMenuFilter(Mage::registry('menumanager_menu'));\n if (!$this->getRequest()->getParam('sort')) { $collection->setPositionOrder(); }\n\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function setCollection($collection)\n {\n $this->_collection = $collection;\n $this->_collection\n ->addAttributeToFilter(\n [\n ['attribute'=> 'is_in_impo','null' => true],\n ['attribute'=> 'is_in_impo','eq' => ''],\n ['attribute'=> 'is_in_impo','eq' => '0']\n ]);\n $ids=$this->_collection->getAllIds();\n $this->_collection->addFieldToFilter('entity_id', ['in' => $ids]);\n\n $this->_collection->setCurPage(parent::getCurrentPage());\n\n // we need to set pagination only if passed value integer and more that 0\n $limit = (int)parent::getLimit();\n if ($limit) {\n $this->_collection->setPageSize($limit);\n }\n if (parent::getCurrentOrder()) {\n $this->_collection->setOrder(parent::getCurrentOrder(), parent::getCurrentDirection());\n $this->_collection->addAttributeToSort(\n parent::getCurrentOrder(),\n parent::getCurrentDirection()\n );\n }\n \n return $this; \n }", "public function __construct()\n {\n $this->articles = new ArrayCollection();\n $this->commentaires = new ArrayCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $userId = Mage::getSingleton('admin/session')->getUser()->getId();\n\n /* var $collection Gri_Cms_Model_Mysql4_Version_Collection */\n $collection = Mage::getModel('gri_cms/page_version')->getCollection()\n ->addPageFilter($this->getPage())\n ->addVisibilityFilter($userId,\n Mage::getSingleton('gri_cms/config')->getAllowedAccessLevel())\n ->addUserColumn()\n ->addUserNameColumn();\n\n if (!$this->getParam($this->getVarNameSort())) {\n $collection->addNumberSort();\n }\n\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection() {\n /**\n * \n * @var unknown\n */\n /**\n * Calling the parent Construct Method.\n * \n * Getting collection for bank details\n */\n $managebankdetailsCollection = Mage::getModel ( 'airhotels/managebankdetails' )->getCollection ();\n $this->setCollection ( $managebankdetailsCollection ); \n return parent::_prepareCollection ();\n /**\n * return _prepareCollection\n */\n }", "private function buildCollection(): void\n {\n //todo 這邊可以在sql裡面處理,但因為時程的關係,先用這種方法處理\n $userId = auth()->user()->id;\n $this->collection->map(function ($item) use ($userId) {\n $item->isAuthor = ($item->user_id == $userId);\n $item->user_id = null;\n });\n }", "protected function _prepareCollection($collection)\n {\n return $this;\n }", "public function __construct()\n {\n $this->recepten = new ArrayCollection();\n }", "protected function _prepareCollection()\n {\n $collection = $this->collectionFactory->create();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n /* @var $collection Belvg_Storelocator_Model_Resource_Location_Collection */\n $collection = Mage::getModel('storelocator/location')->getResourceCollection();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "public function __construct()\n {\n $this->items = new Collection;\n }", "public function __construct()\n {\n $this->items = new Collection;\n }", "public function __construct($collection) {\n\t\t\t$this->collection = $collection;\n\t\t}", "protected function _prepareCollection()\n {\n /** @var $collection ChazkiExpressCollection */\n $collection = $this->_collectionFactory->create();\n $collection->setWebsiteFilter($this->getWebsiteId());\n\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->organismes = new ArrayCollection();\n $this->reponses = new ArrayCollection();\n $this->tags = new ArrayCollection(); \n $this->categories = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "protected function _prepareCollection()\r\n {\r\n\t\tif($this->getRequest()->getParam('store')){\r\n\t\t\t$store_id = $this->getRequest()->getParam('store');\r\n\t\t} else {\r\n\t\t\t$store_id = Mage::helper('items')-> getMlDefaultStoreId();\r\n\t\t}\r\n\t\t$attribute_id = '';\r\n\t\tif($this->getRequest()->getParam('attribute_id')!=''){\r\n\t\t\t$attribute_id = $this->getRequest()->getParam('attribute_id');\r\n\t\t} \r\n\t\t\r\n\t\t$category_id = 0;\r\n\t\tif($this->getRequest()->getParam('category_id')){\r\n\t\t\t$category_id = $this->getRequest()->getParam('category_id');\r\n\t\t}\r\n\t\t\r\n\t\t$collection = Mage::getModel('eav/entity_attribute_option')\r\n\t\t\t\t\t-> getCollection()\r\n\t\t\t\t\t-> setStoreFilter($store_id)\r\n\t\t\t\t\t-> join('attribute','attribute.attribute_id=main_table.attribute_id', 'attribute_code')\r\n\t\t\t\t\t-> addFieldToFilter('attribute.attribute_id',$attribute_id)\r\n\t\t\t\t\t-> addFieldToFilter('tsv.value', array('neq' => 'NULL' ));\t\t\t\r\n\t\t\t\t\t\r\n $collection -> getSelect()\r\n\t\t\t\t -> joinleft(array('mavm'=>'mercadolibre_attribute_value_mapping'), \" main_table.option_id = mavm.mage_attribute_option_id AND mavm.sort_order = '0' AND mavm.category_id = '\".$category_id.\"' AND mavm.store_id = '\".$store_id.\"'\",array('mavm.*'));\r\n\t\t \r\n\t\t\t\t \r\n\t\t\t\t \t\t\t\t\t\t\t\t\r\n\t $this->setCollection($collection);\r\n return parent::_prepareCollection();\r\n }", "public function __construct() {\n $this->configs = new ArrayCollection();\n }", "public function __construct()\n {\n $this->_collection = new Collection();\n }", "public function __construct(){\r\n\t\t$this->collection = new Collection();\r\n\t}", "public function __construct()\n {\n $this->defendants = new ArrayCollection();\n $this->interpreterEvents = new ArrayCollection();\n }", "public function __construct()\n {\n $this->categories = new ArrayCollection();\n }", "public function __construct()\n {\n $this->categories = new ArrayCollection();\n }", "public function __construct()\n {\n $this->commentaire=new ArrayCollection();\n }", "protected function _prepareCollection()\n {\n $collection = $this->_createCollection()->addCustomerIdFilter($this->_getCustomer()->getId())\n ->resetSortOrder()\n ->addDaysInWishlist()\n ->addStoreData();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $collection->setOrder('ID','DESC');\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function __construct()\n {\n \t$this->cities = new ArrayCollection();\n }", "private function createCollection()\n {\n $class = get_class($this->data);\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "public function __construct()\n {\n $this->programs = new ArrayCollection();\n }", "public function __construct()\n {\n $this->programs = new ArrayCollection();\n }", "public function __construct()\n {\n $this->commentaires = new ArrayCollection();\n $this->photos = new ArrayCollection();\n }", "protected function _prepareCollection () {\n $collection\n = Mage::getResourceModel('mventory/carrier_volumerate_collection')\n ->setWebsiteFilter($this->getWebsiteId());\n\n $this->setCollection($collection);\n\n $shippingTypes\n = Mage::getModel('mventory/system_config_source_allowedshippingtypes')\n ->toArray();\n\n foreach ($collection as $rate) {\n $name = $rate->getConditionName();\n\n if ($name == 'weight')\n $rate->setWeight($rate->getConditionValue());\n else if ($name == 'volume')\n $rate->setVolume($rate->getConditionValue());\n\n $shippingType = $rate->getShippingType();\n\n $shippingType = isset($shippingTypes[$shippingType])\n ? $shippingTypes[$shippingType]\n : '';\n\n $rate->setShippingType($shippingType);\n }\n\n return parent::_prepareCollection();\n }", "abstract protected function collectionLoader();", "public function __construct()\n {\n $this->placas = new ArrayCollection();\n }", "public function __construct()\n {\n $this->users = new ArrayCollection();\n }", "public function prepare_response_for_collection($response)\n {\n }", "public function getEntryCollection(): EntryCollection;", "public function setCollection($collection)\n {\n $this->collection = $collection;\n\n return $this;\n }", "public function __construct(&$collection)\n\t{\n\t\t// Set params\n\t\t$this->collection = $collection;\n\t}", "function set_items() { \n\n\t\t$this->items = $this->get_items();\n\n\t}", "protected function _prepareCollection() {\n /**\n * Get the Collection of Manage Subscription\n */\n $manageSubscription = Mage::getModel ( 'airhotels/managesubscriptions' )->getCollection ();\n \n /**\n * Get the Table Prefix Value\n */\n $tablePrefix = Mage::getConfig ()->getTablePrefix ();\n $manageSubscription->getSelect ()->group ( 'main_table.product_id' )->joinLeft ( $tablePrefix . 'apptha_productsubscriptions', 'main_table.product_id =' . $tablePrefix . 'apptha_productsubscriptions.product_id AND ' . $tablePrefix . 'apptha_productsubscriptions.is_delete = 0', array (\n 'main_table.id as id',\n 'main_table.product_name as product_name',\n $tablePrefix . 'apptha_productsubscriptions.subscription_type as subscription_type' \n ) )->where ( 'main_table.is_subscription_only = ?', 1 );\n \n $collection = $manageSubscription;\n $this->setCollection ( $collection );\n /**\n * Calling the parent Construct Method.\n */\n return parent::_prepareCollection ();\n }", "protected function _prepareCollection()\r\n {\r\n $this->setCollection(Mage::getModel('dynamic_brand/brand')->getCollection());\r\n return parent::_prepareCollection();\r\n }", "public function __construct()\n {\n $this->tags = new ArrayCollection();\n }", "public function __construct() {\n $this->bestellijn = new ArrayCollection();\n }", "public function setCollection(array $value);", "protected function setUp()\n\t{\n\t\t$rss_content = self::provideRSSContent();\n\t\t\n\t\t$this->entry_collection_object = EntryCollection::buildFromRSSContent($rss_content);\n\t\t$this->entry_collection_reflection = new ReflectionClass('EntryCollection');\n\t}", "public function init()\n {\n $this->bases = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "public function __construct() {\n $this->reservations = new ArrayCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('oggetto_oneclick/order')->getResourceCollection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function __construct()\n {\n $this->attachments = new ArrayCollection();\n $this->history = new ArrayCollection();\n }", "public function setCollection(CollectionInterface $collection);", "public function __construct() {\n $this->columnas = new ArrayCollection();\n }", "public function __construct()\n {\n $this->accounts = new ArrayCollection();\n }", "public function setValues($valueCollection) {\n\n foreach ($valueCollection as $key => $value) {\n if (isset($this[$key])) {\n $this[$key]->setValue($value);\n } //if\n } //foreach\n \n }", "public function __construct()\n {\n $this->forumPostTb = new ArrayCollection;\n }", "private function _setEntries($entries)\n\t{\n\t\t$this->_entries = $entries;\n\t}", "public function __construct() {\n $this->items = new ArrayCollection;\n $this->orderProducts = new ArrayCollection;\n $this->promotions = new ArrayCollection();\n\n }", "public function __construct()\n {\n $this->spotWebcams = new ArrayCollection();\n }", "public function __construct()\n {\n $this->userTodos = new ArrayCollection();\n }", "function setDbcoll($collection){\n $this->collection = $collection;\n $this->dbdotcoll = $this->mdb.'.'.$this->collection;\n }", "public function asCollection();", "private function initOptions()\n {\n $this->optionsResolver->setDefaults([\n 'collection' => [],\n ]);\n\n $this->optionsResolver->setAllowedTypes('collection', 'array');\n }", "public function setCollection(array $collection)\n {\n if (!$this->isArrayValid($collection)) {\n return null;\n }\n\n $this->resetCollection();\n foreach ($collection as $object) {\n $this->add($object);\n }\n\n $this->rewind();\n return $this;\n }", "public function init()\n {\n // Top-level parent\n parent::init();\n $this->applyOmekaStyles();\n $this->setAutoApplyOmekaStyles(false);\n $this->setAttrib('id', 'new_collection');\n $this->setAttrib('method', 'POST');\n // Target collection\n $this->addElement('text', 'name', array(\n 'label' => __(\"Collection Name\"),\n 'description' => __(\"Name of the new collection to import into.\"),\n 'required' => true,\n ));\n }", "protected function _setCollection(){\n $storeId = Mage::app()->getStore()->getId();\n $products = Mage::getResourceModel('reports/product_collection')\n ->addOrderedQty()\n ->addAttributeToSelect(array('name', 'price', 'small_image', 'short_description', 'description'))\n ->setStoreId($storeId)\n ->addStoreFilter($storeId)\n ->setPageSize($this->getProductsCount())\n ->setOrder('ordered_qty', 'desc');\n\n Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);\n Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);\n\n $this->_topsellerCollection = $products;\n }", "public function __construct(Collection $collection)\n {\n $this->collection = $collection;\n }", "public function __construct()\n {\n $this->tickets = new ArrayCollection();\n }", "public function buildCollection(): void\n {\n foreach ($this->pages as $Page) {\n $this->routes[] = $Page->route();\n }\n foreach ($this->pages as $Page) {\n try {\n $this->store($Page);\n } catch (\\Exception $error) {\n throw new \\Exception($error);\n }\n }\n }", "public function __construct()\n {\n $this->places = new ArrayCollection();\n $this->transitions = new ArrayCollection();\n }", "public function resetCollectionsForPersist()\n {\n $this->containers = new ArrayCollection();\n $this->functions = new ArrayCollection();\n $this->constants = new ArrayCollection();\n }", "public function __construct($collection)\n\t{\n\t\t// Assign params\n\t\t$this->collection = $collection;\n\n\t\t// Compile if needed\n\t\t$this->collection->compile();\n\t}", "public function __construct()\n {\n $this->reviews = new ArrayCollection();\n }", "public function __construct() {\n $this->groups = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n parent::__construct();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel('bs_docwise/docwisement_collection');\n\n if ($this->getExam()->getId()) {\n $constraint = 'related.exam_id='.$this->getExam()->getId();\n } else {\n $constraint = 'related.exam_id=0';\n }\n $collection->getSelect()->joinLeft(\n array('related' => $collection->getTable('bs_docwise/exam_docwisement')),\n 'related.docwisement_id = main_table.entity_id AND '.$constraint,\n array('position')\n );\n\n\n $this->setCollection($collection);\n parent::_prepareCollection();\n return $this;\n }", "public function init(): Set;", "public function __construct() {\n $this->disciplinas = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->tendencias = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->institucionalEstrategias = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->ofertas = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->estrategiaCampos = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->eventos = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->encuestas = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "public function setData(Collection $Collection): void\n {\n $this->Collection = $Collection;\n }", "public function __construct()\n {\n $this->references = new ArrayCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel('bs_worksheet/worksheet_collection');\n if ($this->getCurriculum()->getId()) {\n $constraint = 'related.curriculum_id='.$this->getCurriculum()->getId();\n } else {\n $constraint = 'related.curriculum_id=0';\n }\n $collection->getSelect()->joinLeft(\n array('related' => $collection->getTable('bs_worksheet/worksheet_curriculum')),\n 'related.worksheet_id=main_table.entity_id AND '.$constraint,\n array('position')\n );\n $this->setCollection($collection);\n parent::_prepareCollection();\n return $this;\n }", "public function _construct(){\n $this->KcsPoll = new ArrayCollection();\n }", "public function __construct() {\r\n $this->answers = new ArrayCollection();\r\n }", "public function prepareFieldset();", "public function __construct()\n {\n self::$clients = new Collection();\n }" ]
[ "0.6546009", "0.6186215", "0.6178487", "0.6145887", "0.6139568", "0.6091675", "0.6072567", "0.60408735", "0.60365784", "0.600511", "0.6004355", "0.60016346", "0.5993122", "0.5973749", "0.5966891", "0.59606093", "0.5920708", "0.5920022", "0.59132546", "0.5912529", "0.5911889", "0.5908304", "0.5906624", "0.5900895", "0.58943063", "0.5888054", "0.5879916", "0.58781993", "0.587804", "0.587804", "0.5867174", "0.58616745", "0.58306617", "0.5822209", "0.58154225", "0.5800562", "0.5796608", "0.5755584", "0.572828", "0.572828", "0.57085174", "0.5708207", "0.5691843", "0.5684954", "0.56790173", "0.56617785", "0.56617785", "0.5657281", "0.5654009", "0.5643225", "0.5636826", "0.5622412", "0.5612771", "0.55827075", "0.5582692", "0.558232", "0.557891", "0.5565816", "0.55582845", "0.5551469", "0.5549563", "0.5538088", "0.5516648", "0.55156606", "0.5509729", "0.5507581", "0.5505664", "0.5501702", "0.54848397", "0.5481363", "0.5480496", "0.5479304", "0.54788744", "0.5474552", "0.54709697", "0.54613346", "0.54578215", "0.5447715", "0.5427133", "0.5424069", "0.541761", "0.5416523", "0.5413646", "0.5410552", "0.5400057", "0.53810155", "0.53748286", "0.5371175", "0.5370872", "0.537022", "0.5360311", "0.5359647", "0.53583145", "0.53506374", "0.53479874", "0.53443134", "0.5344164", "0.5319518", "0.53192", "0.5318188" ]
0.59166557
18
Map the properties to a readable format
private function mapProperties(Collection $collection): void { // Create a properties array of this relationship $this->properties = Collect::keyBy($collection->getProperties()->getValues(), 'identifier'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getToStringProperties();", "public function format() {\n\n /* * Add the mandatary props* */\n if (!is_null($this->name)) {\n $result[self::NAME_KEY] = $this->name;\n }\n\n /* * Add the optional props if any* */\n if (!is_null($this->optionalProperties)) {\n $result = array_merge($result, $this->optionalProperties);\n }\n\n\n return $result;\n }", "public function __toString(){\n\t\t$ref = new ReflectionObject($this);\n\t\t$r = \"[\".$ref->getName().\"]\\n\";\n\t\tforeach($ref->getProperties() as $prop){\n\t\t\t$r .= \"\\t - \".$prop->getName().\"=\".$prop->getValue().\"\\n\";\n\t\t}\n\t\treturn $r;\n\t}", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n \t$context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n \t$context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.User: ' . implode(' ', $context) . ' ]';\n }", "function displayProperties ()\n {\n foreach ($this as $key => $property)\n {\n echo $key . ':' . $property . '<br>';\n }\n }", "protected function propertiesToFields()\n\t{\n\t\t$fields = array(\n\t\t\t\"ep_exam_event_id\" => array(\"integer\", $this->getEvent()),\n\t\t\t\"cp_professional_id\" => array(\"integer\", $this->getUser()),\n\t\t\t\"has_participated\" => array(\"integer\", $this->getHasParticipated()),\n\t\t\t\"score_mc\" => array(\"integer\", $this->getScoreMc() * 10),\n\t\t\t\"score_case\" => array(\"integer\", $this->getScoreCase() * 10),\n\t\t\t\"result_mc\" => array(\"integer\", $this->getResultMc()),\n\t\t\t\"result_case\" => array(\"integer\", $this->getResultCase()),\n\t\t\t\"notified_on\" => array(\"timestamp\", $this->getNotifiedOn()),\n\t\t\t\"access_code\" => array(\"text\", $this->getAccessCode()),\n\t\t\t\"scoring_update_user\" => array(\"integer\", $this->getLastScoringUpdateUser())\n\t\t);\n\n\t\t$date = $this->getInvitedOn();\n\t\tif($date && !$date->isNull())\n\t\t{\n\t\t\t$fields[\"invited_on\"] = array(\"timestamp\", $date->get(IL_CAL_DATE, \"\", ilTimeZone::UTC));\n\t\t}\n\t\t\n\t\t$date = $this->getLastScoringUpdate();\n\t\tif($date && !$date->isNull())\n\t\t{\n\t\t\t$fields[\"scoring_update\"] = array(\"timestamp\", $date->get(IL_CAL_DATETIME, \"\", ilTimeZone::UTC));\n\t\t}\n\t\t\n\t\treturn $fields;\n\t}", "public function toString()\n {\n $data = $this->getProperties();\n $out = get_class($this).' ('.CRLF;\n foreach ($data as $key => $value) {\n $type = gettype($value);\n $value = is_bool($value) ? (int) $value : $value;\n $value = is_string($value) ? '\"'.$value.'\"' : $value;\n $value = is_object($value) ? implode(CRLF.TAB, explode(CRLF, (string) $value)) : $value;\n $value = is_array($value) ? print_r($value, true) : $value;\n $out .= TAB.$key.' ('.$type.')';\n $out .= ': '.$value.CRLF;\n }\n\n return $out.');';\n }", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n $context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n $context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.ExternalAccount: ' . implode(' ', $context) . ' ]';\n }", "public function json(): string {\n\t\t$properties = array_filter(get_object_vars($this));\n\n\t\treturn json_encode($properties, JSON_UNESCAPED_SLASHES);\n\t}", "private function createProperties(string $base): string\n {\n return implode(\"\\n\", array_map(function (string $propertyName) use ($base): string {\n $static = Reflection::isPropertyStatic($base, $propertyName) ? 'static' : '';\n $defaultValue = Reflection::encodeValue($this->properties[$propertyName]);\n\n return \"public $static \\$$propertyName = $defaultValue;\";\n }, array_keys($this->properties)));\n }", "protected static function renderFieldProperties(array $properties): string\n {\n $filtered = \\array_filter(\n $properties,\n // Remove any false-like values (empty strings and false booleans) except for integers and floats.\n fn (mixed $value): bool => \\is_int($value) || \\is_float($value) || (\\is_string($value) && $value !== '') || (\\is_bool($value) && $value)\n );\n // Map keys and values together as key=value\n $mapped = \\array_map(\n // Boolean values are replaced with key name: checked => true ---> checked=\"checked\"\n fn (string $key, mixed $value) => \\sprintf('%s=\"%s\"', $key, esc_attr(\\is_bool($value) ? $key : (string) $value)),\n \\array_keys($filtered),\n \\array_values($filtered)\n );\n // Join all properties into single string\n return \\implode(' ', $mapped);\n }", "public function property_snapshot() {\n\n\t\t\t$practice_type = get_field( 'practice_type' );\n\t\t\t$practice_type_label = ( $practice_type != 'other' )\n\t\t\t\t? $practice_type\n\t\t\t\t: get_field( 'other_type' );\n\n\t\t\t$out = '<ul>';\n\t\t\t$out .= '<li><em>Practice Type:</em> ' . $practice_type_label . '</li>';\n\t\t\t$out .= '<li><em>Building Type:</em> ' . get_field( 'building_type' ) . '</li>';\n\t\t\t$out .= '<li><em>Business:</em> ' . get_field( 'practice_is_for' ) . '</li>';\n\t\t\t$out .= '<li><em>Building:</em> ' . get_field( 'realestate_is_for' ) . '</li>';\n\n\t\t\t$valuvet_valuation = ( get_field( 'valuvet_valuation' ) ) ? 'Yes' : 'No';\n\t\t\t$out .= '<li><em>ValuVet Valuation:</em> ' . $valuvet_valuation . ' </li>';\n\n\t\t\t$valuvet_practice_report = ( get_field( 'valuvet_practice_report' ) ) ? 'Yes' : 'No';\n\t\t\t$out .= '<li><em>ValuVet Report:</em> ' . $valuvet_practice_report . ' </li>';\n\n\t\t\t$out .= '</ul>';\n\n\t\t\treturn $out;\n\t\t}", "private function mapProperties(): void\n {\n $this->properties = Collect::keyBy($this->collection->getProperties()->getValues(), 'identifier');\n }", "public function getProperties();", "public function getProperties();", "public function getProperties();", "public function getProperties();", "private function rebuildProperties( $properties ) : string\n\t{\n\t\t$propertiesBin = '';\n\t\t$count = 0;\n\n\t\tforeach( (array) $properties as $property => $data )\n\t\t{\n\t\t\t$propertiesBin .= $this->rebuildProperty( $property, $data );\n\t\t\t$count++;\n\t\t}\n\n\t\t// pad the remaining space\n\t\t$padding = 16 - $count;\n\t\twhile( $padding > 0 )\n\t\t{\n\t\t\t$propertiesBin .= hex2bin( Helper::pad( 56 ) );\n\t\t\t$padding--;\n\t\t}\n\n\t\t// add the property count based on what we've processed,\n\t\t// rather than using the value listed in the instance\n\t\t$hexCount = str_pad( dechex( $count ), 4, '0', STR_PAD_LEFT );\n\t\t$propertiesBin .= hex2bin( Helper::pad( 1 ) . $hexCount . Helper::pad( 6 ) );\n\n\t\treturn $propertiesBin;\n\t}", "public function __toString(){\n\t\t\t$str = \"<br/>\" . strtoupper($this->class);\n\t\t\t$str .= \"<br/>Primary Key(s): \";\n\t\t\tforeach ($this->keys as $key => $value) {\n\t\t\t\t$str .= \"($value => \".$this->$value.\")\";\n\t\t\t}\n\t\t\t$str .= \"<br/>Properties: \";\n\t\t\tforeach ($this->columns as $key => $value) {\n\t\t\t\t$str .= \"($value => \".$this->$value.\")\";\n\t\t\t}\n\t\t\treturn $str;\n\t\t}", "abstract protected function get_properties();", "public function _getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "function getProperties($properties);", "abstract protected function getProperties();", "public function toProp() {\n\t\treturn htmlspecialchars(json_encode($this, true));\n\t}", "abstract public function getProperties();", "public function __toString(){\r\n\t\t$data = array();\r\n\t\t$vars = get_object_vars($this);\r\n\t\tforeach ($vars as $key => $value){\r\n\t\t\tif ($key == '_customFields'){\r\n\t\t\t\tforeach ($this->_customFields as $cfkey => $cfvalue){\r\n\t\t\t\t\t$data[] = 'CF-' . $cfkey . ': ' . $cfvalue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$data[] = $key . ': ' . $value;\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$string = implode(\"\\n\", $data);\r\n\t\treturn $string;\r\n\t}", "public function __toString () {\n\t\t$type = new \\ReflectionClass($this);\n\t\t$allProps = $type->getProperties(\n\t\t\t\\ReflectionProperty::IS_PUBLIC |\n\t\t\t\\ReflectionProperty::IS_PROTECTED |\n\t\t\t\\ReflectionProperty::IS_PRIVATE\n\t\t);\n\t\t$result = [];\n\t\t/** @var \\ReflectionProperty $prop */\n\t\tforeach ($allProps as $prop) {\n\t\t\tif ($prop->isStatic()) continue;\n\t\t\tif ($prop->isPrivate()) $prop->setAccessible(TRUE);\n\t\t\t$value = NULL;\n\t\t\ttry {\n\t\t\t\t$value = $prop->getValue($this);\n\t\t\t\tif ($value instanceof \\MvcCore\\Router) continue;\n\t\t\t} catch (\\Throwable $e) {\n\t\t\t};\n\t\t\t$result[] = '\"' . $prop->getName() . '\":\"' . ($value === NULL ? 'NULL' : var_export($value)) . '\"';\n\t\t}\n\t\treturn '{'.implode(', ', $result) . '}';\n\t}", "function _getProperties() ;", "public function __toString() {\r\n return (string) $this->getMappingValue();\r\n }", "public function getToStringFields()\n {\n $out = array();\n foreach($this->_map as $alias => $options)\n {\n if(!empty($options[self::MAP_TO_STRING]))\n {\n $out[] = $alias;\n }\n }\n return $out;\n }", "abstract protected function properties();", "protected function property_map() { return array(); }", "public function exportProperties()\n\t{\n\t\t$userId=$this->checklogin();\n\t\t$data=$this->ApiModel->getPropertiesData($userId);\n\t\techo json_encode($data); \n\t }", "public function sectionSerialize()\n {\n $templatePrefix = $this->getTranslationTemplate();\n\n $properties = array_combine(\n array_map(function ($k) use ($templatePrefix) {\n return $templatePrefix . $k;\n },\n array_keys(get_object_vars($this))),\n get_object_vars($this)\n );\n return $properties;\n }", "public function __toString()\n {\n return $this->formatAsString();\n }", "public function __toString() {\n\t\t$out = '';\n\t\tforeach($this as $key => $value) {\n\t\t\t$out .= \"\\n\\n$key=$value\";\t\n\t\t}\n\t\t$out = trim($out); \n\t\treturn $out; \n\t}", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\n {\n return $this->format();\n }", "abstract function format();", "public function __debugInfo()\n {\n $properties = $this->_properties;\n foreach ($this->_virtual as $field) {\n $properties[$field] = $this->$field;\n }\n\n return $properties;\n }", "public function __toString(){\n return $this->convert();\n }", "public function propertyInfo() {\n\n /*\n *\n *Table: commerce_order\n Columns:\n order_id\tint(10) UN PK AI\n order_number\tvarchar(255)\n revision_id\tint(10) UN\n type\tvarchar(255)\n uid\t int(11)\n mail\tvarchar(255)\n status\tvarchar(255)\n created\tint(11)\n changed\tint(11)\n hostname varchar(128)\n data\tlongblob\n */\n\n return array(\n 'order_id' => array(\n 'type' => 'int',\n 'label' => t('Order id'),\n ),\n 'order_number' => array(\n 'type' => 'text',\n 'label' => t('Order number'),\n ),\n 'uid' => array(\n 'type' => 'int',\n 'label' => t('User id'),\n ),\n 'mail' => array(\n 'type' => 'text',\n 'label' => t('User email address'),\n ),\n 'customer_profile_id' => array(\n 'type' => 'int',\n 'label' => t('Customer profile id'),\n ),\n 'status' => array(\n 'type' => 'text',\n 'label' => t('Order status'),\n ),\n 'total_amount' => array( // Calculated total in pence\n 'type' => 'int',\n 'label' => t('Total amount'),\n ),\n 'total_currency' => array( // Currency the total is expressed in\n 'type' => 'text',\n 'label' => t('Total currency'),\n ),\n 'created' => array( // Unix timestamp the order was created\n 'type' => 'int',\n 'label' => t('Creation unix timestamp'),\n ),\n 'changed' => array( // Unix timestamp the order was last changed\n 'type' => 'int',\n 'label' => t('last change unix timestamp'),\n ),\n );\n }", "function convert_prop_to_another($prop) {\n if ($prop == 'POSITION.X') {\n $prop = 'coordx';\n } else if ($prop == 'POSITION.Y') {\n $prop = 'coordy';\n } else if ($prop == 'SOURCE') {\n $prop = 'source';\n } else if ($prop == 'DEST') {\n $prop = 'dest';\n } else if ($prop == 'PLACE2TRANS') {\n $prop = 'place2trans';\n } else if ($prop == 'MARKING') {\n $prop = 'marking';\n } else if ($prop == 'VALUE') {\n $prop = 'value';\n }\n return $prop;\n }", "public function __toString()\n {\n return $this->toJson(['pretty' => true]);\n }", "public function makeLabelProperties(array $data)\n {\n $properties = '';\n foreach ($data as $valueId) {\n $prop_val = PropertyValue::find($valueId);\n if ($prop_val) {\n $properties .= $prop_val->value.'/';\n }\n }\n $properties = substr($properties, 0, strlen($properties) - 1);\n return $properties;\n }", "public function __toString()\n {\n return sprintf('%01.4f, %01.4f, %01.4f, %01.4f', $this->cyan, $this->magenta, $this->yellow, $this->key);\n }", "public function toJSON()\n\t{\n\t\t$columns = array();\n\t\t\n\t\t$rf = new ReflectionClass($this);\n\t\t$props = $rf->getProperties();\n\t\tforeach ($props as $prop)\n\t\t{\n\t\t\t$column = AttributeReader::PropertyAttributes($this,$prop->getName())->Column;\n\t\t\t$columns[$column] = $prop->getValue($this);\n\t\t}\n\n\t\treturn json_encode($columns);\n\t}", "protected function renderTrustedPropertiesField() {}", "protected function mapProperties() : void {\n\t\t$this->propertyActions['translate'] = array();\n\t\t$properties = $this->reflectionClass->getProperties();\n\t\tforeach ($properties as $property) {\n\t\t\t$annotation = $this->annotationReader->getPropertyAnnotation($property, 'Henri\\Framework\\Annotations\\Annotation\\DBRecord');\n\t\t\tif (isset($property->name) && $annotation && isset($annotation->name)) {\n\t\t\t\t$this->propertyMap[$property->name] = $annotation->name;\n\n\t\t\t\t$propertyProps = new \\stdClass();\n\t\t\t\t$propertyProps->name = $annotation->name;\n\t\t\t\t$propertyProps->type = isset($annotation->type) && !empty($annotation->type) ? $annotation->type : 'text';\n\t\t\t\t$propertyProps->length = $annotation->length;\n\t\t\t\t$propertyProps->primary = $annotation->primary;\n\t\t\t\t$propertyProps->translate = $annotation->translate;\n\t\t\t\t$propertyProps->empty = $annotation->empty;\n\t\t\t\t$propertyProps->unique = $annotation->unique ?? false;\n\t\t\t\t$this->propertyProps[$property->name] = $propertyProps;\n\t\t\t}\n\n\t\t\tif (isset($property->name) && $annotation && isset($annotation->translate) && !empty($annotation->translate)) {\n\t\t\t\t// Set translate actions\n\t\t\t\t$this->propertyActions['translate'][$property->name] = $annotation->translate;\n\t\t\t}\n\n\t\t\t// Check for primary key\n\t\t\tif (isset($property->name) && $annotation && isset($annotation->primary)) {\n\t\t\t\tif ($annotation->primary && isset($this->primaryKey)) {\n\t\t\t\t\tthrow new Exception('Multiple primary keys found', 500);\n\t\t\t\t}\n\n\t\t\t\tif ($annotation->primary) {\n\t\t\t\t\t$this->primaryKey = $property->name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function formatPropertyName(string $propertyName): string;", "public function __toString() {\n\t\t$str = \"\";\n\t\t$str .= \"EntityMapperClassName: \" . $this->_entityMapperClassName . \"<br />\";\n\t\t$str .= \"EntityRelatedMapperClassName: \" . $this->_entityRelatedMapperClassName . \"<br />\";\n\t\t$str .= \"EntityRelatedPk: \" . $this->_entityRelatedPk. \"<br />\";\t\t\t\n\t\treturn $str;\t\t\t\n\t}", "public function getAllProperties() {\n\t\t$bean = $this->unbox();\n\n\t\t$properties = $this->properties;\n\n\t\t$sourceInstance = $this->getSourceInstance();\n\t\tif ($sourceInstance !== null) {\n\t\t\t$sourceServer = $this->getSourceServer();\n\t\t\tif ($sourceServer !== null) {\n\t\t\t\t$properties = array_merge($properties, $this->addPrefixProperties($sourceServer->box()->getProperties(), 'source'));\n\t\t\t}\n\t\t\t$properties = array_merge($properties, $this->addPrefixProperties($sourceInstance->box()->getProperties(), 'source'));\n\t\t}\n\n\t\t$targetInstance = $this->getTargetInstance();\n\t\tif ($targetInstance !== null) {\n\t\t\t$targetServer = $this->getTargetServer();\n\t\t\tif ($targetServer !== null) {\n\t\t\t\t$properties = array_merge($properties, $this->addPrefixProperties($targetServer->box()->getProperties(), 'remote'));\n\t\t\t}\n\t\t\t$properties = array_merge($properties, $this->addPrefixProperties($targetInstance->box()->getProperties(), 'remote'));\n\t\t}\n\n\t\t// Finally some special \n\t\t$properties['deploymentId'] = $bean->id;\n\t\t$config = Zend_Registry::get('config');\n\t\t$properties['buildscriptDir'] = $config->directories->buildscript;\n\t\treturn $properties;\n\t}", "function properties()\n {\n }", "public function __toString()\n {\n $textLabels = $this->_getTextLabels();\n $out = array();\n\n foreach ($this->_attr as $attr => $value) {\n if (isset($textLabels[$attr])) {\n if (in_array($attr, array(\n self::EXPIRE_MONTH,\n self::EXPIRE_YEAR,\n self::NUMBER\n ))) {\n $out[] = sprintf('%15s %s (Encrypted: %s)',\n $textLabels[$attr] . ':',\n $value,\n substr($this->get($attr, true), 0, 8) . '...'\n );\n } else {\n $out[] = sprintf('%15s %s', $textLabels[$attr] . ':', $value);\n }\n }\n }\n\n return implode(\"\\n\", $out) . \"\\n\";\n }", "public function writeClassProperties($class)\n {\n $text = array();\n \n $list = array(\n 'public' => array(),\n 'protected' => array(),\n 'private' => array(),\n );\n \n // collect properties into the list by access/visibility\n foreach ($this->api[$class]['properties'] as $name => $info) {\n \n $tmp = array();\n \n // header\n $tmp[] = $this->_title3(\"`\\$$name` {#class.$class.Properties.$name}\");\n \n // summary\n $tmp[] = '_(' . ($info['static'] ? 'static ' : '')\n . $info['type'] . ')_ '\n . $info['summ'];\n $tmp[] = '';\n \n // inherited?\n if ($info['from']) {\n $tmp[] = \"Inherited from [[{$info['from']}::\\$$name | {$info['from']}]].\";\n $tmp[] = '';\n }\n \n // narrative\n if ($info['narr']) {\n $tmp[] = $info['narr'];\n $tmp[] = '';\n }\n \n // save in the list\n $list[$info['access']][] = implode(\"\\n\", $tmp);\n }\n \n // now collapse the list into a single series\n foreach ($list as $access => $properties) {\n \n $text[] = $this->_title2(ucfirst($access));\n \n if ($properties) {\n $text = array_merge($text, $properties);\n } else {\n $text[] = 'None.';\n $text[] = '';\n }\n \n $text[] = '';\n }\n \n $this->_write(\"class\", \"$class/Properties\", $text);\n }", "function get_properties()\r\n {\r\n return $this->properties;\r\n }", "protected function clean_properties(){\n\t\tglobal $database;\n\t\t$clean_properties = array();\n\t\tforeach($this->properties() as $key => $value){\n\t\t\t$clean_properties[$key]=$database->escape_string($value);\t\n\t\t}\n\t\treturn $clean_properties;\t\n\t}", "public function __toString()\n\t{\n\t\t$ret = get_called_class().'( ';\n\t\t$t = 0;\n\t\tforeach (get_object_vars($this) as $k => $v)\n\t\t{\n\t\t\tif ($k[0] == '_')\n\t\t\t{\n\t\t\t\t$key = substr($k, 1);\n\t\t\t\tif (method_exists(get_called_class(),\n\t\t\t\t\t\t($funname = 'get'.ucfirst(substr($k, 1)))))\n\t\t\t\t\t\t\t$val = $this->$funname();\n\t\t\t\telse\n\t\t\t\t\t$val = $v;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$val = $v;\n\t\t\t\t$key = $k;\n\t\t\t}\n\t\t\t$key .= ':';\n\t\t\tif (gettype($val) == \"array\")\n\t\t\t\t$str = str_replace(\" \", \"\", str_replace(\"\\n\", \"\", var_export($val, true)));\n\t\t\telse if (gettype($val) == \"double\")\n\t\t\t\t$str = sprintf(\"%.2f\", $val);\n\t\t\telse if (is_a($val, \"Color\") or ($val == null and $k === \"_color\"))\n\t\t\t{\n\t\t\t\tif (!self::$verbose or $val == null)\n\t\t\t\t\tcontinue ;\n\t\t\t\t$str = $val;\n\t\t\t\t$key = '';\n\t\t\t}\n\t\t\telse\n\t\t\t\t$str = var_export($val, true);\n\t\t\tif ($t)\n\t\t\t\t$ret .= \", \";\n\t\t\telse\n\t\t\t\t$t = 1;\n\t\t\t$ret .= $key.$str;\n\t\t}\n\t\t$ret .= ' )';\n\t\treturn $ret;\n\t}", "public function __toString() {\n\t\treturn sprintf(\"%s: %s\", $this->getName(), $this->getValue());\n\t}", "public function properties(){\n \t\treturn CMap::mergeArray(\n \t\t\tparent::properties(),\n \t\t\tarray(\n\t\t\t\t'inboundMessageID' => array('type' => 'string'),\n\t\t\t\t'sourceAddress' => array('type' => 'string'),\n\t\t\t\t'messageContent' => array('type' => 'string'),\n\t\t\t\t'externalTransactionID' => array('type' => 'string'),\n\t\t\t\t'status' => array('type' => 'string'),\n\t\t\t\t'dateCreated' => array('type' => 'string'),\n\t\t\t\t'dateModified' => array('type' => 'string'),\n \t\t\t)\n \t\t);\n \t}", "public function properties() {\n $properties = clone($this->properties);\n if ($this->answers === null) {\n $this->get_answers();\n }\n if (count($this->answers)>0) {\n $count = 0;\n foreach ($this->answers as $answer) {\n $properties->{'answer_editor['.$count.']'} = array('text'=>$answer->answer, 'format'=>$answer->answerformat);\n $properties->{'response_editor['.$count.']'} = array('text'=>$answer->response, 'format'=>$answer->responseformat);\n $properties->{'jumpto['.$count.']'} = $answer->jumpto;\n $properties->{'score['.$count.']'} = $answer->score;\n $count++;\n }\n }\n return $properties;\n }", "private function parseProperties(): void\n {\n $properties = $this->extractProperties();\n\n foreach ($properties as $property)\n {\n if ($property['docblock']===null)\n {\n $docId = null;\n }\n else\n {\n $docId = PhpAutoDoc::$dl->padDocblockInsertDocblock($property['docblock']['doc_line_start'],\n $property['docblock']['doc_line_end'],\n $property['docblock']['doc_docblock']);\n }\n\n PhpAutoDoc::$dl->padClassInsertProperty($this->clsId,\n $docId,\n $property['name'],\n Cast::toManInt($property['is_static']),\n $property['visibility'],\n $property['value'],\n $property['start'],\n $property['end']);\n }\n }", "public function __toString()\n {\n return $this->toFormattedString();\n }", "function getPropertiesTemplate() {\n return ' public ${{PROPERTY_NAME}};\n';\n}", "protected function properties()\n {\n return [\n 'mount_point' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE_DRIVELETTER',\n C__PROPERTY__INFO__DESCRIPTION => 'Driveletter'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__driveletter'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_LETTER'\n ]\n ]\n ),\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_TITLE'\n ]\n ]\n ),\n 'system_drive' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__SYSTEM_DRIVE',\n C__PROPERTY__INFO__DESCRIPTION => 'System drive'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__system_drive'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__DRIVE__SYSTEM_DRIVE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO()),\n 'p_bDbFieldNN' => 1\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'filesystem' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'isys_filesystem_type',\n C__PROPERTY__INFO__DESCRIPTION => 'Filesystem'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_filesystem_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_filesystem_type',\n 'isys_filesystem_type__id',\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_FILESYSTEM',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_filesystem_type'\n ]\n ]\n ]\n ),\n 'capacity' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB_CATG__MEMORY_CAPACITY',\n C__PROPERTY__INFO__DESCRIPTION => 'Capacity'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__capacity'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_CAPACITY',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'capacity_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'c_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'serial' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__SERIAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Serial number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__serial'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_SERIAL'\n ]\n ]\n ),\n 'assigned_raid' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD_DRIVE_TYPE__RAID_GROUP',\n C__PROPERTY__INFO__DESCRIPTION => 'Software RAID group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__id__raid_pool',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_raid_list',\n 'isys_catg_raid_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_RAIDGROUP',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_assigned_raid'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => true,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'drive_type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Typ'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catd_drive_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catd_drive_type',\n 'isys_catd_drive_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_TYPE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ]\n ]\n ),\n 'device' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_stor_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_stor_list',\n 'isys_catg_stor_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'raid' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device Raid-Array'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_raid_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_raid_list',\n 'isys_catg_raid_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'ldev' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device Logical devices (Client)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_ldevclient_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_ldevclient_list',\n 'isys_catg_ldevclient_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'category_const' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__OBJTYPE__CONST',\n C__PROPERTY__INFO__DESCRIPTION => 'Constant'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__const'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__CATEGORY_CONST'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ]\n ]\n ),\n 'free_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__FREE_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Free space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__free_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__FREE_SPACE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'free_space_unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'free_space_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__free_space__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'free_space_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'fs_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__FREE_SPACE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'used_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__USED_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Free space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__used_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__USED_SPACE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'used_space_unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'used_space_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__used_space__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'used_space_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'us_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__USED_SPACE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__DRIVE\n ]\n ]\n )\n ];\n }", "function dump() {\n\t\t$vars = get_object_vars( $this );\n\t\techo '<pre style=\"text-align:left\">';\n\t\tforeach( $vars as $name => $value ) {\n\t\t\techo $name.': '.$value.\"\\n\";\n\t\t}\n\t\techo '</pre>';\n\t}", "public function glitchDump(): iterable\n {\n yield 'properties' => [\n '*name' => $this->_name,\n '*value' => $this->_value,\n '*icon' => $this->_icon,\n '%tag' => $this->getTag(),\n '*disposition' => $this->getDisposition()\n ];\n\n yield 'value' => $this->_body;\n }", "public static function getProperties()\n {\n return [\n 'Description' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Note' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Code' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Billable' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Quantity' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'UnitCost' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'UnitPrice' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'Amount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'AmountTax' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'AmountIncludingTax' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n ];\n }", "#[Pure] public function __toString(): string\n {\n return $this -> name . \"=\" . $this->get_values();\n }", "protected function properties()\n {\n return [\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__TITLE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__IMPORT => false,\n C__PROPERTY__PROVIDES__EXPORT => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ]\n ]\n ),\n 'type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Type'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__isys_net_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_net_type',\n 'isys_net_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__TYPE',\n C__PROPERTY__UI__PARAMS => [\n 'p_bDisabled' => '1',\n 'p_strTable' => 'isys_net_type',\n 'p_bDbFieldNN' => '1'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'address' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__NET_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_bReadonly' => '',\n 'p_strClass' => 'input input-mini'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'netmask' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__MASK',\n C__PROPERTY__INFO__DESCRIPTION => 'Netmask'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__mask'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__MASK_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input input-mini',\n 'p_bReadonly' => ''\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'gateway' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DEF_GW',\n C__PROPERTY__INFO__DESCRIPTION => 'Default Gateway'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__isys_catg_ip_list__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DEF_GW_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_s_net',\n 'callback_property_gateway'\n ]\n )\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_gateway'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'range_from' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_FROM',\n C__PROPERTY__INFO__DESCRIPTION => 'DHCP from'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address_range_from'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__ADDRESS_RANGE_FROM'\n ]\n ]\n ),\n 'range_to' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_TO',\n C__PROPERTY__INFO__DESCRIPTION => 'DHCP to'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address_range_to'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__ADDRESS_RANGE_TO'\n ]\n ]\n ),\n 'dns_server' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DNS_SERVER',\n C__PROPERTY__INFO__DESCRIPTION => 'DNS server'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_net_list_2_isys_catg_ip_list',\n 'isys_cats_net_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DNS_SERVER'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_net_dns_server'\n ]\n ]\n ]\n ),\n 'dns_domain' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::multiselect(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DNS_DOMAIN',\n C__PROPERTY__INFO__DESCRIPTION => 'Domain / DNS namespace'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__id',\n C__PROPERTY__DATA__TABLE_ALIAS => 'dns_domain',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_net_list_2_isys_net_dns_domain',\n 'isys_cats_net_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DNS_DOMAIN',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_net_dns_domain',\n 'placeholder' => _L('LC__CMDB__CATS__NET__DNS_DOMAIN'),\n 'emptyMessage' => _L('LC__CMDB__CATS__NET__NO_DNS_DOMAINS_FOUND'),\n 'p_onComplete' => \"idoit.callbackManager.triggerCallback('cmdb-cats-net-dns_domain-update', selected);\",\n 'multiselect' => true\n //'p_arData' => new isys_callback(array('isys_cmdb_dao_category_s_net', 'callback_property_dns_domain'))\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__VALIDATION => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ],\n C__PROPERTY__CHECK => [\n C__PROPERTY__CHECK__MANDATORY => false,\n C__PROPERTY__CHECK__VALIDATION => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'dialog_multiselect'\n ]\n ]\n ]\n ),\n 'cidr_suffix' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__CIDR_SUFFIX',\n C__PROPERTY__INFO__DESCRIPTION => 'CIDR-Suffix'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__cidr_suffix'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__CIDR',\n C__PROPERTY__UI__PARAMS => [\n 'p_bReadonly' => '',\n 'p_strClass' => 'input input-mini'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'reverse_dns' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATS__NET__REVERSE_DNS',\n C__PROPERTY__INFO__DESCRIPTION => 'Reverse dns'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__reverse_dns'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__REVERSE_DNS'\n ]\n ]\n ),\n 'layer2_assignments' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__LAYER2_NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Layer-2-net assignments'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__LAYER2',\n C__PROPERTY__UI__PARAMS => [\n isys_popup_browser_object_ng::C__TITLE => 'LC__BROWSER__TITLE__NET',\n isys_popup_browser_object_ng::C__MULTISELECTION => true,\n isys_popup_browser_object_ng::C__CAT_FILTER => 'C__CATS__LAYER2_NET'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'layer_2_assignments'\n ]\n ]\n ]\n ),\n 'address_v6' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::virtual(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net v6'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__NET_V6'\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_SPECIFIC . C__CATS__NET\n ]\n ]\n )\n ];\n }", "protected function dynamic_properties()\n {\n return [\n '_address_range' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_RANGE',\n C__PROPERTY__INFO__DESCRIPTION => 'Address range'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__id'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_address_range'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true,\n C__PROPERTY__PROVIDES__REPORT => true\n ]\n ],\n '_address_with_suffix' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_WITH_SUFFIX',\n C__PROPERTY__INFO__DESCRIPTION => 'Net address with suffix'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__id'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_address_with_suffix'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true,\n C__PROPERTY__PROVIDES__REPORT => true\n ]\n ],\n '_address' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net address'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_address'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true\n ]\n ],\n '_free_addresses' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__NETWORK__ASS_IP',\n C__PROPERTY__INFO__DESCRIPTION => 'Assigned addresses and free addresses'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__id'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_free_addresses'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true,\n C__PROPERTY__PROVIDES__REPORT => true\n ]\n ],\n '_netmask' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATP__IP__SUBNETMASK',\n C__PROPERTY__INFO__DESCRIPTION => 'Subnetmask'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_netmask'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true\n ]\n ],\n '_layer2_assignments' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__LAYER2_NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Layer-2-net assignments'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_layer2_assignment'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true\n ]\n ]\n ];\n }", "public function __toString()\n {\n return sprintf('%s, %s', $this->toDMS(static::LATITUDE), $this->toDMS(static::LONGITUDE));\n }", "public function viewProperties()\n\t{\n\t\tif (!empty($this->_userdata)) {\n\t\t\treturn array_keys($this->_userdata);\n\t\t}\n\t}", "public function get_field_properties() {\n return array(PARAM_RAW, NULL_NOT_ALLOWED);\n }", "abstract public function getRawAdditionalProperties();", "public function __toString() {\n $fields = $this->fields();\n return implode(', ', array_keys($fields));\n }", "public function properties() { }", "public function __toString()\n\t{\n\t\t$string = '[line]: ' . $this->line . \"\\n\";\n\t\t$string .= '[type]: ' . $this->typeToString($this->type) . \"\\n\";\n\t\t$string .= '[value]: ' . $this->value . \"\\n\";\n\t\treturn $string;\n\t}", "public function clean_properties(){\n global $database;\n $clean_properties = array();\n foreach ($this->properties() as $key =>$value){\n $clean_properties[$key] =$database->escape_string($value);\n }\n \n return $clean_properties ; \n }", "public function nodeProperties()\n {\n return\n 'Base URI: ' . $this->baseURI . PHP_EOL\n . 'Namespace URI: ' . $this->namespaceURI . PHP_EOL\n . 'Name: ' . $this->name . PHP_EOL\n . 'Local Name: ' . $this->localName . PHP_EOL\n . 'Prefix: ' . $this->prefix . PHP_EOL\n . 'XML Language: ' . $this->xmlLang . PHP_EOL\n \n . 'Node Type: ' . $this->nodeType() . PHP_EOL\n . 'Depth: ' . $this->depth . PHP_EOL\n . 'Value: ' . $this->value . PHP_EOL\n . 'Is Empty Element: ' . ($this->isEmptyElement ? 'Yes' : 'No') . PHP_EOL\n \n . 'Attributes: ' . $this->attributeCount . PHP_EOL\n . 'Is attribute defaulted from DTD: ' . ($this->isDefault ? 'Yes' : 'No') . PHP_EOL\n ;\n }", "public function glitchDump(): iterable\n {\n yield 'properties' => [\n '*adapter' => $this->_adapter->getDsn()->getDisplayString(),\n '*name' => $this->_name\n ];\n }", "public function __toString()\r\n {\r\n return $this->getFormattedString();\r\n }", "public function getToStringFormat()\n {\n return $this->_to_string_format;\n }", "private function _property(EntityProperty $property) {\n static $marks = [\n Flags::IS_STATIC => \"ZEND_ACC_STATIC\",\n Flags::IS_PUBLIC => \"ZEND_ACC_PUBLIC\",\n Flags::IS_PROTECTED => \"ZEND_ACC_PROTECTED\",\n Flags::IS_PRIVATE => \"ZEND_ACC_PRIVATE\"\n ];\n $flags = [];\n foreach($marks as $mark => $flag) {\n if($property->flags & $mark) {\n $flags[] = $flag;\n }\n }\n $flags = implode(\" | \", $flags);\n switch($property->type) {\n case Types::INT:\n return \"REGISTER_CLASS_LONG_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n case Types::STRING:\n return \"REGISTER_CLASS_STRING_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \\\"\".addslashes($property->value).\"\\\", {$flags});\";\n case Types::BOOLEAN:\n return \"REGISTER_CLASS_BOOL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \".intval($property->value).\", {$flags});\";\n case Types::NIL:\n return \"REGISTER_CLASS_NULL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$flags});\";\n case Types::DOUBLE:\n return \"REGISTER_CLASS_DOUBLE_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n default:\n throw new \\LogicException(\"Unknown type $property\");\n }\n }", "public function format(): array\n {\n $result[self::FROM_EMAIL_KEY] = $this->fromEmail;\n\n return array_merge($result, $this->optionalProperties);\n }", "public function properties() {\n return CMap::mergeArray(parent::properties(), array(\n 'userID' => array('type' => 'integer'),\n 'userName' => array('type' => 'string'),\n 'firstName' => array('type' => 'string'),\n 'lastName' => array('type' => 'string'),\n 'emailAddress' => array('type' => 'string'),\n 'phoneNumber' => array('type' => 'string'),\n 'fk_status_userName' => array('type' => 'string'),\n 'group' => array('type' => 'string')\n ));\n }", "public static function getProperties()\n {\n return [\n 'id' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'endDate' => [false, self::PROPERTY_TYPE_DATE, null, false, false],\n 'startDate' => [true, self::PROPERTY_TYPE_DATE, null, false, false],\n 'status' => [true, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'price' => [true, self::PROPERTY_TYPE_OBJECT, '\\\\Price', false, false],\n 'product' => [true, self::PROPERTY_TYPE_OBJECT, '\\\\Product', false, false],\n ];\n }", "public function toString() {\n $s= $this->getClassName().'@('.$this->hashCode().\"){\\n\";\n $s.= ' [ name ] '.$this->name.\"\\n\";\n $s.= ' [ value ] '.$this->value.\"\\n\";\n $s.= ' [ mustUnderstand ] '.xp::stringOf($this->mustUnderstand).\"\\n\";\n $s.= ' [ encodingStyle ] '.$this->encodingStyle.\"\\n\";\n $s.= ' [ actor ] '.$this->actor.\"\\n\";\n return $s.'}';\n }", "protected function cleanProperties()\n {\n global $database;\n\n $clean_properties = array();\n\n foreach ($this->properties() as $key => $value) {\n $clean_properties[$key] = $database->escapeString($value);\n }\n\n return $clean_properties;\n }", "protected function cleanProperties()\n {\n global $database;\n\n $clean_properties = array();\n\n foreach ($this->properties() as $key => $value) {\n $clean_properties[$key] = $database->escapeString($value);\n }\n\n return $clean_properties;\n }", "public function format()\n {\n return json_decode($this->renderer->format(), false, JSON_FORCE_OBJECT);\n }", "public function __toString()\n {\n return $this->toSpec($this);\n }", "public function getPropertiesPreview() {\n return '';\n }", "public function glitchDump(): iterable\n {\n yield 'properties' => [\n 'context' => $this->context,\n '*record' => $this->record\n ];\n }", "protected function convertPropertiesToPost($properties) {\n\t\t$values = array();\n\t\tforeach ($properties as $label => $selected_columns) {\n\t\t\t$column = array_fill_keys(explode(',', $selected_columns), TRUE);\n\t\t\t$column['label'] = $label;\n\t\t\t$values[] = $column;\n\t\t}\n\n\t\treturn $values;\n\t}", "public function toString()\n {\n $this->assertEquals(\"net::stubbles::reflection::stubReflectionProperty[stubTestProperty1::property] {\\n}\\n\", (string) $this->stubRefProperty);\n }" ]
[ "0.72282624", "0.6855619", "0.61226815", "0.6121844", "0.61191076", "0.59410983", "0.5923699", "0.5903417", "0.58522", "0.58451563", "0.5842588", "0.57968414", "0.5749228", "0.5724867", "0.5724867", "0.5724867", "0.5724867", "0.57176745", "0.57111925", "0.565434", "0.56209326", "0.5593199", "0.5592813", "0.5592813", "0.5592813", "0.5573459", "0.5563384", "0.55626255", "0.55519134", "0.5543239", "0.553128", "0.55281085", "0.55008596", "0.54886603", "0.5485723", "0.54776955", "0.5463931", "0.543901", "0.54363406", "0.54324245", "0.5429313", "0.5429313", "0.5429313", "0.537711", "0.5366256", "0.5343599", "0.5334552", "0.53213376", "0.5311302", "0.5303646", "0.52900124", "0.5282304", "0.52755463", "0.52660406", "0.5259226", "0.52528304", "0.52416474", "0.5238212", "0.5229425", "0.5203686", "0.51892215", "0.5185976", "0.51842993", "0.5181118", "0.5162795", "0.5154101", "0.51535094", "0.5151002", "0.51441485", "0.51268786", "0.5125169", "0.51226795", "0.51174635", "0.51167494", "0.5115809", "0.5097541", "0.50969636", "0.50913197", "0.5076968", "0.50647813", "0.506367", "0.50531065", "0.504734", "0.5046664", "0.5036827", "0.50361234", "0.5035834", "0.50336206", "0.5030942", "0.5029983", "0.50234634", "0.5022704", "0.5022599", "0.5016665", "0.5016665", "0.501261", "0.50117654", "0.5010865", "0.50108474", "0.5010098", "0.50075203" ]
0.0
-1
Get the users from the database and store them locally
private function setUsers(): void { // They only need to be loaded once if (!empty($this->users)) { return; } /** @var Customer $customer */ $customer = $this->collection->getApplicationVersion()->getApplication()->getCustomer(); // Get the users for the created_at and updated_at attributes $userRepository = $this->entityManager->getRepository(User::class); $this->users = $userRepository->findAllByCustomer($customer, true, [ 'user.id', 'user.firstName AS first_name', 'user.insertion', 'user.lastName AS last_name', 'CASE WHEN (user.insertion IS NULL OR user.insertion = \'\') THEN CONCAT(user.firstName, \' \', user.lastName) ELSE CONCAT(user.firstName, \' \', user.insertion, \' \', user.lastName) END AS full_name', 'user.createdAt AS created_at', 'user.updatedAt AS updated_at', ]); // Map the users array so that the ID is key $this->users = Collect::keyBy($this->users, 'id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveAllUsers () {\n return $this->usersDB;\n }", "private function get_user_data()\n {\n $sql_query = \"select * from users\";\n $users = DB::select($sql_query);\n return $users;\n }", "function getUsers() {\n\t\t$users = json_decode(\n\t\t\t\t\tfile_get_contents(\"data/users.json\"),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\treturn $users;\n\t}", "function getUsers(){\n\t\t$this->users = $this->fileHandler->parseRows($this->userFile, '^', '|');\n\t\t$this->logMsg(SUCCESS, 'users generated');\n\t}", "public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }", "public function listUsers()\n {\n global $db;\n $user_db_data = array();\n $cache = Cache::getInstance();\n // $cache->flush();\n if($cache->exists(\"user_info_data\"))\n {\n $user_db_data = $cache->get(\"user_info_data\");\n } else { \n $e = $db->prepare(\"SELECT * FROM user_info\");\n $e->execute();\n $user_data = $e->fetchAll(); \n // cache will clear in every 1 min.\n $cache->set(\"user_info_data\", $user_data, 60 * 60 * 0.1);\n $user_db_data = $user_data;\n }\n return $user_db_data;\n }", "public function getUsers(){\n\t\t\t$users = $this->db->get(\"users\");\n\t\t\treturn $users;\n\t\t}", "public function getUsers();", "public function getUsers();", "public function getUsers();", "function get_users()\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$query = $db->query(\"SELECT * FROM users\");\n\t\t\n\t\treturn $db->results($query);\n\t}", "function getUsers(){\n $this->users = array();\n foreach($this->userIds as $userId){\n array_push($this->users, new user($userId));\n }\n }", "public function getUsers(){\n try{\n $this->openDatabase();\n $query=$this->database->prepare(\"SELECT * FROM users\");\n $query->execute();\n $result=$query->get_result();\n $query->close();\n $this->closeDatabase();\n return $result;\n }\n catch(Exception $exception){\n $this->closeDatabase();\n\t\t\t\tthrow $exception;\n }\n }", "function getUsers(){\n }", "function getUsers(){\n }", "private function loadUsers() {\n\t\t\n\t\t\t$sql = \"SELECT usr_id FROM usr_cmp WHERE cmp_id='$companyID'\";\n\t\t\t\n\t\t\t$rawResult = $gremlin->query($sql);\n\t\t\t\n\t\t\tforeach($rawResult as $newCont) {\n\t\t\t\n\t\t\t\t$newUser = new User($newCont);\n\t\t\t\n\t\t\t\t$this->usersInCompany[] = $newUser;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "public function getUsers()\n {\n $stmt = $this->DB->prepare(\"select user, hash from users\");\n $stmt->execute();\n // fetchall returns all records in the set as an array\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getUsers()\n {\n $st = $this->execute('SELECT * FROM '. self::$prefix .'user ORDER BY `userid`;');\n\n $rs = $st->fetchAll(PDO::FETCH_ASSOC);\n\n $users = array();\n foreach($rs AS $row) {\n $user = new sspmod_janus_User($this->_config->getValue('store'));\n $user->setUid($row['uid']);\n $user->load();\n $users[] = $user;\n }\n \n return $users;\n }", "public static function getUsers(){\n return DB::table('users')->get();\n }", "function d4os_io_db_070_os_user_load_all() {\n $users = array();\n d4os_io_db_070_set_active('os_robust');\n $result = db_query(\"SELECT *, ua.FirstName AS username, ua.LastName AS lastname, ua.PrincipalID AS UUID, ua.Email AS email, CONCAT_WS(' ', FirstName, LastName) AS name FROM {UserAccounts} AS ua\");\n while ($user = db_fetch_object($result)) {\n $users[] = $user;\n }\n d4os_io_db_070_set_active('default');\n return $users;\n}", "function getUsers()\n {\n $sql = \"SELECT * FROM \" . DB_NAME . \".`customers`\";\n\n try {\n $result = $this->connexion->prepare($sql);\n $var = $result->execute();\n $users = [];\n\n while ($data = $result->fetch(PDO::FETCH_OBJ)) {\n $user = new UserEntity();\n $user->setIdUser($data->idUser);\n $user->setNom_societe($data->Nom_societe);\n $user->setAbreviations($data->Abreviations);\n $user->setAdresse($data->Adresse);\n $user->setTel($data->Tel);\n $user->setEmail($data->Email);\n $user->setSecteur($data->Secteur);\n $user->setCreatedAt($data->createdat);\n\n $users[] = $user;\n }\n\n if ($users) {\n return $users;\n } else {\n return FALSE;\n }\n } catch (PDOException $th) {\n return NULL;\n }\n }", "function saveUsers() {\n\tglobal $users;\n\t\n\tfile_put_contents(\"users.json\",json_encode($users));\n}", "static function getUsers()\n\t{\n\t\t$dataBase = self::dbConnect();\n\t\t$request = $dataBase->query('SELECT login, email FROM users');\n\n\t\treturn $request;\n\t}", "public function getUsers()\n {\n $users = [];\n $request = $this->_db->query('SELECT * FROM user');\n while ($data = $request->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new User($data);\n }\n return $users;\n }", "function getUser()\r\n {\r\n $users = file_get_contents('storage/users.json');\r\n return json_decode($users);\r\n }", "public function getUsers()\n {\n $sql = \"SELECT * FROM users\";\n return $this->get($sql, array());\n }", "public function getAllUsers()\n {\n $result = self::$dbInterface -> query(\"SELECT userID, userName, email FROM user\");\n return $result;\n }", "function fetchUsers()\r\n {\r\n $users = $this->DB->database_select('users', array('username', 'uid'));\r\n return $users;\r\n }", "public function getUsers() {\n $userDAO = new UserDAO();\n return $userDAO->retrieveUsers();\n }", "function get_users()\n {\n //Unimplemented\n }", "public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }", "public function getUsers() {\n \n // Call getAllUsers method in userDataService and set to variable\n $users = $this->getAllUsers();\n \n // Return array of users\n return $users;\n }", "function getUsers() {\n\t\t$dbObject = getDatabase();\n\t\t\n\t\t// now the sql again\n\t\t$sql = \"select users_username from users\";\n\t\t\n\t\t// run the query\n\t\t$result = $dbObject->query($sql);\n\t\t\n\t\t// iterate over the results - we expect a simple array containing\n\t\t// a list of usernames\n\t\t$i = 0;\n\t\t$users = array();\n\t\tforeach($result as $row) {\n\t\t\t$users[$i] = $row[\"username\"];\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t// now return the list\n\t\treturn $users;\n\t}", "public function getUsers() {\n $user= \\DB::table('users')\n ->pluck('name', 'id');\n return $user;\n \n \n }", "public function getAllUsers(){\n\t\n\t\t$db = new Database();\n\t\t$conn= $db->getConn();\n\t\t$rs = $conn->query(\"select * from login\");\n\t\t$num_of_row = $rs->num_rows;\n\t\tif($num_of_row >0){\n\t\t\twhile($row = $rs->fetch_assoc()){\n\t\t\t\t$users[]=array('username'=>$row['username'],'password'=>sha1($row['password']),'email'=>$row['email'],'user_type'=>$row['user_type']);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $users;\n\t}", "public static function getAllUsers() {\r\n // Create a User object\r\n $user = new User();\r\n // Return an array of user objects from the database, ordered by firstname\r\n return $user->getCollection([\"ORDER\" => ['firstname' => 'ASC']]);\r\n }", "function getUser(){\n $db=new connect();\n $select=\"select * from users\";\n return $db->getList($select);\n }", "public function getUsers() {\n $this->checkValidUser();\n\n $this->db->sql = 'SELECT id, username FROM '.$this->db->dbTbl['users'].' ORDER BY username';\n\n $res = $this->db->fetchAll();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdop6'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'ffUI8',\n 'users' => $res\n );\n }\n\n $this->renderOutput();\n }", "public static function getUsers()\n {\n $users = DB::table('users')->get();\n return $users;\n }", "public static function getUsers() {\n return json_decode(file_get_contents(self::$usersFile));\n }", "public function getAllUsers() {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->getAllUsers();\n }", "function load_users()\n {\n $query = $this->db->query('SELECT `id`,`login_id`,`user_name`,`org`,`hash` FROM `user`');\n $uarray = array();\n foreach ( $query->result_array() as $user )\n {\n \t$uarray[$user['id']] = $user;\n }\n\n return $uarray;\n }", "public function findUsers();", "public function findUsers();", "public function getUsers()\n\t{\t\n\t\t//Prepare the statement...\n\t\t$stmt = $this->database->prepare(\"SELECT * FROM \" . self::$table);\n\t\tif ($stmt === FALSE) {\n\t\t\tthrow new Exception($this->database->error);\n\t\t}\n\n\t\t//Execute and bind with params.\n\t\t$stmt->execute();\n\t \t\n\t $stmt->bind_result($id, $userName, $password);\n\n\t /*Iterates through result, creates and adds user(s)\n\t\t* to user catalog.\n\t\t*/\n\t while ($stmt->fetch())\n\t {\t\n\t \t$user = new User($userName, $password,$id);\n\t \t$this->userCatalog->add($user);\n\t\t}\n\n\t\treturn $this->userCatalog;\t\n\t}", "function getUsers() {\n\t$connection = dbConnect();\n\t$sql = \"SELECT * FROM `users`\";\n\t$statement = $connection->query( $sql );\n\n\treturn $statement->fetchAll();\n}", "public function user_getAll(){\n\n if( $stmt = $this->connection->prepare(\"SELECT user_id, email, name, level, phone FROM users ORDER BY name ASC\") ){\n $stmt->execute();\n $stmt->bind_result($user_id, $email, $name, $level, $phone);\n \n $results = array();\n while( $stmt->fetch() ){\n $User = new User($user_id, $email, $name, $level, $phone);\n $results[] = $User;\n } \n \n $stmt->close();\n return $results;\n }\n return null;\n \n }", "function getUsers()\n\t{\n\t\t// Lets load the files if it doesn't already exist\n\t\tif (empty($this->_users))\n\t\t{\n\t\t\t$query = $this->_buildQueryUsers();\n\t\t\t$this->_users = $query === false\n\t\t\t\t? array()\n\t\t\t\t: $this->_getList($query);\n\t\t}\n\n\t\treturn $this->_users;\n\t}", "public static function getUsers() {\n\t\t$res = self::$db->query(\"SELECT id, email, username, logins, last_login FROM `\".self::$users_tbl.\"` ORDER BY username\");\n\t\t$row = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $row;\n\t}", "public static function retrieveAllUsers() {\n return R::getAll('SELECT * FROM user');\n }", "public function getAllUsers()\n {\n return \"users from mongo\";\n }", "public function getUsers()\n {\n if (empty($this->users)) {\n $this->setUsers();\n }\n }", "public function GetAllUsers()\n {\n $data = $this->db()->run(\"SELECT * FROM users\")->fetchall(PDO::FETCH_ASSOC);\n return $data;\n }", "public function getAllUsers()\n {\n // Connect to db\n $user = new User();\n $user->setDb($this->di->get(\"db\"));\n // Get users from db\n $users = $user->findAll();\n return $users;\n }", "function getSignupUsers() {\n\t$result = mysql_query(\"SELECT * FROM customer\");\n\t$ret = array();\n\twhile ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\n\t array_push($ret, $row);\n\t}\n\n\tmysql_free_result($result);\n\treturn $ret;\n}", "public function getAllUsers() {\n $sql = \"SELECT `pk_users`, `name_users`, `password_users`, `mail_users`, `symbol_users`, `first_name_users`, `last_name_users` FROM `users`\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}", "public function get_users()\n\t{\n\t\t$sql=\"SELECT * FROM waf_users WHERE 1=1\";\n\t\t$result=$this->db->LIST_Q($sql);\n\t\treturn $result;\n\t}", "public function allUsers()\n {\n // $sql = 'SELECT * FROM '.$db_name;\n return $this->queryAll();\n }", "public function getList() {\n //Retourne la liste de tous les users\n $users = [];\n $requsers = $this->db->query('SELECT * FROM user');\n\n while ($data = $requsers->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new user($data);\n }\n\n return $users;\n }", "public function getUsers() {\n $sql = \"SELECT * from usertable\";\n foreach (parent::$this->db_connect->query($sql) as $row) {\n $dataSet[] = new user_model($row);\n }\n\n if (!empty($dataSet))\n return $dataSet;\n else\n return null;\n }", "protected function GetAllUsers()\r\n {\r\n $sql = \"SELECT * FROM `users`\";\r\n $result = $this->connect()->query($sql);\r\n $rows = $result->num_rows;\r\n\r\n if ($rows > 0) {\r\n while ($row = $result->fetch_assoc()) {\r\n $data[] = $row;\r\n }\r\n\r\n return $data;\r\n } else {\r\n echo \"No results found!\";\r\n }\r\n }", "public function getUsers(){\n\t\t$query = $this->db->get('users');\n\t\treturn $query->result_array();\n\t}", "public function getUsers(){\n $sql=\"SELECT * FROM users\";\n $select=parent::connect_db()->prepare($sql);\n $select->execute();\n if($select->rowCount() > 0):\n return $select->fetchAll(\\PDO::FETCH_ASSOC);\n //return $results;\n else:\n return [];\n endif;\n }", "public function setUsers()\n {\n $userId = $this->userId;\n\n $userModel = \\config('mail-digester.users', 'App\\User');\n\n $this->users = $userModel::where(function ($query) use ($userId) {\n if (!empty($userId)) {\n return $query->where('id', $userId);\n }\n })->get();\n }", "protected function getAllUsers() {\n\t\t\t$query = \"SELECT username, f_name, l_name, phone, email FROM Stomper\";\n\t\t\treturn $this->EndpointResponse($query, true);\n\t\t}", "private function getUserBatch() {\n\t\t// Include also hidden (disabled) users to the export\n\t\t$hidden_status = access_get_show_hidden_status();\n\t\taccess_show_hidden_entities(true);\n\n\t\t// Ignore access settings to get all users\n\t\telgg_set_ignore_access(true);\n\n\t\t$users = elgg_get_entities(array(\n\t\t\t'type' => 'user',\n\t\t\t'limit' => $this->limit,\n\t\t\t'offset' => $this->offset,\n\t\t));\n\n\t\t// Set access level to normal\n\t\telgg_set_ignore_access(false);\n\n\t\t// Set hidden status to normal\n\t\taccess_show_hidden_entities($hidden_status);\n\n\t\treturn $users;\n\t}", "public function getAllUsers(){\n\t\treturn $this->user;\n\t}", "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($users, 'id', 'username');\n \n return $users;\n }", "public function users_get()\n\t{\n\t\t$users = [\n\t\t\t['id' => 0, 'name' => 'John', 'email' => '[email protected]'],\n\t\t\t['id' => 1, 'name' => 'Jim', 'email' => '[email protected]'],\n\t\t];\n\n\t\t$id = $this->get('id');\n\n\t\tif ($id === null) {\n\t\t\t// Check if the users data store contains users\n\t\t\tif ($users) {\n\t\t\t\t// Set the response and exit\n\t\t\t\t$this->response($users, 200);\n\t\t\t} else {\n\t\t\t\t// Set the response and exit\n\t\t\t\t$this->response([\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'No users were found'\n\t\t\t\t], 404);\n\t\t\t}\n\t\t} else {\n\t\t\tif (array_key_exists($id, $users)) {\n\t\t\t\t$this->response($users[$id], 200);\n\t\t\t} else {\n\t\t\t\t$this->response([\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'No such user found'\n\t\t\t\t], 404);\n\t\t\t}\n\t\t}\n\t}", "public function getUsers(){\n return self::getModel(\"users\", \"*\");\n }", "public static function all() {\n $result = mysqli_query( Connection::getConnection(), \"Select * from users\" );\n $nRows= mysqli_num_rows($result);\n $users=[];\n for($i=0; $i < $nRows; $i++) {\n $user = mysqli_fetch_assoc($result);\n $users[$i] = new User(\n $user['id'],\n $user['name'],\n $user['email'],\n $user['type'],\n $user['patchImage']);\n }\n return $users;\n }", "public function getAllUsers()\n {\n $sql = \"SELECT `user_id`, `user_fname`, `user_lname`, `user_password_hash`, `user_email`, `user_role` FROM users\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public static function allUser()\n {\n $self = new self();\n\n $sql = \"SELECT * FROM user\";\n\n $result = $self->db->query($sql);\n\n $result = $result->fetchAll();\n\n return $result;\n }", "protected function loadUsers() {\r\n $this->users = new \\App\\Table\\UserTable(App::getInstance()->getDb());\r\n }", "function getUsers(){\n\t\t\t$this->loadModel('User');\n\t\t\treturn $this->User->find(array());\n\t\t}", "public function getUsers()\n {\n return User::where('user_status', 1)->get();\n }", "public function recoverAllUsers() {\n\t\t$req = \"SELECT * FROM users ORDER BY id_user\";\n\t\t$response = $this->getDb()->fetchAll($req);\n\t\t\n\t\t//Convert Query response to an array of domain objects\n\t\t$users = array();\n\t\tforeach ($response as $row) {\n\t\t\t$userId = $row['id_user'];\n\t\t\t$users[$userId] = $this->buildDomainObject($row);\n\t\t}\n\t\treturn $users;\n\t}", "protected function readUsers() {\n\t\t// get user ids\n\t\t$userIDs = array();\n\t\t$sql = \"SELECT\t\tuser_table.userID\n\t\t\tFROM\t\twcf\".WCF_N.\"_user user_table\n\t\t\t\".(isset($this->options[$this->sortField]) ? \"LEFT JOIN wcf\".WCF_N.\"_user_option_value USING (userID)\" : '').\"\n\t\t\t\".(!empty($this->sqlConditions) ? 'WHERE '.$this->sqlConditions : '').\"\n\t\t\tORDER BY\t\".(($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'userOption'.$this->options[$this->sortField]['optionID'] : $this->sortField).\" \".$this->sortOrder;\n\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$userIDs[] = $row['userID'];\n\t\t}\n\n\t\t// get user data\n\t\tif (count($userIDs)) {\n\t\t\t$sql = \"SELECT\t\toption_value.*, user_table.*,\n\t\t\t\t\t\tGROUP_CONCAT(groupID SEPARATOR ',') AS groupIDs\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_user user_table\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_user_option_value option_value\n\t\t\t\tON\t\t(option_value.userID = user_table.userID)\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_user_to_groups groups\n\t\t\t\tON\t\t(groups.userID = user_table.userID)\n\t\t\t\tWHERE\t\tuser_table.userID IN (\".implode(',', $userIDs).\")\n\t\t\t\tGROUP BY\tuser_table.userID\n\t\t\t\tORDER BY\t\".(($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'option_value.userOption'.$this->options[$this->sortField]['optionID'] : 'user_table.'.$this->sortField).\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$accessible = Group::isAccessibleGroup(explode(',', $row['groupIDs']));\n\t\t\t\t$row['accessible'] = $accessible;\n\t\t\t\t$row['deletable'] = ($accessible && WCF::getUser()->getPermission('admin.user.canDeleteUser') && $row['userID'] != WCF::getUser()->userID) ? 1 : 0;\n\t\t\t\t$row['editable'] = ($accessible && WCF::getUser()->getPermission('admin.user.canEditUser')) ? 1 : 0;\n\t\t\t\t$row['isMarked'] = intval(in_array($row['userID'], $this->markedUsers));\n\t\t\t\t\n\t\t\t\t$this->users[] = new User(null, $row);\n\t\t\t}\n\t\t\t\n\t\t\t// get special columns\n\t\t\tforeach ($this->users as $key => $user) {\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\tif (isset($this->options[$column])) {\n\t\t\t\t\t\tif ($this->options[$column]['outputClass']) {\n\t\t\t\t\t\t\t$outputObj = $this->getOutputObject($this->options[$column]['outputClass']);\n\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = $outputObj->getOutput($user, $this->options[$column], $user->{$column});\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = StringUtil::encodeHTML($user->{$column});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tswitch ($column) {\n\t\t\t\t\t\t\tcase 'email':\n\t\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = '<a href=\"mailto:'.StringUtil::encodeHTML($user->email).'\">'.StringUtil::encodeHTML($user->email).'</a>';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'registrationDate':\n\t\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = DateUtil::formatDate(null, $user->{$column});\n\t\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\t}\n\t\t}\n\t}", "public function users();", "public function users();", "public function users();", "public function users();", "public function getUsers() {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT * FROM p5_users WHERE ? ');\n $req->execute(array(1));\n\n return $req;\n $req->closeCursor();\n }", "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }", "public function getUsers(){\n $query = \"SELECT * FROM usuario \";\n return self::getInstance()->consulta($query);\n }", "public function getUsers()\n {\n return $this->users->getValues();\n }", "private function collectCurrentTestUsers()\n {\n $usersDb = new Users();\n $testUsersCollection = $usersDb->findTestUsers();\n $this->testUserCollection = [];\n foreach ($testUsersCollection as $testUser) {\n $this->testUserCollection[] = $testUser;\n }\n }", "public function getAllUser(){\n return $this->users;\n }", "public function getUsers()\n {\n return Security::getUserList();\n }", "public function users()\n {\n $sql = \"SELECT *\n FROM user\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function get_users() {\r\n $query = $this->db->get(\"users\");\r\n $result = $query->result_array();\r\n return $result;\r\n }", "Public Function getAllUsers()\n\t{\n\t\t$Output = array();\n\t\t$Users = $this->_db->fetchAll('SELECT * FROM bevomedia_user');\n\t\tforeach($Users as $User)\n\t\t\t$Output[] = new User($User->id);\n\t\t\t\n\t\treturn $Output;\n\t}", "public function getUserData()\n {\n exit(json_encode(['data' => $this->users_model->get_users()]));\n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "public function users(){\n\t\t// echo \"<br/> $hashedPassword\";\n\t\t// echo \"<br/>\";\n\t\n\t\t$usermodel = $this->model(\"User\");\n\t\t$result = json_encode($usermodel->getUsers());\n\t\t//for some reason it gives a wrong format if it doesn't print it first...\n\t\tprint_r($result);\n\t\treturn $result;\n\t}", "public function getAllUsers() {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array());\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n }", "public function getUsers()\n\t{\n\t\t$insert = $this->inject();\n\t\t$injectURL = $this->url . $insert . 'user%2c password from users%23&Submit=Submit#';\n\t\treturn $injectURL;\n\t}", "protected function users()\n {\n if ($this->usersDb === null)\n $this->usersDb = new UserModel($this->db);\n return $this->usersDb;\n }", "public function listUsers() {\n $db = CTSQLite::connect();\n $query = 'SELECT * FROM ic_user';\n $stmt = $db->prepare($query);\n $result = $stmt->execute();\n if (!$result) {\n return false;\n } else {\n // $id = $result->fetchArray();\n // return $id['id'];\n $row = $result->fetchArray();\n return $row;\n }\n $db->close();\n unset($db);\n }" ]
[ "0.7481006", "0.7227567", "0.7126629", "0.7099422", "0.7093853", "0.70779103", "0.7058548", "0.69693786", "0.69693786", "0.69693786", "0.6956549", "0.69477785", "0.6925922", "0.6879867", "0.6879867", "0.686749", "0.6855848", "0.6801295", "0.67954165", "0.6791674", "0.6782276", "0.6774312", "0.6769336", "0.6766431", "0.67553866", "0.67420065", "0.67359585", "0.67302877", "0.6722122", "0.672072", "0.66965485", "0.66941375", "0.6683184", "0.66822803", "0.6680797", "0.667686", "0.6659382", "0.6658302", "0.66575354", "0.665491", "0.6643948", "0.66362375", "0.66349715", "0.66349715", "0.6622667", "0.66074246", "0.66067034", "0.6601181", "0.65944606", "0.6585222", "0.6577669", "0.6576516", "0.6575541", "0.6569944", "0.6568096", "0.65548974", "0.6545071", "0.6542805", "0.6526081", "0.65245014", "0.6518094", "0.6516296", "0.65126586", "0.65097433", "0.6506704", "0.650228", "0.6500602", "0.64962614", "0.64871746", "0.64863986", "0.6485254", "0.64817", "0.6481442", "0.6476792", "0.6476509", "0.6472478", "0.64705956", "0.6468505", "0.6467112", "0.6446979", "0.6446979", "0.6446979", "0.6446979", "0.6434515", "0.643451", "0.6429468", "0.6424007", "0.6423868", "0.64236635", "0.6418281", "0.64081234", "0.64036125", "0.63894063", "0.63882804", "0.6386212", "0.6384787", "0.6382918", "0.6382705", "0.63773274", "0.63771594" ]
0.6418167
90
Parse the entries to the correct format to return as an API response
public function parse(array $entries, array $mappedRelationships = []): array { $this->parseEntries($entries, $mappedRelationships); return $entries; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function parse_api_response();", "public function prepare_entry_for_response( $entry ) {\n\n\t\tif ( is_wp_error( $entry ) || ! isset( $entry['form_id'] ) ) {\n\t\t\treturn $entry;\n\t\t}\n\n\t\t$form = GFAPI::get_form( $entry['form_id'] );\n\t\tforeach ( $form['fields'] as $field ) {\n\n\t\t\tif ( empty( $entry[ $field->id ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $field instanceof GF_Field_MultiSelect ) {\n\n\t\t\t\t$entry[ $field->id ] = $field->to_array( $entry[ $field->id ] );\n\n\t\t\t} elseif ( $field instanceof GF_Field_FileUpload && $field->multipleFiles ) {\n\n\t\t\t\t$entry[ $field->id ] = json_decode( $entry[ $field->id ] );\n\n\t\t\t} elseif ( $field instanceof GF_Field_List ) {\n\n\t\t\t\t$entry[ $field->id ] = maybe_unserialize( $entry[ $field->id ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $entry;\n\t}", "private function parse()\n {\n if ($this->isError()) {\n // error parsing\n if (empty($this->body) || !isset($this->body['errors'])) {\n // response body isn't an error object, return a custom one\n $error = new Entity\\Error();\n $error->message = \"Error $this->http_status\";\n $error->name = \"INVALID REQUEST\";\n $error->at = \"\";\n $this->objects[] = $error;\n } else {\n // parse error\n $errors = $this->body['errors'];\n foreach ($errors as $error) {\n $this->objects[] = Entity\\Error::parse($error);\n }\n }\n } else if (isset($this->body['card'])) {\n // card parsing\n $cards = $this->body['card'];\n foreach ($cards as $card) {\n $this->objects[] = Entity\\Card::parse($card);\n }\n } else if (isset($this->body['paymentmethod'])) {\n // payment parsing\n $this->objects[] = Entity\\Payment::parse($this->body);\n if (isset($this->body['subscription_plan'])) {\n // subscription also found, payment is a subscription\n $this->objects[] = Entity\\Subscription::parse($this->body['subscription_plan']);\n }\n } else if (isset($this->body['vendor'])) {\n // vendor parsing\n $this->objects[] = Entity\\Vendor::parse($this->body['vendor']);\n } else if (isset($this->body['item'])) {\n // item parsing\n $this->objects[] = Entity\\Item::parse($this->body['item']);\n } else if (isset($this->body['refunded'])) {\n // refund parsing, same as payment\n $this->objects[] = Entity\\Payment::parse($this->body);\n } else if (isset($this->body['subscription_plan'])) {\n // subscription parsing\n $this->objects[] = Entity\\Subscription::parse($this->body['subscription_plan']);\n } else if (isset($this->body['deleted'])) {\n // nothing to return\n } else {\n throw new \\RuntimeException('Could not recognize response type');\n }\n }", "public function api_format_results( $pms=array() ) {\n\t\t\textract($pms);\n\n\t\t\t{\n\t\t\t\t$rsp = $this->api_search_set_stats(array(\n\t\t\t\t\t'requestData'\t\t\t\t=> $requestData,\n\t\t\t\t\t'response'\t\t\t\t\t=> $response,\n\t\t\t\t));\n\t\t\t\t$requestData = $rsp['requestData'];\n\t\t\t}\n\n // verify array of Items or array of Item elements\n if ( isset($response['Items']['Item']['ASIN']) ) {\n\t\t\t\t$response['Items']['Item'] = array( $response['Items']['Item'] );\n }\n\n\t\t\t$_response = array();\n\t\t\tforeach ( $response['Items']['Item'] as $key => $value){\n\t\t\t\t$_response[\"$key\"] = $value;\n\t\t\t}\n\t\t\t//var_dump('<pre>', $_response, '</pre>'); die('debug...');\n\n\t\t\treturn array(\n\t\t\t\t'requestData'\t=> $requestData,\n\t\t\t\t'response'\t\t=> $_response,\n\t\t\t);\n\t\t}", "public function entryList() {\n $content = [];\n\n $content['message'] = [\n '#markup' => $this->t('Generate a list of all entries in the database. There is no filter in the query.'),\n ];\n\n $rows = [];\n $headers = [\n $this->t('pid'),\n $this->t('uid'),\n $this->t('studentname'),\n $this->t('studentno'),\n $this->t('chapter'),\n\t \n\t $this->t('status'),\n\t\t$this->t('link'),\n ];\n//print_r($this->repository);exit;\n\n$results = $this->repository->load();\n//echo\"<pre>\";//print_r($entries);exit;\n \n\t\n\t\n\t$k1=array();\n $output=array();\n\n foreach($results as $k=>$data){\n\n \n//print_r($results[$k]);exit;\n if($results[$k]->status ==1)\n {\n\t\t \n\t\t $edit = Url::fromUserInput('/update');\n $output[] = [\n\t\t 'pid' => $results[$k]->pid,\n\t\t 'uid' => $results[$k]->uid,\n 'studentname' => $results[$k]->studentname, // 'userid' was the key used in the header\n 'studentno' => $results[$k]->studentno, // 'Username' was the key used in the header\n 'chapter' => $results[$k]->chapter,\n\t\t \n 'status' => 'Granted',\n \\Drupal::l('Edit', $edit),\n\n\n\n\n ];\n }\n if($results[$k]->status ==0)\n {\n\t\t \n\t\t $edit = Url::fromUserInput('/update');\n $output[] = [\n 'pid' => $results[$k]->pid,\n\t\t 'uid' => $results[$k]->uid,\n 'studentname' => $results[$k]->studentname, // 'userid' was the key used in the header\n 'studentno' => $results[$k]->studentno, // 'Username' was the key used in the header\n 'chapter' => $results[$k]->chapter,\n\t\t \n 'status' => 'Notgranted',\n \\Drupal::l('Edit', $edit),\n\n\n\n\n ];\n }\n\n\n\n//print_r($output);exit;\n\n array_push($k1,$output);\n //display data in site\n\n }\n//print_r($k1);exit;\n $content['table'] = [\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $output,\n '#empty' => t('No users found'),\n ];\n return $content;\n\n }", "function to_entry() \n {\n $entry = array(\"entry\" => array(\"content\" => array()));\n # set file array\n $entry[\"entry\"][\"content\"][\"file\"] = array();\n foreach ($this->file_objs as $f) {\n array_push($entry[\"entry\"][\"content\"][\"file\"], $f->to_array());\n }\n # set params dict\n $entry[\"entry\"][\"content\"][\"params\"] = array();\n $entry[\"entry\"][\"content\"][\"params\"][\"name\"] = $this->name;\n $entry[\"entry\"][\"content\"][\"params\"][\"yt_id\"] = $this->yt_id;\n $entry[\"entry\"][\"content\"][\"params\"][\"tag\"] = $this->tags;\n if (! empty($this->meta_objs) ) {\n $entry[\"entry\"][\"content\"][\"params\"][\"meta\"] = array();\n foreach ($this->meta_objs as $m) {\n array_push($entry[\"entry\"][\"content\"][\"params\"][\"meta\"], $m->to_array());\n }\n }\n # set file_params dict\n $entry[\"entry\"][\"content\"][\"file_params\"] = array();\n $entry[\"entry\"][\"content\"][\"file_params\"][\"thumb_used\"] = $this->thumb_used;\n $entry[\"entry\"][\"content\"][\"file_params\"][\"update_files\"] = $this->update_files;\n # set chapters\n $entry[\"entry\"][\"content\"][\"chapter\"] = array();\n foreach ($this->chapters as $ch) {\n array_push($entry[\"entry\"][\"content\"][\"chapter\"], $ch->to_array());\n }\n # set comments\n $entry[\"entry\"][\"content\"][\"comment\"] = array();\n // foreach ($this->comments as $ch) {\n // array_push($entry[\"entry\"][\"content\"][\"comment\"], $ch->to_array());\n // }\n\n return $entry;\n }", "protected function extractApiData() {\n\n foreach($this->apiData->items as $key => $value) { \n $key = $key + 1;\n $this->dataArray[$key]['id'] = $value->id;\n $this->dataArray[$key]['firstname'] = $value->firstname;\n $this->dataArray[$key]['lastname'] = $value->lastname;\n $this->dataArray[$key]['email'] = $value->email;\n $this->dataArray[$key]['dob'] = isset($value->dob) ? $value->dob : '';\n $this->dataArray[$key]['website_id'] = $value->website_id;\n $this->dataArray[$key]['store_id'] = $value->store_id;\n $this->dataArray[$key]['created_in'] = $value->created_in; \n $this->dataArray[$key]['group_id'] = $value->group_id; \n $this->dataArray[$key]['gender'] = $this->gender[$value->gender];\n $this->dataArray[$key]['address'] = $this->getAddress($value->addresses);\n }\n }", "function blog_entry_to_array ( $entryFile ) {\n\t\t// Reads a blog entry and returns an key/value pair array.\n\t\t//\n\t\t// Returns false on fail...\n\t\tglobal $sb_info;\n\t\t$blog_entry_data = array();\n\t\t\n\t\t$str = sb_read_file( $entryFile );\n\t\t$exploded_array = explode( '|', $str );\n\t\t\n\t\tif ( count( $exploded_array ) > 1 ) {\n\t\t\tif ( count( $exploded_array ) <= 6 ) {\n\t\t\t\t// Old List Format: subject, date, content, (mood, song)\n\t\t\t\t$blog_entry_data[ 'SUBJECT' ]\t\t= $exploded_array[0];\n\t\t\t\t$blog_entry_data[ 'DATE' ]\t\t\t= $exploded_array[1];\n\t\t\t\t$blog_entry_data[ 'CONTENT' ]\t\t= $exploded_array[2];\n\t\t\t\t$blog_entry_data[ 'relatedlink' ]\t= $exploded_array[3];\n\t\t\t\t$blog_entry_data[ 'VERSION' ]\t\t= $sb_info[ 'version' ];\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// New Format: key/value pairs\n\t\t\t\t//\n\t\t\t\t// The \"keys/value\" pairs can be in any order. Also, the only ones\n\t\t\t\t// that are required are VERSION, SUBJECT, DATE, and CONTENT.\n\t\t\t\t//\n\t\t\t\t// All the other keys are optional. Eventually the CATEGORY tag\n\t\t\t\t// will parse into an array of it's own (probably comma delimited...)\n\t\t\t\t//\n\t\t\t\t// VERSION, SUBJECT, DATE, CONTENT, (MOOD, SONG, CATEGORY, etc...)\n\t\t\t\t// Total count will be 14 items...\n\n\t\t\t\t$blog_entry_data = explode_with_keys( $str );\n\t\t\t}\n\t\t\t\n\t\t\treturn( $blog_entry_data );\n\t\t} else {\n\t\t\treturn( false ); // error\n\t\t}\n\t}", "public function parse()\n\t{\n\t\t$this->parseGroups();\n\t\t$this->parseBadges();\n\t}", "private function _normalizeData($feed) {\n $normalized_data = array();\n $i = 0;\n\n foreach ($feed as $data) {\n $normalized_data[$i]['pub_date'] = $data->created_at;\n $normalized_data[$i]['data'] = $data;\n $normalized_data[$i]['tweet'] = $this->_parseTweet($data);\n $normalized_data[$i]['type'] = $this->api_name;\n if ($this->_getTweetMedia($data)) {\n $normalized_data[$i]['media'] = $this->_getTweetMedia($data);\n }\n\n $i++;\n }\n\n return $normalized_data;\n }", "private function parseAPIResponse($r) {\n\t\t$r = json_decode($r);\n\t\t//$r = $r->results;\n\t\t$posts = array();\n\t\t//print_r($r->results);\n\t\t//logger::log(DEBUG, 'Twitter response:' . json_encode($r));\n\t\t\n\t\t// This is not an array. It's an object!\n\t\tif(!is_array($r->results))\n\t\t\treturn false; \n\n\t\tforeach ($r->results as $tweet) {\n\t\t\t$post = array (\n\t\t\t\t'id' => $tweet->id_str,\n\t\t\t\t'metadata' => array(\n\t\t\t\t\t'service' => 'twitter',\n\t\t\t\t\t'handle' => $tweet->from_user,\n\t\t\t\t\t'profile_url' => 'http://twitter.com/' . $tweet->from_user\n\t\t\t\t),\n\t\t\t\t'content' => array(\n\t\t\t\t\t'text' => $tweet->text\n\t\t\t\t),\n\t\t\t\t'time' => strtotime($tweet->created_at)\n\t\t\t);\n\t\t\tarray_push($posts, $post);\n\t\t}\n\n\t\treturn json_encode($posts);\n\t}", "public static function process(array &$response)\r\n {\r\n if ( ! isset($_GET['fields']) || empty($response))\r\n {\r\n return;\r\n }\r\n\r\n $fields = explode(',', $_GET['fields']);\r\n\r\n $temporaryResponse = [];\r\n\r\n foreach ($response as &$entry)\r\n {\r\n $temporaryEntry = [];\r\n\r\n foreach ($fields as $field)\r\n {\r\n $field = trim($field);\r\n if (isset($entry[$field]))\r\n {\r\n $temporaryEntry[$field] = $entry[$field];\r\n }\r\n }\r\n\r\n $temporaryResponse[] = $temporaryEntry;\r\n }\r\n\r\n $response = $temporaryResponse;\r\n }", "protected function parse() {}", "private function __parse_intput() {\n $requests = JsonParser::decode($this->__raw_input);\n if (is_array($requests) === false or\n empty($requests[0])) {\n $requests = array($requests);\n }\n return ($requests);\n }", "private function generateItems()\n {\n $entries = $this->item;\n if ( $entries === null )\n {\n return;\n }\n\n foreach ( $entries as $entry )\n {\n $entryTag = $this->xml->createElement( 'entry' );\n $this->channel->appendChild( $entryTag );\n \n if ( !is_null( $entry->language ) )\n {\n $this->addAttribute( $entryTag, 'xml:lang', $entry->language );\n }\n\n $elements = array( 'id', 'title', 'updated' );\n\n foreach ( $elements as $element )\n {\n $data = $entry->$element;\n\n if ( is_null( $data ) )\n {\n throw new ezcFeedRequiredMetaDataMissingException( \"/feed/entry/{$element}\" );\n }\n\n switch ( $element )\n {\n case 'id':\n $this->generateMetaData( $entryTag, $element, $data );\n break;\n\n case 'title':\n $this->generateTextNode( $entryTag, $element, $data );\n break;\n\n case 'updated':\n // Sample date: 2003-12-13T18:30:02-05:00\n $this->generateMetaData( $entryTag, $element, $data->date->format( 'c' ) );\n break;\n }\n }\n\n // ensure the ATOM rules are applied\n $content = $entry->content;\n $summary = $entry->description;\n $links = $entry->link;\n $contentPresent = !is_null( $content );\n $contentSrcPresent = $contentPresent && is_object( $content ) && !is_null( $content->src );\n $contentBase64 = true;\n if ( $contentPresent && is_object( $content )\n && ( in_array( $content->type, array( 'text', 'html', 'xhtml', null ) )\n || preg_match( '@[+/]xml$@i', $content->type ) !== 0\n || substr_compare( $content->type, 'text/', 0, 5, true ) === 0 ) )\n {\n $contentBase64 = false;\n }\n\n $summaryPresent = !is_null( $summary );\n $linkAlternatePresent = false;\n if ( $links !== null )\n {\n foreach ( $links as $link )\n {\n // if the rel attribute is not set or if it is \"alternate\"\n // then there is at least one rel=\"alternate\" link in the feed entry\n if ( !isset( $link->rel )\n || $link->rel === 'alternate' )\n {\n $linkAlternatePresent = true;\n break;\n }\n }\n }\n\n if ( !$contentPresent )\n {\n if ( !$linkAlternatePresent && !$summaryPresent )\n {\n throw new ezcFeedRequiredMetaDataMissingException( '/feed/entry/content' );\n }\n\n if ( !$linkAlternatePresent )\n {\n throw new ezcFeedRequiredMetaDataMissingException( '/feed/entry/link@rel=\"alternate\"' );\n }\n\n if ( !$summaryPresent )\n {\n throw new ezcFeedRequiredMetaDataMissingException( '/feed/entry/summary' );\n }\n }\n\n if ( $contentPresent )\n {\n if ( ( $contentSrcPresent || $contentBase64 ) && !$summaryPresent )\n {\n throw new ezcFeedRequiredMetaDataMissingException( '/feed/entry/summary' );\n }\n }\n\n $elements = array( 'author', 'content', 'link', 'description',\n 'category', 'contributor', 'published', 'copyright',\n 'source', 'enclosure' );\n\n if ( $entry->link !== null )\n {\n $this->checkLinks( $entryTag, $entry->link );\n }\n\n foreach ( $elements as $element )\n {\n $data = $entry->$element;\n\n if ( is_null( $data ) )\n {\n continue;\n }\n\n switch ( $element )\n {\n case 'description':\n $this->generateTextNode( $entryTag, 'summary', $data );\n break;\n\n case 'copyright':\n $this->generateTextNode( $entryTag, 'rights', $data );\n break;\n\n case 'content':\n $this->generateContentNode( $entryTag, $element, $data );\n break;\n\n case 'author':\n case 'contributor':\n foreach ( $data as $dataNode )\n {\n $this->generatePerson( $entryTag, $element, $dataNode );\n }\n break;\n\n case 'link':\n foreach ( $data as $dataNode )\n {\n $this->generateLink( $entryTag, $dataNode );\n }\n break;\n\n case 'published':\n // Sample date: 2003-12-13T18:30:02-05:00\n $this->generateMetaData( $entryTag, $element, $data->date->format( 'c' ) );\n break;\n\n case 'category':\n foreach ( $data as $dataNode )\n {\n $this->generateCategory( $entryTag, $dataNode );\n }\n break;\n\n case 'source':\n $this->generateSource( $entryTag, $data );\n break;\n\n case 'enclosure':\n // convert RSS2 enclosure elements in ATOM link elements\n foreach ( $data as $dataNode )\n {\n $link = new ezcFeedLinkElement();\n $link->href = $dataNode->url;\n $link->length = $dataNode->length;\n $link->type = $dataNode->type;\n $link->rel = 'enclosure';\n\n $this->generateLink( $entryTag, $link );\n }\n break;\n }\n }\n\n $this->generateItemModules( $entry, $entryTag );\n }\n }", "protected function massageEntry($entry)\n {\n return [\n 'mediaId' => static::massageMediaId($entry['plrequest$mediaId']),\n 'requestCount' => $entry['plrequest$requestCount'],\n ];\n }", "private function parse_result(){\n return json_decode($this->result);\n }", "public function getItem($data) {\n $ret = array();\n $parties = array();\n $abstract = '';\n foreach ($data as $field_name => $value) {\n $value = trim($value);\n $value = (string) $value;\n\n if (mb_detect_encoding($value) != 'UTF-8') {\n $value = utf8_encode($value);\n }\n if (strpos($value, 'www.') === 0) {\n $value = 'http://' . $value;\n }\n\n $value = str_replace(['^a', '^b'], ['', ' '], $value);\n\n switch ($field_name) {\n case 'abstract':\n $abstract .= $value . PHP_EOL;\n continue;\n case 'party':\n $parties[] = $value;\n continue;\n case 'authorM':\n $field_name = 'authorA';\n break;\n case 'corpAuthorM':\n $field_name = 'corpAuthorA';\n break;\n case 'confDate':\n $dates = explode(\" - \", $value);\n foreach ($dates as &$date) {\n $date = date(\"Y-m-d\", strtotime($date));\n }\n $ret[$field_name] = $dates;\n continue;\n case 'dateOfText':\n case 'dateOfEntry':\n case 'dateOfModification':\n if (preg_match('/^\\d{4}$/', $value)) {\n $value = \"$value-01-01\";\n }\n break;\n }\n\n if (!empty($ret[$field_name])) {\n if (is_array($ret[$field_name])) {\n $ret[$field_name][] = $value;\n }\n else {\n $ret[$field_name] = array($ret[$field_name], $value);\n }\n }\n else {\n if ($field_name == 'titleOfText') {\n $ret['titleOfText_original'] = $value;\n }\n $ret[$field_name] = $value;\n }\n }\n $ret['abstract'] = $abstract;\n $ret['parties'] = $parties;\n $ret['obsolete'] = !empty($data->obsolete) && $data->obsolete == 'true';\n return $ret;\n }", "private function ParseResponse($response)\n {\n\n $xml = new SimpleXMLElement($response->getBody());\n\n foreach ($xml->entry as $entry) {\n //https://www.electrictoolbox.com/php-simplexml-element-attributes/\n if ((string) $entry->category->attributes()->term === $this->ghType) {\n\n //instead of returning the simpleXMlElement in an array i pulled the strings'\n //not sure if this matters but it is less data sent back to the ajax success function\n $tmp[] = array(\n $this->FixUuid($entry->id),\n (string)$entry->title,\n );\n // echo (json_encode('id: ' . $entry->id . ' title: ' . $entry->title) .\"<br /> <br />\");\n \n }\n \n }\n\n $this->response = json_encode($tmp);\n }", "public function formatData() {\n $raw_data = $this->getRawData();\n $formatted_data = array();\n // Format the data based on tracking method.\n switch ($this->getTrackingMethod()) {\n case 'rest':\n // Replace marketo_id with value of MARKETO_REST_LEAD_FIELD_REST_KEY.\n foreach ($raw_data as $id => $value) {\n // Get the row corresponding to the marketo id.\n $result = db_select(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->fields(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->condition(MARKETO_REST_LEAD_FIELD_ID, $id)\n ->execute()\n ->fetchAll();\n // Cycle through the result row(s) and set the new rest field key.\n foreach ($result as $field) {\n if (isset($field->{MARKETO_REST_LEAD_FIELD_REST_KEY})) {\n $formatted_data[$field->{MARKETO_REST_LEAD_FIELD_REST_KEY}] = $value;\n }\n }\n }\n break;\n case 'munchkin':\n default:\n // Replace marketo_id with value of MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY.\n foreach ($raw_data as $id => $value) {\n // Get the row corresponding to the marketo id.\n $result = db_select(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->fields(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->condition(MARKETO_REST_LEAD_FIELD_ID, $id)\n ->execute()\n ->fetchAll();\n // Cycle through the result row(s) and set the new munchkin field key.\n foreach ($result as $field) {\n if (isset($field->{MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY})) {\n $formatted_data[$field->{MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY}] = $value;\n }\n }\n }\n break;\n }\n return $formatted_data;\n }", "protected function parseAdlibResponse() {\n $xml = new SimpleXMLElement($this->raw);\n $results = $xml->xpath('//record');\n $docs = array();\n foreach ($results as $result) {\n $doc = array();\n foreach ($this->fields as $field) {\n // check if we have multiple values\n $children = $this->getGroupedFieldByXpath($result, $field);\n // $children = $result->{$field}->children();\n if(empty($children)) {\n continue;\n }\n if (count($children) > 1) {\n $field_array = array();\n // get all values\n foreach ($children as $value) {\n if ((string) $value != '' && (string) $value != 'Array') {\n $field_array[] = $this->replaceTokenCharacters((string) $value);\n }\n else {\n $field_array[] = $this->replaceTokenCharacters((string) $value->value);\n }\n }\n // and put the resulting array in $doc[$field]\n $doc[$field] = $field_array;\n }\n else {\n // single value\n // First try if there is a result without value.\n if ((string) $children[0] !== '' && (string) $children[0] !== 'Array') {\n $doc[$field] = $this->replaceTokenCharacters((string) $children[0]);\n }\n else {\n $doc[$field] = $this->replaceTokenCharacters((string) $children[0]->value);\n }\n }\n }\n $doc['priref'] = (string) $xml->record->attributes()->priref;\n $doc['raw_xml'] = $result->asXML();\n $docs[] = $doc;\n }\n return $docs;\n }", "public function processApi()\n\t\t{\n\t\t\t$this->createEntry();\n\t\t}", "protected final function model_response_parser($items, $data_package_fields) {\n \t$parsed = array();\n \t\n \t/* iterate through all data pakages */\n \tforeach ( $data_package_fields as $field ) {\n \t\n \t\t/* itereate through all passed items */\n \t\tforeach ($items as $i => $item) {\n\t\t \t\t$key = $field['backbone_id']; // the key specified at backbone, e.g. 'title'\n\t\t \t\t$data_package_name = $item[$field['data_package']]; //the datapackage name, e.g. 'post'\n\t\t \t\t\n\t\t \t\tif ( is_array($data_package_name) ) // only for safety, its always an array anyway\n\t\t\t \t\t$value = $data_package_name[$field['id']]; // the value e.g. 'my title'\n\t\t\t \telseif ( is_object($data_package_name) )\n\t\t\t \t\t$value = $data_package_name->$field['id'];\n\t\t\t \telse\n\t\t\t \t\tcontinue;\n\t\t\t \t\t \t\t\t\n\t\t \t$parsed[$i][$key] = $value;\n\t\t\t /*\n\t\t\t *\tlooks something like this now:\n\t\t\t\t *\t$parsed = array(\n\t\t\t\t * \t'title'\t\t=> 'my title'\n\t\t\t\t * \t'left\t'\t=> '345',\n\t\t\t\t * \t'parentId'\t=> 456\n\t\t\t\t * );\n\t\t\t\t */\n\t\t\t}\n \t}\n \treturn $parsed;\t \n }", "function parseEntry( array $entry ) {\n\tlist( $index, $id, $expression, $de, $fi, $page ) = $entry;\n\n\tif ( $id ) {\n\t\t$id = \"$expression ($id)\";\n\t} elseif ( strpos( $expression, '.' ) !== false ) {\n\t\t// SMW does not allow dots in the first five characters\n\t\t$id = str_replace( '.', '_', $expression );\n\t}\n\n\t$values = [\n\t\t'expression' => $expression,\n\t\t'de' => $de,\n\t\t'fi' => $fi,\n\t\t'page' => $page,\n\t\t'id' => $id,\n\t];\n\n\t$values = array_filter( $values );\n\n\treturn [ \"Sosva:$index\" => $values ];\n}", "protected function format( $results )\n {\n return json_decode( json_encode( $results ) );\n }", "public function parseData($response, $prefix, $fp, $filters, $apiFilterFormatFile){\n\t\ttry {\n\t\t\tforeach ($response as $key => $value){\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\tif(is_numeric($key)){\n\t\t\t\t\t\t$this->printToCSVFile($fp);\n\t\t\t\t\t\t$this->initializeOutputArray($filters);\n\t\t\t\t\t\t$this->keyPrefix = \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t// filter IDs should be allowed to be print only once the actual data for company starts\n\t\t\t\t\t\t// data such as * success message of API call etc * should not be allowed to print\n\t\t\t\t\t\t// moreover, such data, even if included in filter.ini file, wont be able to print the \n\t\t\t\t\t\t// correct response values because of the way code is written\n\t\t\t\t\t\t$this->allowToPrintFilterId = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// each time a new company response is fetched, enter a demarcation point\n\t\t\t\t\t\tfwrite($apiFilterFormatFile, \"\\r\\n********************************\\r\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->keyPrefix = $this->keyPrefix.$key.\":\";\n\t\t\t\t\t$this->parseData($value,$this->keyPrefix,$fp,$filters,$apiFilterFormatFile);\n\t\t\t\t} else {\n\t\t\t\t\t\t// print the **filter IDs** that need to be known for editing the filter.ini file\n\t\t\t\t\t\t$this->printFilterIDs($apiFilterFormatFile, $prefix.$key.\"\\n\\r\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->filterData($prefix.$key,str_replace(\",\", \";\", str_replace(array(\"\\n\",\"\\t\",\"\\0\",\"x0B\",\"\\r\"), \" \", $value)));\n\t\t\t\t\t\t$this->keyPrefix = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\terror_log($e->getMessage(),3,\"/var/tmp/error.log\");\n\t\t\terror_log(\"\\n\");\n\t\t}\n\t}", "public function parse()\r\n\t{\r\n\t\tif(is_string($this->_raw)) {\r\n\t\t\t$response = self::toArray($this->_format, $this->_raw);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$response = $this->_raw;\r\n\t\t}\r\n\r\n\t\tif(!empty($response['error_code'])) {\r\n\t\t\tthrow new MediaMonks_Service_Hyves_Response_Exception($response['error_message'], $response['error_code']);\r\n\t\t}\r\n\t\t\r\n\t\tif(null == $this->_method && !empty($response['method'])) {\r\n\t\t\t$this->_method = $response['method'];\r\n\t\t\tunset($response['method']);\r\n\t\t}\r\n\t\t\r\n\t\t$this->_info = $response['info'];\r\n\t\tunset($response['info']);\r\n\t\t\r\n\t\t$this->_body = $response;\r\n\t\t\r\n\t\t// pagination\r\n\t\tif(!empty($this->_info['totalresults'])) {\r\n\t\t\t$this->_paginated = true;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_parsed = true;\r\n\t\treturn $this;\r\n\t}", "public function formatFeed()\n\t{\n\t\tforeach ( $this->feed as $key=>$item )\n\t\t{\n\t\t\t$this->feed_formatted[$key]['id'] = $this->getPostId($item->id);\n\t\t\t$this->feed_formatted[$key]['date'] = $item->created_time;\n\t\t\t$this->feed_formatted[$key]['link'] = ( isset($item->link) ) ? $item->link : null;\n\t\t\t$this->feed_formatted[$key]['type'] = $item->type;\n\t\t\t$this->feed_formatted[$key]['message'] = ( isset($item->message) ) ? $item->message : null;\n\t\t\t$this->feed_formatted[$key]['story'] = ( isset($item->story) ) ? $item->story : null;\n\t\t\t$this->feed_formatted[$key]['user_id'] = $this->getUserId($item->id);\n\t\t\t$this->feed_formatted[$key]['screen_name'] = ( isset($item->from->name) ) ? $item->from->name : null;\n\t\t\t$this->feed_formatted[$key]['profile_image'] = $this->getProfileImage($this->getUserId($item->id));\n\t\t\t$this->feed_formatted[$key]['picture'] = ( $item->type == 'photo' ) ? $this->getPicture($item->object_id) : null;\n\t\t\t$this->feed_formatted[$key]['caption'] = ( isset($item->caption) ) ? $item->caption : null;\n\t\t\t$this->feed_formatted[$key]['caption_title'] = ( isset($item->name) ) ? $item->name : null;\n\t\t\t$this->feed_formatted[$key]['caption_picture'] = ( isset($item->picture) ) ? $item->picture : null;\n\t\t\t$this->feed_formatted[$key]['caption_description'] = ( isset($item->description) ) ? $item->description : null;\n\t\t}\n\t}", "function importEntries($entries, $pageid, $statusInfo, &$firstUrl, &$firstHtmlUrl) {\n\tglobal $gPagesTable, $gRequestsTable;\n\tglobal $ghReqHeaders, $ghRespHeaders;\n\t$link = getDBConnection();\n\tfor ( $i = 0; $i < count($entries); $i++ ) {\n\t\t$entry = $entries[$i];\n\t\t$aTuples = array();\n\t\tarray_push($aTuples, \"pageid = $pageid\");\n\t\tarray_push($aTuples, \"crawlid = \" . $statusInfo['crawlid']);\n\t\t$startedDateTime = strtotime($entry->{ 'startedDateTime' }); // we use this below for expAge calculation\n\t\tarray_push($aTuples, \"startedDateTime = $startedDateTime\");\n\t\tarray_push($aTuples, \"time = \" . $entry->{ 'time' });\n\t\tif ( property_exists($entry, '_cdn_provider') && null !== $entry->{'_cdn_provider'} ) {\n\t\t\tarray_push($aTuples, \"_cdn_provider = '\" . mysqli_real_escape_string($link, $entry->{ '_cdn_provider' }) . \"'\");\n\t\t}\n\t\tif ( property_exists($entry, '_gzip_save') && null !== $entry->{'_gzip_save'} ) {\n\t\t\tarray_push($aTuples, \"_gzip_save = \" . $entry->{ '_gzip_save' }); // amount response WOULD have been reduced if it had been gzipped\n\t\t}\n\n\t\t// REQUEST\n\t\t$request = $entry->{ 'request' };\n\t\tarray_push($aTuples, \"method = '\" . $request->{ 'method' } . \"'\");\n\t\tarray_push($aTuples, \"reqHttpVersion = '\" . $request->{ 'httpVersion' } . \"'\");\n\t\t$url = $request->{ 'url' };\n\t\tarray_push($aTuples, \"url = '\" . mysqli_real_escape_string($link, $url) . \"'\");\n\t\t$urlShort = substr($url, 0, 255);\n\t\tarray_push($aTuples, \"urlShort = '\" . mysqli_real_escape_string($link, $urlShort) . \"'\");\n\t\t$reqHeadersSize = $request->{ 'headersSize' };\n\t\tif ( $reqHeadersSize && 0 < $reqHeadersSize ) {\n\t\t\tarray_push($aTuples, \"reqHeadersSize = $reqHeadersSize\");\n\t\t}\n\t\t$reqBodySize = $request->{ 'bodySize' };\n\t\tif ( $reqBodySize && 0 < $reqBodySize ) {\n\t\t\tarray_push($aTuples, \"reqBodySize = $reqBodySize\");\n\t\t}\n\n\t\t$headers = $request->{ 'headers' };\n\t\t$other = \"\";\n\t\t$hHeaders = array(); // Headers can appear multiple times, so we have to concat them all then add them to avoid setting a column twice.\n\t\t$cookielen = 0;\n\t\tfor ( $h = 0; $h < count($headers); $h++ ) {\n\t\t\t$header = $headers[$h];\n\t\t\t$name = $header->{ 'name' };\n\t\t\t$lcname = strtolower($name);\n\t\t\t$value = substr($header->{ 'value' }, 0, 255);\n\t\t\t$origValue = $header->{ 'value' };\n\t\t\tif ( array_key_exists($lcname, $ghReqHeaders) ) {\n\t\t\t\t// This is one of the standard headers we want to save.\n\t\t\t\t$column = $ghReqHeaders[$lcname];\n\t\t\t\t$hHeaders[$column] = ( array_key_exists($column, $hHeaders) ? $hHeaders[$column] . \", $value\" : $value );\n\t\t\t}\n\t\t\telse if ( \"cookie\" == $lcname ) {\n\t\t\t\t// We don't save the Cookie header, just the size.\n\t\t\t\t$cookielen += strlen($origValue);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// All other headers are lumped together.\n\t\t\t\t$other .= ( $other ? \", \" : \"\" ) . \"$name = $origValue\";\n\t\t\t}\n\t\t}\n\t\tif ( $other ) {\n\t\t\tarray_push($aTuples, \"reqOtherHeaders = '\" . mysqli_real_escape_string($link, $other) . \"'\");\n\t\t}\n\t\tif ( $cookielen ) {\n\t\t\tarray_push($aTuples, \"reqCookieLen = $cookielen\");\n\t\t}\n\n\t\t// RESPONSE\n\t\t$response = $entry->{ 'response' };\n\t\t$status = $response->{ 'status' };\n\t\tarray_push($aTuples, \"status = $status\");\n\t\tarray_push($aTuples, \"respHttpVersion = '\" . $response->{ 'httpVersion' } . \"'\");\n\t\tif ( property_exists($response, 'url') && null !== $response->{'url'} ) {\n\t\t\tarray_push($aTuples, \"redirectUrl = '\" . mysqli_real_escape_string($link, $response->{ 'url' }) . \"'\");\n\t\t}\n\t\t$respHeadersSize = $response->{ 'headersSize' };\n\t\tif ( $respHeadersSize && 0 < $respHeadersSize ) {\n\t\t\tarray_push($aTuples, \"respHeadersSize = $respHeadersSize\");\n\t\t}\n\t\t$respBodySize = $response->{ 'bodySize' };\n\t\tif ( $respBodySize && 0 < $respBodySize ) {\n\t\t\tarray_push($aTuples, \"respBodySize = $respBodySize\");\n\t\t}\n\t\t$content = $response->{ 'content' };\n\t\tarray_push($aTuples, \"respSize = \" . $content->{ 'size' });\n\t\t$mimeType = mysqli_real_escape_string($link, $content->{ 'mimeType' });\n\t\tarray_push($aTuples, \"mimeType = '$mimeType'\");\n\t\t$ext = mysqli_real_escape_string($link, getExt($url));\n\t\tarray_push($aTuples, \"ext = '$ext'\");\n\t\t$type = prettyType($mimeType, $ext);\n\t\tarray_push($aTuples, \"type = '$type'\");\n\t\t$format = getFormat($type, $mimeType, $ext);\n\t\tarray_push($aTuples, \"format = '$format'\");\n\t\t$headers = $response->{ 'headers' };\n\t\t$other = \"\";\n\t\t$cookielen = 0;\n\t\tfor ( $h = 0; $h < count($headers); $h++ ) {\n\t\t\t$header = $headers[$h];\n\t\t\t$name = $header->{ 'name' };\n\t\t\t$lcname = strtolower($name);\n\t\t\t$value = substr($header->{ 'value' }, 0, 255);\n\t\t\t$origValue = $header->{ 'value' };\n\t\t\tif ( array_key_exists($lcname, $ghRespHeaders) ) {\n\t\t\t\t// This is one of the standard headers we want to save.\n\t\t\t\t$column = $ghRespHeaders[$lcname];\n\t\t\t\t$hHeaders[$column] = ( array_key_exists($column, $hHeaders) ? $hHeaders[$column] . \", $value\" : $value );\n\t\t\t}\n\t\t\telse if ( \"set-cookie\" == $lcname ) {\n\t\t\t\t// We don't save the Set-Cookie header, just the size.\n\t\t\t\t$cookielen += strlen($origValue);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// All other headers are lumped together.\n\t\t\t\t$other .= ( $other ? \", \" : \"\" ) . \"$name = $origValue\";\n\t\t\t}\n\t\t}\n\t\tif ( $other ) {\n\t\t\tarray_push($aTuples, \"respOtherHeaders = '\" . mysqli_real_escape_string($link, $other) . \"'\");\n\t\t}\n\t\tif ( $cookielen ) {\n\t\t\tarray_push($aTuples, \"respCookieLen = $cookielen\");\n\t\t}\n\t\t// calculate expAge - number of seconds before resource expires\n\t\t// CVSNO - use the new computeRequestExpAge function.\n\t\t$expAge = 0;\n\t\t$cc = ( array_key_exists('resp_cache_control', $hHeaders) ? $hHeaders['resp_cache_control'] : null );\n\t\tif ( $cc && \n\t\t\t ( FALSE !== stripos($cc, \"must-revalidate\") || FALSE !== stripos($cc, \"no-cache\") || FALSE !== stripos($cc, \"no-store\") ) ) {\n\t\t\t// These directives dictate the response can NOT be cached.\n\t\t\t$expAge = 0;\n\t\t}\n\t\telse if ( $cc && FALSE !== ($posMaxage = stripos($cc, \"max-age=\")) ) {\n\t\t\t$expAge = intval(substr($cc, $posMaxage+8));\n\t\t}\n\t\telse if ( array_key_exists('resp_expires', $hHeaders) ) {\n\t\t\t// According to RFC 2616 ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.4 ):\n\t\t\t// freshness_lifetime = expires_value - date_value\n\t\t\t// If the Date: response header is present, we use that.\n\t\t\t// Otherwise we fall back to $startedDateTime which is based on the client so might suffer from clock skew.\n\t\t\t$startEpoch = ( array_key_exists('resp_date', $hHeaders) ? strtotime($hHeaders['resp_date']) : $startedDateTime );\n\t\t\t$expAge = strtotime($hHeaders['resp_expires']) - $startEpoch;\n\t\t}\n\t\tarray_push($aTuples, \"expAge = \" . ( $expAge < 0 ? 0 : $expAge ));\n\n\t\t// NOW add all the headers from both the request and response.\n\t\t$aHeaders = array_keys($hHeaders);\n\t\tfor ( $h = 0; $h < count($aHeaders); $h++ ) {\n\t\t\t$header = $aHeaders[$h];\n\t\t\tarray_push($aTuples, \"$header = '\" . mysqli_real_escape_string($link, $hHeaders[$header]) . \"'\");\n\t\t}\n\n\t\t// CUSTOM RULES\n\t\tif ( array_key_exists('_custom_rules', $entry) ) {\n\t\t\t$customrules = $entry->{'_custom_rules'};\n\t\t\tif ( array_key_exists('ModPageSpeed', $customrules) ) {\n\t\t\t\t$count = $customrules->{'ModPageSpeed'}->{'count'};\n\t\t\t\t// TODO array_push($aTuples, \"reqBodySize = $count\");\n\t\t\t}\n\t\t}\n\n\t\t// wrap it up\n\t\t$bFirstReq = 0;\n\t\t$bFirstHtml = 0;\n\t\tif ( ! $firstUrl ) {\n\t\t\tif ( (400 <= $status && 599 >= $status) || (12000 <= $status) ) {\n\t\t\t\tdprint(\"ERROR($gPagesTable pageid: $pageid): The first request ($url) failed with status $status.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// This is the first URL found associated with the page - assume it's the base URL.\n\t\t\t$bFirstReq = 1;\n\t\t\t$firstUrl = $url;\n\t\t}\n\t\tif ( ! $firstHtmlUrl && 200 == $status && $type == 'html' ) {\n\t\t\t// This is the first URL found associated with the page that's HTML.\n\t\t\t$bFirstHtml = 1;\n\t\t\t$firstHtmlUrl = $url;\n\t\t}\n\t\tarray_push($aTuples, \"firstReq = $bFirstReq\");\n\t\tarray_push($aTuples, \"firstHtml = $bFirstHtml\");\n\n\t\t$cmd = \"REPLACE INTO $gRequestsTable SET \" . implode(\", \", $aTuples) . \";\";\n\t\tdoSimpleCommand($cmd);\n\t}\n}", "function parseFullResults($results) {\n\t\tfor ($i = 0; $i < count($results); $i++) {\n\t\t\t$results[$i][\"hash\"] = getHashCode($results[$i][\"id\"]);\n\t\t\t$results[$i][\"title\"] = stripslashes($results[$i][\"title\"]);\n\t\t}\n\t\treturn $results;\n\t}", "public function api_entry_list() {\n $data = $this->Mdl_Users->get_list(\n $_POST['rp'],\n $_POST['page'],\n $_POST['query'],\n $_POST['qtype'],\n $_POST['sortname'],\n $_POST['sortorder']);\n\n echo json_encode(array(\n 'page'=>$_POST['page'],\n 'total'=>$this->Mdl_Users->get_length(),\n 'rows'=>$data,\n ));\n }", "private function reformateInput(){\n\n\n $articlegroupId = $this->searchKey('articleGroupId', $this->jsonBody);\n\n if($articlegroupId === null){\n $response = $this->unprocessableEntityResponse();\n return $response;\n }else{\n\n $articleName = $this->invoiceModel->getArticleName($articlegroupId);\n \n if($articleName === null){\n $response = $this->unprocessableEntityResponse();\n return $response;\n }elseif ($articleName == 'uriError') {\n \n $response = $this->badGatwayResponse();\n return $response;\n }\n\n $results=$this->readJson($this->jsonBody);\n\n $items = array(\n 'plu' => $results['values'][5],\n 'articleGroup' => $articleName,\n 'name' => $results['values'][7],\n 'price' => $results['values'][8]/100,\n 'quantity' => $results['values'][9],\n 'totalPrice' => $results['values'][10]/100);\n\n $responseJson= array(\n 'invoice' => $this->jsonBody['number'],\n 'date' => $this->jsonBody['date'],\n 'items' => [$items]);\n \n $responseJson = json_encode($responseJson);\n //print_r($responseJson);\n\n \n //initialized curl\n $ch = curl_init($this->toSendURL);\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, $responseJson);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n // Return response instead of outputting\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n //if success the result will be empty\n if($result !== false){\n $response = $this->badGatwayResponse();\n return $response;\n \n }\n else{\n $response['status_code_header'] = 'HTTP/1.1 200 OK';\n $response['body'] = $responseJson;\n //$response['body'] = $result;\n return $response;\n }\n\n\n // Close cURL resource\n curl_close($ch);\n \n \n }\n\n \n }", "private function parse($data): void\n {\n if (!isset($data['data'])) {\n App::cliLog('No records found');\n }\n\n $this->items = $data['data'];\n\n $parsedData = [];\n foreach ($this->items as $key => $item) {\n if ($key > $this->limit) break; //limit reached - exit; Api doesn't support limit\n\n $parsedData[] = [\n 'name' => $item['name'],\n 'description' => isset($item['description']) ? $item['description'] : 'No Description',\n 'image' => isset($item['labels']) ? $item['labels']['large'] : \"No Image\"\n ];\n }\n\n $this->items = $parsedData;\n }", "public function parse()\n {\n if (isset($_GET['from'])) {\n $fromTimestamp = strtotime($_GET['from']);\n } else {\n $fromTimestamp = time();\n }\n\n $fromTime = $this->formatTime($fromTimestamp);\n $queryParams = $this->buildApiQueryParams($fromTime);\n\n $responseJson = $this->requestNews($queryParams);\n\n try {\n return $this->handleResponse($responseJson);\n } catch (Exception $e) {\n if (strstr($e->getMessage(), \"Undefined index\") == \"\") {\n throw $e;\n }\n\n return json_encode([\n 'status' => 'error',\n 'reason' => 'bad response'\n ]);\n }\n }", "protected function c_parseClientAttributes() {\n\n //if (!preg_match('#successful#',$this->clientoutput->status))\n // return false;\n\n $k = -1;\n for ($i = 0 ; $i < count($this->clientoutput->response) ; $i++) {\t\n\t\t\n for ($j = 0 ; $j < (count($this->clientoutput->response[$i]) - 1) ; $j ++)\n if (!empty($this->clientoutput->response[$i][$j]['name'])) {\n $k++;\n $l = 0;\n $this->parsed[$k]['range'] = $this->clientoutput->response[$i]['attributes'];\n $this->parsed[$k]['name'] = $this->clientoutput->response[$i][$j]['name'];\n $this->parsed[$k]['type'] = $this->clientoutput->response[$i][$j]['type'];\n $this->parsed[$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n } else {\n $l ++;\n $this->parsed[$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n }\n\t\t}\t\t\t\n //$this->clientoutput->response = array();\n \n $this->client_attributes = new stdClass();\n for ($i = 0 ; $i < count($this->parsed) ; $i ++) {\n $name = $this->parsed[$i]['name'];\n $php_name = str_replace('-','_',$name);\n $type = $this->parsed[$i]['type'];\n $range = $this->parsed[$i]['range'];\n $this->client_attributes->$php_name = new stdClass();\n $this->client_attributes->$php_name->_type = $type;\n $this->client_attributes->$php_name->_range = $range;\n for ($j = 0 ; $j < (count($this->parsed[$i]) - 3) ; $j ++) {\n $value = $this->parsed[$i][$j];\n $index = '_value'.$j;\n $this->client_attributes->$php_name->$index = $value;\n }\n }\n \n $this->parsed = array();\n \n \n }", "public function parse()\n {\n # define URL Endpoint\n $url = 'https://api.myjson.com/bins/tl0bp';\n\n # parsing this api json response\n // $hotels_json = file_get_contents($url);\n\n # this to hold hotels array, true param to decode it as an array\n # ['hotels'] because i want hotels data only so i get it from parsed json\n $hotels = json_decode(file_get_contents($url), true)['hotels'];\n\n # get hotels array from its object\n // $hotels = $hotels_obj['hotels'];\n\n # return this hotels array\n return $hotels;\n }", "public static function get_entries_by_category_returns() {\n return new external_single_structure(array(\n 'count' => new external_value(PARAM_INT, 'The total number of records matching the request.'),\n 'entries' => new external_multiple_structure(\n self::get_entry_return_structure(true)\n ),\n 'ratinginfo' => \\core_rating\\external\\util::external_ratings_structure(),\n 'warnings' => new external_warnings()\n ));\n }", "public function convertResponse($values)\n {\n\t}", "function parse_response($response)\n {\n $data = $response->getBody();\n\n // Note we could not use Guzzle XML method becuase Endicia does not return valid XML it seems\n $sxe = new SimpleXMLElement($data);\n\n if ($sxe->status == 0) {\n $return_data = array();\n $return_data['Status'] = (string)$sxe->Status;\n $return_data['Base64LabelImage'] = (string)$sxe->Base64LabelImage;\n $return_data['TrackingNumber'] = (string)$sxe->TrackingNumber;\n $return_data['FinalPostage'] = (string)$sxe->FinalPostage;\n $return_data['TransactionID'] = (string)$sxe->TransactionID;\n $return_data['PostmarkDate'] = (string)$sxe->PostmarkDate;\n $return_data['DeliveryTimeDays'] = (string)$sxe->PostagePrice->DeliveryTimeDays;\n\t $return_data['error'] = (string)$data;\n \n\t\treturn $return_data;\n } else {\n return array('status' => 'error', 'message' => $sxe);\n }\n }", "public function parse (){\n $this->json = json_decode($this->content, true);\n $this->numItems = count ($this->json);\n }", "public function parse(){\n\t\t$this->_data = array();\n\t\n\t\ttry{\n\t\t\tparent::parse();\n\t\t\t\n\t\t\tif(!empty($this->_response)){\n\t\t\t\tif($this->_request['method'] == 'GetEvents'){\n\t\t\t\t\tif(is_array($this->_response->GetEventsResult->Event)){\n\t\t\t\t\t\tforeach($this->_response->GetEventsResult->Event as $event){\n\t\t\t\t\t\t\t$this->_data[] = $event;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(is_object($this->_response->GetEventsResult->Event)){\n\t\t\t\t\t\t$this->_data = $this->_response->GetEventsResult->Event;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}else if($this->_request['method'] == 'SearchEvents'){\n\t\t\t\t\tif(is_array($this->_response->SearchEventsResult->Event)){\n\t\t\t\t\t\tforeach($this->_response->SearchEventsResult->Event as $event){\n\t\t\t\t\t\t\t$this->_data[] = $event;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(is_object($this->_response->SearchEventsResult->Event)){\n\t\t\t\t\t\t$this->_data = $this->_response->SearchEventsResult->Event;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(!empty($this->_response->GetCountryByIDResult)){\n\t\t\t\t\t\t$this->_data = $this->_response->GetCountryByIDResult;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}catch(TNException $e){\n\t\t\t$err = $this->debug($e->getMessage());\n\t\t\techo $err;\n\t\t}\n\t\n\t\treturn $this;\n\t}", "private function parseEntry(array &$entry, array $mappedRelationships): void\n {\n // Remove the data object, because we only needed it to perform a HAVING search on it\n unset($entry['data']);\n\n foreach ($entry as $key => &$value) {\n // Only properties inside the data object are in the types array, not the ID for example\n if (!isset($this->properties[$key])) {\n continue;\n }\n\n /** @var Collection\\Property $property */\n $property = $this->properties[$key];\n $type = $property->getType();\n\n // JSON encoding collection property types\n if ($property->isTranslatable() || in_array($type->getType(), self::JSON, true)) {\n $value = json_decode($value, true);\n }\n\n // Cast the values to the correct format\n $this->performTypeCasting($type, $value);\n }\n\n // Prevent any problems with looped $value variable\n unset($value);\n\n // Parse the dates as ISO strings\n foreach (self::DATES as $date) {\n $dateTime = $entry[$date] instanceof DateTime ? $entry[$date] : new DateTime($entry[$date]);\n\n $entry[$date] = $dateTime->format(DateTime::ATOM);\n }\n\n // Update the user id's to become user objects\n foreach (self::USER_PROPERTIES as $id) {\n // Create a key without _id suffix\n $key = str_replace('_id', '', $id);\n\n // Create the new property with user object\n $entry[$key] = $this->users[$entry[$id]] ?? null;\n\n // No need to perform more actions when the user is NULL\n if ($entry[$key] !== null) {\n // Parse the users' dates\n foreach (self::DATES as $date) {\n /** @var DateTime $dateTime */\n $dateTime = $entry[$key][$date];\n\n $entry[$key][$date] = $dateTime !== null ? $dateTime->format(DateTime::ATOM) : null;\n }\n }\n\n // Unset the old value\n unset($entry[$id]);\n }\n\n // Insert the relationships\n $this->mapRelationships($mappedRelationships, $entry);\n }", "public function testParseResponse() {\n $data = $this->dl->parseResponse($this->sampleData, \"JSON\");\n $this->assertion($data['zip'], \"37931\", \"Parsed zip should equal 37931.\");\n $this->assertion($data['conditions'], \"clear sky\", \"Parsed conditions should equal clear sky.\");\n $this->assertion($data['pressure'], \"1031\", \"Parsed pressure should equal 1031.\");\n $this->assertion($data['temperature'], \"35\", \"Parsed temperature should equal 35.\");\n $this->assertion($data['windDirection'], \"ESE\", \"Parsed wind direction should equal ESE.\");\n $this->assertion($data['windSpeed'], \"1.06\", \"Parsed wind speed should equal 1.06.\");\n $this->assertion($data['humidity'], \"80\", \"Parsed humidity should equal 80.\");\n $this->assertion($data['timestamp'], \"1518144900\", \"Parsed timestamp should equal 1518144900.\");\n }", "protected function _hydrateEntry($entry) {\n\t\t//echo \"Hydrating: \"; print_r($entry);\n\t\t\n\t\tif ($entry->published && is_numeric($entry->published)) {\n\t\t\t$entry->published = date('c', $entry->published);\n\t\t}\n\n\t\tif ($entry->updated && is_numeric($entry->updated) && $entry->updated>0) {\n\t\t\t$entry->updated = date('c', $entry->updated);\n\t\t}\n\t\t\n\t\tif ($entry->author_id) {\n\t\t\t$entry->author = $this->getAuthorById($entry->author_id);\n\t\t\t//echo \"Hydrating author: \"; print_r($entry->author);\n\t\t\tunset($entry->author_id);\n\t\t}\n\t\t\n\t\treturn $entry;\n\t}", "public function convertResponse($values)\n {\n\n\t}", "private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }", "private function formatResponse($response) {\n\n $callback = function($item) {\n $formatted = [\n 'spotify_id' => $item['id'],\n 'name' => $item['name'],\n 'image_small' => null,\n 'image_large' => null,\n ];\n\n if (isset($item['images']) && count($item['images'])) {\n $smallImageIndex = (isset($item['images'][2]) && isset($item['images'][2]['width']) && $item['images'][2]['width'] < 170) ? 1 : 2;\n $formatted['image_small'] = $this->getImage($item['images'], $smallImageIndex);\n $formatted['image_large'] = $this->getImage($item['images']);\n }\n\n if (isset($item['popularity'])) {\n $formatted['spotify_popularity'] = $item['popularity'];\n }\n\n if (isset($item['duration_ms'])) {\n $formatted['duration'] = $item['duration_ms'];\n }\n\n if (isset($item['track_number'])) {\n $formatted['number'] = $item['track_number'];\n }\n\n if (isset($item['genres'])) {\n $formatted['genres'] = implode('|', $item['genres']);\n }\n\n if (isset($item['artists']) && count($item['artists'])) {\n $formatted['artists'] = $item['artists'];\n }\n\n if (isset($item['album']) && count($item['album'])) {\n $formatted['album'] = $item['album'];\n\n if ( ! isset($formatted['image'])) {\n if (isset($item['album']['images'][2]['url'])) {\n $formatted['image'] = $item['album']['images'][2]['url'];\n } else {\n $formatted['image'] = head($item['album']['images']);\n }\n\n }\n }\n\n return $formatted;\n };\n\n $formatted = ['albums' => [], 'tracks' => [], 'artists' => []];\n\n if ( ! isset($response['error'])) {\n $formatted['albums'] = $this->getAlbums(isset($response['albums']['items']) ? $response['albums']['items'] : []);\n $formatted['tracks'] = array_map($callback, isset($response['tracks']['items']) ? $response['tracks']['items'] : []);\n $formatted['artists'] = array_map($callback, isset($response['artists']['items']) ? $response['artists']['items'] : []);\n }\n\n return $formatted;\n }", "protected function parse()\n {\n // [square] ..... visible comments (don't count as words for sorting, don't act as keywords)\n // (round) ....... for optional parts (count as words for sorting, act as keywords)\n // {curly} ........ word class definitions (use word class field instead, except for gender tags like {f}, {pl}, ...)\n\n while (($line = fgets($this->handle)) !== false) {\n if (strpos($line, '#') === 0) {\n continue;\n }\n\n if (trim($line) === '') {\n continue;\n }\n\n $data = preg_split('/[\\t]+/', $line);\n\n $headword = trim($data[0]);\n $translation = trim($data[1]);\n $wordclass = '';\n $subject = '';\n\n if (count($data) > 2) {\n $wordclass = trim($data[2]);\n }\n\n if (count($data) > 3) {\n $subject = trim($data[3]);\n }\n\n $entry = new Entry();\n\n $entry->directionId = $this->directionId;\n $entry->headword = $headword;\n $entry->translation = $translation;\n $entry->wordclass = $wordclass;\n\n $entry->subjects = $entry->getParsedSubjects($subject);\n $entry->parseHeadword();\n $entry->parseTranslation();\n\n yield $entry->jsonSerialize();\n }\n }", "abstract protected function parseResponse($response);", "public static function get_entries_to_approve_returns() {\n return new external_single_structure(array(\n 'count' => new external_value(PARAM_INT, 'The total number of records matching the request.'),\n 'entries' => new external_multiple_structure(\n self::get_entry_return_structure()\n ),\n 'ratinginfo' => \\core_rating\\external\\util::external_ratings_structure(),\n 'warnings' => new external_warnings()\n ));\n }", "protected function parse() {\n\n\t\t// only perform actions when we have a file\n\t\tif( Storage::exists('postal/data.txt') ) {\n\n\t\t\t// get the contents from storage\n\t\t\t$data = Storage::get('postal/data.txt');\n\n\t\t\t// add a header\n\t\t\t$data = \"Code1\\tPlace1\\tCode2\\tPlace2\\tType\\n\". $data;\n\n\t\t\t// convert to utf-8\n\t\t\t$data = iconv('ISO-8859-1', \"UTF-8\", $data);\n\n\t\t\t// set parser settings\n\t\t\t$this->parser->encoding('UTF-8');\n\t\t\t$this->parser->delimiter = \"\\t\";\n\n\t\t\t// parse the data\n\t\t\t$this->parser->parse( $data );\n\n\t\t\t// get the parsed csv\n\t\t\t$parsed = $this->parser->data;\n\n\t\t\t// empty arrays\n\t\t\t$codes = array();\n\n\t\t\t// loop items\n\t\t\tforeach($parsed as $parse) {\n\t\t\t\t\n\t\t\t\t$codes[] = array( 'code' => $parse['Code1'], 'place' => S::toTitleCase( $parse['Place1'] ) );\n\t\t\t\t$codes[] = array( 'code' => $parse['Code2'], 'place' => S::toTitleCase( $parse['Place2'] ) );\n\t\t\t}\n\n\t\t\t$this->data = $codes;\n\n\t\t}\n\n\t}", "public static function get_entries_by_author_returns() {\n return new external_single_structure(array(\n 'count' => new external_value(PARAM_INT, 'The total number of records matching the request.'),\n 'entries' => new external_multiple_structure(\n self::get_entry_return_structure()\n ),\n 'ratinginfo' => \\core_rating\\external\\util::external_ratings_structure(),\n 'warnings' => new external_warnings()\n ));\n }", "private function getPosts () {\n\t\t//separate url string\n\t\t$pieces = explode(\"/\", $_SERVER['REQUEST_URI']);\n\t\tif ($pieces[1] == 'blog') //request is for single blog \n\t\t\t$hostname = $pieces[2];\n\t\telse //request is for any blog\n\t\t\t$hostname = null;\n\t\tif (isset($_GET['limit'])) \n\t\t\t$limit = $_GET['limit'];\n\t\t else \n\t\t\t$limit = 10;\n\t\tif (isset($_GET['order'])) \n\t\t\t$format = $_GET['order'];\n\t\t else { //no ordering provided; error response\n\t\t\techo \"You must provide valid 'order' parameter as either 'recent' or 'trending' no results\\n\";\n\t\t\t$this->response('', 400);\n\t\t\treturn;\n\t\t}\n\n\t\t//customize query to include only results with specified hostname\n\t\tif ($hostname)\n\t\t\t$restrict = \" WHERE hostname = '\".$hostname.\"'\";\n\t\telse \n\t\t\t$restrict = \"\";\n\n\t\t//get post table\n\t\t$query = \"SELECT * FROM a2_posts\".$restrict;\n\t\t$res = $this->sendQuery($query);\n\t\t$postsArray = $this->sqlResToArray($res);\n\n\t\tif (!$postsArray) { //could not query db for host name\n\t\t\techo \"That blog hostname is invalid or not being tracked; no results\\n\";\n\t\t\t$this->response('', 400);\t\t\n\t\t\treturn;\n\t\t}\n\n\t\t//get tracking table\n\t\t$query = \"SELECT * FROM a2_tracking\".$restrict;\n\t\t$res = $this->sendQuery($query);\n\t\t$trackingArray = $this->sqlResToArray($res);\n\n\t\t$topLayer = array(); //top level of JSON response\n\t\t$postPackage = array(); //array for individual post\n\n\t\t//loop through each entry in a2_posts, insert each post into array\n\t\t//include all extra info\n\t\tforeach ($postsArray as $post) {\n\t\t\t$singlePost = array();\n\t\t\t$singlePost[\"url\"] = $post[\"url\"];\n\t\t\t$singlePost[\"text\"] = $post[\"text\"];\n\t\t\t$singlePost[\"image\"] = $post[\"image\"];\n\t\t\t$singlePost[\"date\"] = $post[\"date\"];\n\t\t\t\n\t\t\t//create the individual tracking array for this post ...\n\t\t\t$trackingCollection = array();\n\t\t\tforeach ($trackingArray as $temp) {\n\t\t\t\t$singleTracking = array(); //array for this tracking\n\t\t\t\tif ($temp[\"url\"] == $post[\"url\"]) {\n\t\t\t\t\t$singleTracking[\"timestamp\"] = $temp[\"timestamp\"];\n\t\t\t\t\t$singleTracking[\"sequence\"] = $temp[\"sequence\"];\n\t\t\t\t\t$singleTracking[\"increment\"] = $temp[\"increment\"];\n\t\t\t\t\t$singleTracking[\"count\"] = $temp[\"count\"];\n\t\t\t\t\tarray_push($trackingCollection, $singleTracking);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//sort trackings by sequence\n\t\t\t//must reset $sequence array here or previous data will carry over and bug out the cmp\n\t\t\t$sequence = array(); \n\t\t\tforeach ($trackingCollection as $key => $row) {\n\t\t\t\t$sequence[$key] = $row['sequence'];\n\t\t\t}\n\n\t\t\tarray_multisort($sequence, SORT_DESC, $trackingCollection);\n\t\t\t//push last_track and last_count\n\t\t\t$singlePost[\"last_track\"] = $trackingCollection[0][\"timestamp\"];\n\t\t\t$singlePost[\"last_count\"] = $trackingCollection[0][\"count\"];\n\t\t\t//push tracking array to this post's array\n\t\t\t$singlePost[\"tracking\"] = $trackingCollection;\n\t\t\t//push this post array to the top array\n\t\t\tarray_push($postPackage, $singlePost); \n\t\t}\n\n\t\t//formatting branch for either \"trending\" or \"recent\"\n\t\tif ($format == \"trending\" || $format == \"Trending\") {\n\t\t\t//comparison function for trending (ie. max increment in last tracking)\n\t\t\tfunction compareByRecentIncrement ($a, $b) {\n\t\t\t\treturn $b[\"tracking\"][0][\"increment\"] - $a[\"tracking\"][0][\"increment\"];\n\t\t\t}\n\t\t\t//sort top layer with cmp function\n\t\t\tusort($postPackage, \"compareByRecentIncrement\");\n\t\t\t//slice by limit\n\t\t\t$topLayer[\"trending\"] = array_slice($postPackage, 0, $limit);\n\t\t\t$order = \"Trending\";\n\n\t\t} else if ($format == \"recent\" || $format == \"Recent\") {\n\t\t\t//comparison function for most recent (ie. lowest max sequence)\n\t\t\tfunction compareBySequence ($a, $b) {\n\t\t\t\treturn $a[\"tracking\"][0][\"sequence\"] - $b[\"tracking\"][0][\"sequence\"];\n\t\t\t}\n\t\t\t//sort top layer with cmp function\n\t\t\tusort($postPackage, \"compareBySequence\");\n\t\t\t$topLayer[\"recent\"] = array_slice($postPackage, 0, $limit);\n\t\t\t$order = \"Recent\";\n\t\t}\n\t\t//tack on the rest of top layer info\n\t\t$topLayer[\"order\"] = $order;\n\t\t$topLayer[\"limit\"] = $limit;\n\n\t\t$jsonData = json_encode($topLayer);\n\t\t$this->response($jsonData, 200);\n\t}", "function entry_parse($entry)\n{\n\n // Address\n if (!empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['city'];\n }\n if (!empty($entry['state']) && !empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['state'];\n }\n if (!empty($entry['zip']) && !empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['zip'];\n }\n $entry['address'] = ltrim($entry['address'], ', ');\n\n // DB Connection\n $db = DB::get('directory');\n\n // Images\n $result = $db->prepare(\"SELECT `file` FROM `\" . Settings::getInstance()->TABLES['UPLOADS'] . \"` WHERE `row` = :row AND `type` = :type ORDER BY `order` ASC;\");\n\n // Logo\n $result->execute(array('row' => $entry['id'], 'type' => 'directory_logo'));\n $logo = $result->fetchColumn();\n if (!empty($logo)) {\n $entry['logo'] = '/uploads/' . $logo;\n }\n\n // Thumbnails\n $result->execute(array('row' => $entry['id'], 'type' => 'directory'));\n $thumbnails = $result->fetchAll();\n if (!empty($thumbnails)) {\n $entry['thumbnails'] = array_map(function ($image) {\n return '/uploads/' . $image['file'];\n }, $thumbnails);\n }\n\n // Main Image (Logo, Thumbnail, No Image)\n $entry['image'] = !empty($entry['logo']) ? $entry['logo'] : false;\n if (empty($entry['image']) && !empty($entry['thumbnails'])) {\n $entry['image'] = $entry['thumbnails'][0];\n }\n $entry['image'] = !empty($entry['image']) ? $entry['image'] : '/img/404.gif';\n\n // Website URL\n if (!empty($entry['website'])) {\n // Escape HTML\n $entry['website'] = htmlspecialchars($entry['website']);\n // Prepend HTTP:// If Needed\n if (!preg_match('#http://#', $entry['website'])) {\n $entry['website'] = 'http://' . $entry['website'];\n }\n // Turn into Anchor Link\n if ($entry['website_link'] == 'Y') {\n $entry['website'] = '<a href=\"' . $entry['website'] . '\" target=\"_blank\"' . ($entry['no_follow'] == 'Y' ? ' rel=\"nofollow\"' : '') . '>' . preg_replace('#^http://#', '', rtrim($entry['website'], '/')) . '</a>';\n }\n }\n\n // Append rel=\"nofollow\" to Anchors\n if ($entry['no_follow'] == 'Y') {\n $entry['description'] = preg_replace(\"/<\\s*a\\s+(.+?)>/i\", '<a $1 rel=\"nofollow\">', $entry['description']);\n }\n\n // URL Details\n if (!empty($entry['primary_category'])) {\n $entry_dir = $entry['primary_category'];\n } elseif (!empty($_GET['category'])) {\n $entry_dir = $_GET['category'];\n } else {\n $entry_cats = explode(',', $entry['categories']);\n $entry_dir = $entry_cats[0];\n }\n $entry['url_details'] = sprintf(URL_DIRECTORY_LISTING, $entry_dir, $entry['link']);\n\n // Return Entry\n return $entry;\n}", "protected function prepare_response()\n\t{\n\t\t$rules_code = get_optional_param('rules_code');\n\t\t$game_id = (int)get_optional_param('game_id');\n\t\t$event_id = (int)get_optional_param('event_id');\n\t\t$tournament_id = (int)get_optional_param('tournament_id');\n\t\t$club_id = (int)get_optional_param('club_id');\n\t\t$page_size = (int)get_optional_param('page_size', API_DEFAULT_PAGE_SIZE);\n\t\t$page = (int)get_optional_param('page');\n\t\t$detailed = isset($_REQUEST['detailed']) || (isset($_REQUEST['lod']) && $_REQUEST['lod'] > 0);\n\t\t\n\t\tif (!is_valid_rules_code($rules_code))\n\t\t{\n\t\t\tif ($game_id > 0)\n\t\t\t{\n\t\t\t\tlist($rules_code) = Db::record('rules', 'SELECT rules FROM games WHERE id = ?', $game_id);\n\t\t\t}\n\t\t\telse if ($event_id > 0)\n\t\t\t{\n\t\t\t\tlist($rules_code) = Db::record('rules', 'SELECT rules FROM events WHERE id = ?', $event_id);\n\t\t\t}\n\t\t\telse if ($tournament_id > 0)\n\t\t\t{\n\t\t\t\tlist($rules_code) = Db::record('rules', 'SELECT rules FROM tournaments WHERE id = ?', $tournament_id);\n\t\t\t}\n\t\t\telse if ($club_id > 0)\n\t\t\t{\n\t\t\t\tlist($rules_code) = Db::record('rules', 'SELECT rules FROM clubs WHERE id = ?', $club_id);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exc(get_label('Unknown [0]', get_label('rules')));\n\t\t\t}\n\t\t}\n\t\t$this->response['rules'] = rules_code_to_object($rules_code, $detailed);\n\t}", "public function parse(): object\n {\n $parsed = [\n 'host_status' => $this->host_status,\n 'raw' => $this->results,\n ];\n\n if (count($this->round_trip_time) > 0) {\n $parsed['latency'] = $this->round_trip_time['avg'];\n $parsed['rtt'] = (object) $this->round_trip_time;\n }\n\n if (count($this->sequence) > 0) {\n $parsed['sequence'] = (object) $this->sequence;\n }\n\n if (count($this->statistics) > 0) {\n $parsed['statistics'] = (object) $this->statistics;\n }\n\n return (object) $parsed;\n }", "public function entries();", "public function response () \n {\n //if entries is empty,it means user want to delete all task entries\n if ($this->entries->isEmpty()) return $this->deleteAll();\n\n //General validation of incomming entries\n $this->validateEntries();\n\n //update the entries of the task\n $new_entries = $this->saveBundleEntries();\n\n //change task status depending on the last entry\n $this->changeRecordStatus($new_entries);\n\n return $this->buildResponse($new_entries);\n }", "public function parse($array_result) {\n\t\tforeach ($array_result[\"items\"] as $s) {\n\n\t\t\t$entry = Socialmedia_Message_Model::getMessage($s[\"id\"], $this->service->id);\n\n\t\t\t// don't resave messages we already have\n\t\t\tif (! $entry->loaded) \n\t\t\t{\t\t\t\t\n\t\t\t\t$object = $s[\"object\"];\n\n\t\t\t\tif (empty($object[\"content\"])) {\n\t\t\t\t\t$object[\"content\"] = \"[\" . Kohana::lang('gplus.empty') . \"]\";\n\t\t\t\t}\n\n\t\t\t\t// set message data\n\t\t\t\t$entry->setServiceId($this->service->id);\n\t\t\t\t$entry->setMessageFrom($this->service->service_name);\t\t\t\t\n\t\t\t\t$entry->setMessageLevel($entry::STATUS_TOREVIEW);\n\t\t\t\t$entry->setMessageId($s[\"id\"]);\n\t\t\t\t$entry->setMessageDetail($object[\"content\"]);\n\t\t\t\t$date = strtotime($s[\"published\"]);\n\t\t\t\t$entry->setMessageDate(date(\"Y-m-d H:i:s\", $date));\n\n\t\t\t\t$entry->setAuthor(\n\t\t\t\t\t$s[\"actor\"][\"id\"], \n\t\t\t\t\t$s[\"actor\"][\"displayName\"],\n\t\t\t\t\tnull,\n\t\t\t\t\tnull\n\t\t\t\t);\n\n\t\t\t\t$media = array();\n\n\t\t\t\tif (isset($object[\"attachments\"])) \n\t\t\t\t{\n\t\t\t\t\tforeach ($object[\"attachments\"] as $obj) \n\t\t\t\t\t{\n\t\t\t\t\t\tif ($obj[\"objectType\"] == \"hangout\") continue;\n\n\t\t\t\t\t\tswitch ($obj[\"objectType\"]) {\n\t\t\t\t\t\t\tcase \"article\":\n\t\t\t\t\t\t\t\t$index = \"url\";\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase \"album\":\n\t\t\t\t\t\t\t\t$index = \"other\";\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$index = $obj[\"objectType\"];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$media[$index][] = $obj[\"url\"];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// geo data\n\t\t\t\tif (isset($s[\"geocode\"]))\n\t\t\t\t{\n\t\t\t\t\tdie($s[\"geocode\"]);\n\t\t\t\t\tif (isset($s[\"place\"][\"location\"][\"latitude\"])) \n\t\t\t\t\t{\n\t\t\t\t\t\t$entry->setCoordinates($s[\"place\"][\"location\"][\"latitude\"], $s[\"place\"][\"location\"][\"latitude\"]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// save message and assign data to it\n\t\t\t\t$entry->save();\n\n\t\t\t\t$entry->addData(\"url\", $s[\"url\"]);\n\t\t\t\t$entry->addAssets($media);\t\t\t\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function complexListing(){\n\t\t//if someone knows, please make it better\n\t\t$formatResponse = new ResponseModel();\n\t\t$enrollmentModel = new EnrollmentModel();\n\t\t$formatResponse->data = [];\n\t\tforeach ($enrollmentModel->getStudentbyClass() as $item) {\n\t\t\t$new_item[\"fullname\"] = $item[\"firstname\"] . \" \" . $item[\"lastname\"];\n\t\t\t$new_item[\"birtdate\"] = date(\"d F Y\",strtotime($item[\"birthdate\"]));\n\t\t\t$new_item[\"enrollments\"] = $enrollmentModel->getClassByIdStudent($item[\"student_id\"]);\n\t\t\tarray_push($formatResponse->data,$new_item);\n\t\t}\n\t\treturn $this->respond($formatResponse);\n\t}", "function breakIntoDataStructure( $entry ){\n\tif(!is_string($entry)) return;\n\t$s = array();\n\t$key_value_pairs = explode(\"\\t\", $entry);\n\tforeach($key_value_pairs as $pair){\n\t\tlist($key, $value) = explode(\"#\", $pair);\n\t\t$s[trim($key)] = trim($value);\n\t}\n\tforeach($s as $k => $v){\n\t\tif(preg_match(\"/!_!/\", $v, $m)){\n\t\t\t$values = explode(\"!_!\", $v);\n\t\t\tforeach($values as &$value){\n\t\t\t\t$value = trim($value);\n\t\t\t}\n\t\t\t$s[trim($k)] = $values;\n\t\t}\n\t}\n\t/*\n\t// do lots of unnecessary logic in making $s['desc']\n\tif(isset($s['note']) || isset($s['function'])){\n\t\tif(isset($s['note']) && isset($s['function'])){\n\t\t\t$s['desc'] = $s['note'] . \"<br />\\n\" . $s['function'];\n\t\t} else {\n\t\t\tif(isset($s['note'])) $s['desc'] .= $s['note'];\n\t\t\tif(isset($s['function'])) $s['desc'] .= $s['function'];\n\t\t}\n\t} else {\n\t\t$s['desc'] = $s['product'];\n\t}\n\t*/\n\treturn $s;\n}", "public static function get_entries_by_author_id_returns() {\n return new external_single_structure(array(\n 'count' => new external_value(PARAM_INT, 'The total number of records matching the request.'),\n 'entries' => new external_multiple_structure(\n self::get_entry_return_structure()\n ),\n 'ratinginfo' => \\core_rating\\external\\util::external_ratings_structure(),\n 'warnings' => new external_warnings()\n ));\n }", "static protected function _parse_response($s)\n {\n $a = (($a = json_decode(trim($s))) && (count(self::$_fields) == @count($a)))\n ? array_combine(self::$_fields, $a)\n : false;\n if ($a) {\n $a['locality'] = &$a['city'];\n }\n return $a;\n }", "function parseEntry( array $entry ): array {\n\t[ $frame, $LU ] = $entry[0];\n\n\t$linearDoc = linearize( $entry[1] );\n\t$text = stringify( $linearDoc );\n\n\tif ( trim( $LU ) === '' ) {\n\t\t$LU = '???';\n\t}\n\n\tif ( trim( $frame ) === '' ) {\n\t\t$frame = '???';\n\t}\n\n\treturn [ \"TransFrameNet:$frame\" => [ $LU => $text ] ];\n}", "function _format_get($data)\n \t{\n\t \t$data = parent::_format_get($data);\n \t\n\t\t$data['CMS_BucketsLabels'] = (! empty($data['CMS_BucketsLabels'])) ? json_decode($data['CMS_BucketsLabels'], TRUE) : array();\n\t\t$data['CMS_BucketsLookUps'] = (! empty($data['CMS_BucketsLookUps'])) ? json_decode($data['CMS_BucketsLookUps'], TRUE) : array();\n\t\t$data['CMS_BucketsFields'] = (! empty($data['CMS_BucketsFields'])) ? json_decode($data['CMS_BucketsFields'], TRUE) : array();\n\t\t$data['CMS_BucketsDisplay'] = (! empty($data['CMS_BucketsDisplay'])) ? json_decode($data['CMS_BucketsDisplay'], TRUE) : array();\n\t\t$data['CMS_BucketsListview'] = (! empty($data['CMS_BucketsListview'])) ? json_decode($data['CMS_BucketsListview'], TRUE) : array();\n \t\treturn $data;\n \t}", "protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }", "public static function getResponse1013() {\n\n return '{\"indicator\":{\"name\":\"Término de facturación de energía activa del PVPC peaje por defecto\",\"short_name\":\"PVPC T. Defecto\",\"id\":1013,\"composited\":false,\"step_type\":\"linear\",\"disaggregated\":false,\"magnitud\":[{\"name\":\"Precio\",\"id\":23}],\"tiempo\":[{\"name\":\"Hora\",\"id\":4}],\"geos\":[{\"geo_id\":3,\"geo_name\":\"España\"}],\"values_updated_at\":\"2017-03-01T21:01:30.000+01:00\",\"values\":[{\"value\":116.62,\"datetime\":\"2017-03-01T00:00:00.000+01:00\",\"datetime_utc\":\"2017-02-28T23:00:00Z\",\"tz_time\":\"2017-02-28T23:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":110.32,\"datetime\":\"2017-03-01T01:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T00:00:00Z\",\"tz_time\":\"2017-03-01T00:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":108.17,\"datetime\":\"2017-03-01T02:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T01:00:00Z\",\"tz_time\":\"2017-03-01T01:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.71,\"datetime\":\"2017-03-01T03:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T02:00:00Z\",\"tz_time\":\"2017-03-01T02:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.73,\"datetime\":\"2017-03-01T04:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T03:00:00Z\",\"tz_time\":\"2017-03-01T03:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":108.94,\"datetime\":\"2017-03-01T05:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T04:00:00Z\",\"tz_time\":\"2017-03-01T04:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.5,\"datetime\":\"2017-03-01T06:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T05:00:00Z\",\"tz_time\":\"2017-03-01T05:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.41,\"datetime\":\"2017-03-01T07:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T06:00:00Z\",\"tz_time\":\"2017-03-01T06:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.35,\"datetime\":\"2017-03-01T08:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T07:00:00Z\",\"tz_time\":\"2017-03-01T07:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.0,\"datetime\":\"2017-03-01T09:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T08:00:00Z\",\"tz_time\":\"2017-03-01T08:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":118.97,\"datetime\":\"2017-03-01T10:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T09:00:00Z\",\"tz_time\":\"2017-03-01T09:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":117.2,\"datetime\":\"2017-03-01T11:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T10:00:00Z\",\"tz_time\":\"2017-03-01T10:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":113.84,\"datetime\":\"2017-03-01T12:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T11:00:00Z\",\"tz_time\":\"2017-03-01T11:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":114.1,\"datetime\":\"2017-03-01T13:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T12:00:00Z\",\"tz_time\":\"2017-03-01T12:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":113.76,\"datetime\":\"2017-03-01T14:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T13:00:00Z\",\"tz_time\":\"2017-03-01T13:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":111.74,\"datetime\":\"2017-03-01T15:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T14:00:00Z\",\"tz_time\":\"2017-03-01T14:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.47,\"datetime\":\"2017-03-01T16:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T15:00:00Z\",\"tz_time\":\"2017-03-01T15:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":110.25,\"datetime\":\"2017-03-01T17:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T16:00:00Z\",\"tz_time\":\"2017-03-01T16:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":116.76,\"datetime\":\"2017-03-01T18:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T17:00:00Z\",\"tz_time\":\"2017-03-01T17:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":120.51,\"datetime\":\"2017-03-01T19:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T18:00:00Z\",\"tz_time\":\"2017-03-01T18:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.13,\"datetime\":\"2017-03-01T20:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T19:00:00Z\",\"tz_time\":\"2017-03-01T19:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":123.15,\"datetime\":\"2017-03-01T21:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T20:00:00Z\",\"tz_time\":\"2017-03-01T20:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.9,\"datetime\":\"2017-03-01T22:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T21:00:00Z\",\"tz_time\":\"2017-03-01T21:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":120.44,\"datetime\":\"2017-03-01T23:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T22:00:00Z\",\"tz_time\":\"2017-03-01T22:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":123.3,\"datetime\":\"2017-03-02T00:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T23:00:00Z\",\"tz_time\":\"2017-03-01T23:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"}]}}';\n }", "private static function process(array $entries)\n {\n /** @var \\GrahamCampbell\\ResultType\\Result<\\Dotenv\\Parser\\Entry[],string> */\n return \\array_reduce($entries, static function (Result $result, string $raw) {\n return $result->flatMap(static function (array $entries) use ($raw) {\n return EntryParser::parse($raw)->map(static function (Entry $entry) use ($entries) {\n /** @var \\Dotenv\\Parser\\Entry[] */\n return \\array_merge($entries, [$entry]);\n });\n });\n }, Success::create([]));\n }", "protected static function get_entry_return_structure($includecat = false) {\n $params = array(\n 'id' => new external_value(PARAM_INT, 'The entry ID'),\n 'glossaryid' => new external_value(PARAM_INT, 'The glossary ID'),\n 'userid' => new external_value(PARAM_INT, 'Author ID'),\n 'userfullname' => new external_value(PARAM_NOTAGS, 'Author full name'),\n 'userpictureurl' => new external_value(PARAM_URL, 'Author picture'),\n 'concept' => new external_value(PARAM_RAW, 'The concept'),\n 'definition' => new external_value(PARAM_RAW, 'The definition'),\n 'definitionformat' => new external_format_value('definition'),\n 'definitiontrust' => new external_value(PARAM_BOOL, 'The definition trust flag'),\n 'definitioninlinefiles' => new external_files('entry definition inline files', VALUE_OPTIONAL),\n 'attachment' => new external_value(PARAM_BOOL, 'Whether or not the entry has attachments'),\n 'attachments' => new external_files('attachments', VALUE_OPTIONAL),\n 'timecreated' => new external_value(PARAM_INT, 'Time created'),\n 'timemodified' => new external_value(PARAM_INT, 'Time modified'),\n 'teacherentry' => new external_value(PARAM_BOOL, 'The entry was created by a teacher, or equivalent.'),\n 'sourceglossaryid' => new external_value(PARAM_INT, 'The source glossary ID'),\n 'usedynalink' => new external_value(PARAM_BOOL, 'Whether the concept should be automatically linked'),\n 'casesensitive' => new external_value(PARAM_BOOL, 'When true, the matching is case sensitive'),\n 'fullmatch' => new external_value(PARAM_BOOL, 'When true, the matching is done on full words only'),\n 'approved' => new external_value(PARAM_BOOL, 'Whether the entry was approved'),\n 'tags' => new external_multiple_structure(\n \\core_tag\\external\\tag_item_exporter::get_read_structure(), 'Tags', VALUE_OPTIONAL\n ),\n );\n\n if ($includecat) {\n $params['categoryid'] = new external_value(PARAM_INT, 'The category ID. This may be' .\n ' \\''. GLOSSARY_SHOW_NOT_CATEGORISED . '\\' when the entry is not categorised', VALUE_DEFAULT,\n GLOSSARY_SHOW_NOT_CATEGORISED);\n $params['categoryname'] = new external_value(PARAM_RAW, 'The category name. May be empty when the entry is' .\n ' not categorised, or the request was limited to one category.', VALUE_DEFAULT, '');\n }\n\n return new external_single_structure($params);\n }", "protected function _buildFeedData() {\n\t\t$items = $this->_getItems();\n\t\t// array_map must be on an array - $items is a collection so need to get the\n\t\t// underlying array to pass to array_map\n\t\treturn array_map(array($this, '_applyMapping'), $items->getItems());\n\t}", "protected function formatResult()\n\t{\n\t\t$this->arResult =& $this->dbResult;\n\t\t$this->arResult['ERRORS'] =& $this->errors;\n\n\t\t$this->arResult['FORM_ID'] = 'CRM_LOC_EDIT_FORM';\n\t\t$this->arResult['GRID_ID'] = 'CRM_LOC_EDIT_GRID';\n\n\t\tforeach($this->componentData['FORM_ROWS'] as $code => $row)\n\t\t{\n\t\t\t$required = $row['required'];\n\n\t\t\tif(!$required && mb_substr($code, 0, 5) == 'NAME_')\n\t\t\t\t$required = true;\n\n\t\t\t$this->arResult['FIELDS'][] = array(\n\t\t\t\t'id' => $code,\n\t\t\t\t'name' => $row['title'],\n\t\t\t\t'value' => Helper::makeSafeDisplay($this->arResult['FORM_DATA'][$code], $code),\n\t\t\t\t'required' => $required,\n\t\t\t\t'type' => 'text' // can and will be redefined at the template\n\t\t\t);\n\t\t}\n\n\t\tif($this->checkIsNonemptyArray($this->arResult['EXTERNAL_SERVICES']))\n\t\t{\n\t\t\t$this->arResult['FIELDS'][] = array(\n\t\t\t\t'id' => 'EXTERNAL',\n\t\t\t\t'required' => false\n\t\t\t);\n\t\t}\n\n\t\t$this->arResult['EXTERNAL_TABLE_COLUMNS'] = Helper::getExternalMap();\n\n\t\tunset($this->componentData);\n\t}", "protected function formatResult()\n\t{\n\t\t$this->arResult['CLIENT_INFO'] = $this->clientInfo;\n\t\t$this->arResult['ERRORS'] = $this->errors;\n\n\t\t$this->arResult['AP_MANAGE_URL'] = static::PATH_AP_MANAGE;\n\n\t\t$this->arResult['CLIENT_ACCESS'] = $this->clientAccess;\n\t}", "private function _populateEntryModel(Entry $entry)\n {\n $request = Craft::$app->getRequest();\n\n // Set the entry attributes, defaulting to the existing values for whatever is missing from the post data\n $entry->typeId = $request->getBodyParam('typeId', $entry->typeId);\n $entry->slug = $request->getBodyParam('slug', $entry->slug);\n if (($postDate = $request->getBodyParam('postDate')) !== null) {\n $entry->postDate = DateTimeHelper::toDateTime($postDate) ?: null;\n }\n if (($expiryDate = $request->getBodyParam('expiryDate')) !== null) {\n $entry->expiryDate = DateTimeHelper::toDateTime($expiryDate) ?: null;\n }\n $entry->enabled = (bool)$request->getBodyParam('enabled', $entry->enabled);\n $entry->enabledForSite = $entry->getSection()->getHasMultiSiteEntries()\n ? (bool)$request->getBodyParam('enabledForSite', $entry->enabledForSite)\n : true;\n $entry->title = $request->getBodyParam('title', $entry->title);\n\n if (!$entry->typeId) {\n // Default to the section's first entry type\n $entry->typeId = $entry->getSection()->getEntryTypes()[0]->id;\n }\n\n // Prevent the last entry type's field layout from being used\n $entry->fieldLayoutId = null;\n\n $fieldsLocation = $request->getParam('fieldsLocation', 'fields');\n $entry->setFieldValuesFromRequest($fieldsLocation);\n\n // Author\n $authorId = $request->getBodyParam('author', ($entry->authorId ?: Craft::$app->getUser()->getIdentity()->id));\n\n if (is_array($authorId)) {\n $authorId = $authorId[0] ?? null;\n }\n\n $entry->authorId = $authorId;\n\n // Parent\n if (($parentId = $request->getBodyParam('parentId')) !== null) {\n if (is_array($parentId)) {\n $parentId = reset($parentId) ?: '';\n }\n\n $entry->newParentId = $parentId ?: '';\n }\n\n // Revision notes\n $entry->revisionNotes = $request->getBodyParam('revisionNotes');\n }", "public function parsePostData()\n {\n }", "protected function c_parseJobAttributes() {\n\n //if ($this->clientoutput->status != \"successfull-ok\")\n // return false;\n \n $job = -1;\n for ($i = 0 ; $i < count($this->clientoutput->response) ; $i++) {\n\t\t\n if ($this->clientoutput->response[$i]['attributes'] == \"job-attributes\")\n $job ++;\n\t\t\t\t\n $k = -1; \n for ($j = 0 ; $j < (count($this->clientoutput->response[$i]) - 1) ; $j ++)\n if (!empty($this->clientoutput->response[$i][$j]['name'])) {\n $k++;\n $l = 0;\n $this->parsed[$job][$k]['range'] = $this->clientoutput->response[$i]['attributes'];\n $this->parsed[$job][$k]['name'] = $this->clientoutput->response[$i][$j]['name'];\n $this->parsed[$job][$k]['type'] = $this->clientoutput->response[$i][$j]['type'];\n $this->parsed[$job][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n } else {\n $l ++;\n $this->parsed[$job][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n }\n }\n \n //$this->clientoutput->response = array();\n\n $this->client_job_attributes = new stdClass();\n\t\t\n for ($job_nbr = 0 ; $job_nbr <= $job ; $job_nbr ++) {\n\t\t\n $job_index = \"job_\".$job_nbr;\n $this->client_job_attributes->$job_index = new stdClass();\n\t\t\t\n for ($i = 0 ; $i < count($this->parsed[$job_nbr]) ; $i ++) {\n $name = $this->parsed[$job_nbr][$i]['name'];\n $php_name = str_replace('-','_',$name);\n $type = $this->parsed[$job_nbr][$i]['type'];\n $range = $this->parsed[$job_nbr][$i]['range'];\n $this->client_job_attributes->$job_index->$php_name = new stdClass();\n $this->client_job_attributes->$job_index->$php_name->_type = $type;\n $this->client_job_attributes->$job_index->$php_name->_range = $range;\n for ($j = 0 ; $j < (count($this->parsed[$job_nbr][$i]) - 3) ; $j ++) {\n # This causes incorrect parsing of integer job attributes.\n # 2010-08-16\n # bpkroth\n #$value = self::_interpretAttribute($name,$type,$this->parsed[$job_nbr][$i][$j]);\n $value = $this->parsed[$job_nbr][$i][$j];\n $index = '_value'.$j;\n $this->client_job_attributes->$job_index->$php_name->$index = $value;\n }\n }\n }\n \n $this->parsed = array(); \n }", "protected function formatResult()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\t$arResult = array();\n\n\t\t// references\n\t\t$arResult[\"INFO\"][\"STATUS\"] = $this->dbResult['STATUS'];\n\t\t$arResult[\"INFO\"][\"PAY_SYSTEM\"] = $this->dbResult['PAYSYS'];\n\t\t$arResult[\"INFO\"][\"DELIVERY\"] = $this->dbResult['DELIVERY'];\n\t\t$arResult[\"INFO\"][\"DELIVERY_HANDLERS\"] = $this->dbResult['DELIVERY_HANDLERS'];\n\n\t\t$arResult[\"CURRENT_PAGE\"] = $APPLICATION->GetCurPage();\n\t\t$arResult[\"NAV_STRING\"] = $this->dbQueryResult['ORDERS']->GetPageNavString(Localization\\Loc::getMessage(\"SPOL_PAGES\"), $this->arParams[\"NAV_TEMPLATE\"]);\n\n\t\t// bug walkaround\n\t\t$this->arParams[\"PATH_TO_COPY\"] .= (strpos($this->arParams[\"PATH_TO_COPY\"], \"?\") === false ? \"?\" : \"&amp;\");\n\t\t$this->arParams[\"PATH_TO_CANCEL\"] .= (strpos($this->arParams[\"PATH_TO_CANCEL\"], \"?\") === false ? \"?\" : \"&amp;\");\n\n\t\tif(self::isNonemptyArray($this->dbResult['ORDERS']))\n\t\t{\n\t\t\tforeach ($this->dbResult['ORDERS'] as $k => $orderInfo)\n\t\t\t{\n\t\t\t\t$arOrder =& $this->dbResult['ORDERS'][$k]['ORDER'];\n\t\t\t\t$arOBasket =& $this->dbResult['ORDERS'][$k]['BASKET_ITEMS'];\n\n\t\t\t\t$arOrder[\"FORMATED_PRICE\"] = SaleFormatCurrency($arOrder[\"PRICE\"], $arOrder[\"CURRENCY\"]);\n\n\t\t\t\t$this->formatDate($arOrder, $this->orderDateFields2Convert);\n\n\t\t\t\t$arOrder[\"CAN_CANCEL\"] = (($arOrder[\"CANCELED\"] != \"Y\" && $arOrder[\"STATUS_ID\"] != \"F\" && $arOrder[\"PAYED\"] != \"Y\") ? \"Y\" : \"N\");\n\n\t\t\t\t$arOrder[\"URL_TO_DETAIL\"] = CComponentEngine::MakePathFromTemplate($this->arParams[\"PATH_TO_DETAIL\"], array(\"ID\" => urlencode(urlencode($arOrder[\"ACCOUNT_NUMBER\"]))));\n\t\t\t\t$arOrder[\"URL_TO_COPY\"] = CComponentEngine::MakePathFromTemplate($this->arParams[\"PATH_TO_COPY\"], array(\"ID\" => urlencode(urlencode($arOrder[\"ACCOUNT_NUMBER\"])))).\"COPY_ORDER=Y\";\n\t\t\t\t$arOrder[\"URL_TO_CANCEL\"] = CComponentEngine::MakePathFromTemplate($this->arParams[\"PATH_TO_CANCEL\"], array(\"ID\" => urlencode(urlencode($arOrder[\"ACCOUNT_NUMBER\"])))).\"CANCEL=Y\";\n\n\t\t\t\tif(self::isNonemptyArray($arOBasket))\n\t\t\t\t{\n\t\t\t\t\tforeach ($arOBasket as $n => $basketInfo)\n\t\t\t\t\t{\n\t\t\t\t\t\t$arBasket =& $arOBasket[$n];\n\n\t\t\t\t\t\t$arBasket[\"NAME~\"] = $arBasket[\"NAME\"];\n\t\t\t\t\t\t$arBasket[\"NOTES~\"] = $arBasket[\"NOTES\"];\n\t\t\t\t\t\t$arBasket[\"NAME\"] = htmlspecialcharsEx($arBasket[\"NAME\"]);\n\t\t\t\t\t\t$arBasket[\"NOTES\"] = htmlspecialcharsEx($arBasket[\"NOTES\"]);\n\t\t\t\t\t\t$arBasket[\"QUANTITY\"] = doubleval($arBasket[\"QUANTITY\"]);\n\n\t\t\t\t\t\t// backward compatibility\n\t\t\t\t\t\t$arBasket[\"MEASURE_TEXT\"] = $arBasket[\"MEASURE_NAME\"];\n\n\t\t\t\t\t\t$this->formatDate($arBasket, $this->basketDateFields2Convert);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arResult[\"ORDERS\"] = $this->dbResult['ORDERS'];\n\t\t}\n\t\telse\n\t\t\t$arResult[\"ORDERS\"] = array();\n\n\t\t$this->arResult = $arResult;\n\t}", "protected function responseToItems($response)\n {\n $array = array();\n foreach($response->product as $current) {\n\n if( !isset($current->name) || \n !isset($current->regularPrice) || \n !isset($current->url) || \n !isset($current->productId) ) \n {\n //If any of the required info is not present skip this item.\n continue;\n }\n\n $item = new Item();\n $item->setName((string)$current->name);\n $item->setPrice(intval((string)$current->regularPrice), Item::CURRENCY_UNIT_DOLLAR);\n $item->setLink((string)$current->url);\n $item->setvendorId((string)$current->productId);\n \n if(isset($current->thumbnailImage))\n {\n $item->setSmallImage((string)$current->thumbnailImage);\n }\n \n if(isset($current->image))\n {\n $item->setMediumImage((string)$current->image);\n }\n \n $array[] = $item;\n }\n\n return $array;\n\n }", "protected final function parse_model_request() {\n\t \n\t /* get the model from the request */\n\t $modeldata = (is_array($this->request['model'])) ? $this->request['model'] : array();\n\t /*\n\t *\tlooks something like this now:\n\t\t *\t$modeldata = array(\n\t\t * \t'title'\t\t\t\t=> 'my title',\n\t\t * \t'content'\t\t\t=> 'some content',\n\t\t * 'any backbone key'\t=> 'any backbone value'\n\t\t * );\n\t\t */\n\t \t \n\t \t/* the formatting of the parsed output */\n \t$parsed = array();\n \t\n \t/* get all data packages, also the core packages and parse them */\n\t \t$data_packages = array_merge($this->core_data_packages, $this->properties->custom_data_packages ); \n\t \tforeach ($data_packages as $data_package) {\n\t\t \t$parsed[$data_package] = array();\n\t \t} \t\n \t/*\n\t *\tlooks something like this now:\n\t\t *\t$parsed = array(\n\t\t * \t'post'\t\t\t\t\t\t\t=> array(),\n\t\t * \t'postmeta'\t\t\t\t\t\t=> array(),\n\t\t * \t'comment'\t\t\t\t\t\t=> array(),\n\t\t *\t\t'any registered data package' \t=> array()\n\t\t * );\n\t\t */\n \n \t/* get default values if some are set in the extended handler class */\n \t$parsed = $this->filter_pre_parse_model_request($parsed, $this->request_method);\n \t\n \t/* start parsing */\n\t\tforeach ($modeldata as $id_backbone => $value) {\n\t\t\t\n\t\t\t/* check if the data package field is registered */\n\t\t\t/* only data_package_fields registered in backbone pass this gate */\n\t\t\tif ( ! array_key_exists($id_backbone, $this->properties->data_package_fields) )\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t// shorthand for data package fields\n\t\t\t$field = $this->properties->data_package_fields[$id_backbone]; // any backbone key\n\t\t\t$data_package = $field['data_package']; // the name of the package, e.g. 'post' or 'author'\n\t\t\t$wp_id = $field['id']; // the wp key name, e.g. post_title, post_parent\t\t\n\n\t\t\t/* some preprocessing */\n\t\t\tif( isset($field['options']) ) {\n\t\t\t\n\t\t\t\t/* this field is read only, so throw it away, we ignore this value */\n\t\t\t\tif( array_key_exists('readonly', $field['options']) && $field['options']['readonly'] )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t/* validate the data */\n\t\t\t\tif( array_key_exists('validate', $field['options']) ) { \t\t\t\t\t\n\t\t\t\t\t$validate_callback = $field['options']['validate'];\n\t\t\t\t\t\n\t\t\t\t\t/* execute the validation callback e.g. esc_attr(), esc_url(), .. */\n\t\t\t\t\tif(function_exists($validate_callback))\n\t\t\t\t\t\t$value = call_user_func ($validate_callback, $value);\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* sort all data in a nice way */\n\t\t\t$parsed[$data_package][$wp_id] = $value;\n\t\t\t/*\n\t\t *\tlooks something like this now:\n\t\t\t *\t$parsed = array(\n\t\t\t * \t'post'\t\t=> array( 'post_title' \t=> 'my title',\n\t\t\t * \t\t\t\t\t\t\t 'post_content'=> 'my content',\n\t\t\t *\t\t\t\t\t\t\t 'any wp key'\t=> 'value from backbone'\n\t\t\t *\t\t\t\t\t\t\t),\n\t\t\t * \t'postmeta'\t=> array(...),\n\t\t\t * \t'comment'\t=> array(...)\n\t\t\t * );\n\t\t\t */\n\t\t\t\n\t\t}\t\t\t\t\t\n\t\t\n\t\t/* override some key, values with filter in the child class */\n \t$parsed = $this->filter_post_parse_model_request($parsed, $this->request_method);\n \t\n \t/* there might be an error \t */\n \tif( ! $parsed ) {\n\t \t$this->set_error( 500, 'request could nt be parsed' );\n\t \t$parsed = array();\n \t}\n \t\n \t// successfully set our data\n \t$this->parsed_model_request = $parsed;\t \t\t\n\t}", "public function export_entries()\n {\n }", "public static function get_entries_by_term_returns() {\n return new external_single_structure(array(\n 'count' => new external_value(PARAM_INT, 'The total number of records matching the request.'),\n 'entries' => new external_multiple_structure(\n self::get_entry_return_structure()\n ),\n 'ratinginfo' => \\core_rating\\external\\util::external_ratings_structure(),\n 'warnings' => new external_warnings()\n ));\n }", "public function ParsePostData() {}", "function parse() {\r\n\t\t/* JSON */\r\n\t\tif (strpos ( $this->response_content_type, \"application/json\" ) !== false) {\r\n\t\t\t$this->response_parsed = json_decode($this->response_body);\r\n\t\t\t/* JSON STREAM */\r\n\t\t} elseif (strpos ( $this->response_content_type, \"json-stream\" ) !== false) {\r\n\t\t\t$stream = split ( \"\\n\", $this->response_body );\r\n\t\t\tif (count ( $stream ) < $stream [0] ['ResultLength']) {\r\n\t\t\t\t// echo \"Invalid JSON Stream. Result Length:\".count($stream);\r\n\t\t\t\t$this->client->status_code = 400;\r\n\t\t\t\t$GLOBALS ['ResultStack']->pushNew ( \"Invalid JSON Stream\", ERROR );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$jsonServer = new JSON ( JSON_LOOSE_TYPE );\r\n\t\t\t$this->response_parsed = array ();\r\n\t\t\tforeach ( $stream as $line )\r\n\t\t\t\t$this->response_parsed [] = $jsonServer->decode ( $line );\r\n\t\t\t/* DEFAULT */\r\n\t\t} else {\r\n\t\t\t$this->response_parsed = $this->response_body;\r\n\t\t}\r\n\t}", "protected function parseValues()\n {\n\n $this->setValues([]);\n\n $matches = [];\n\n preg_match_all(\"/\\<(.+?)\\>/\", $this->getDomainRegex() . '/' . $this->getRegex(), $matches);\n\n if(!empty($matches[1])){\n foreach($matches[1] as $value){\n $this->values[$value] = null;\n }\n }\n }", "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'order' => $this->order,\n 'set_time' => $this->set_time,\n 'place' => new PlaceResource($this->place),\n 'price' => $this->price,\n 'final_price' => $this->final_price,\n 'number' => $this->number,\n 'final_number' => $this->final_number,\n 'finish_number' => $this->finish_number,\n 'sitter' => $this->sitter,\n 'status' => $this->status,\n 'finish' => $this->finish,\n 'state' => $this->state,\n 'package' => $this->package->map(function ($item){\n $item->menu_name = Menu::where('id', $item->menu_id)->value('name');\n $item->category = Menu::where('id', $item->menu_id)->value('category');\n if ($item->category == 'p') {\n $item->details = $item->where('pid', $item->id)->get()->map(function ($item, $key){\n if ($item->menus_id) {\n $item->menus_name = Menu::where('id', $item->menus_id)->value('name');\n }\n\n if (!empty(json_decode($item->tags_id,true))) {\n foreach (json_decode($item->tags_id,true) as $k => $value) {\n $name[] = Tag::where('id', $value)->value('name');\n }\n $item->tags_name = $name;\n }\n return $item;\n });\n }\n\n if (!empty(json_decode($item->tags_id,true))) {\n foreach (json_decode($item->tags_id,true) as $k => $value) {\n $name[] = Tag::where('id', $value)->value('name');\n }\n $item->tags_name = $name;\n }\n return $item;\n }),\n 'clean' => $this->clean,\n 'place_name' => $this->place_name,\n 'paid_at' => $this->paid_at?$this->paid_at->format('Y/m/d H:i:s'):'',\n 'created_at' => $this->created_at?$this->created_at->format('Y/m/d H:i:s'):'',\n 'updated_at' => $this->updated_at?$this->updated_at->format('Y/m/d H:i:s'):'',\n ];\n }", "private function parseResult(Response $response): void\n {\n $json = json_decode($response->getBody());\n\n if (isset($json->errorMessage)) {\n $this->result->status = 'ERROR';\n $this->result->errors[] = $json->errorMessage;\n return;\n }\n\n $this->result->status = 'OK';\n\n if (isset($this->result->errors)) {\n unset($this->result->errors);\n }\n\n foreach ($json->conhecimentos as $key => $billOfLading) {\n $this->result->billsOfLading[$key] = new \\stdClass();\n $this->result->billsOfLading[$key]->status = 'OK';\n $this->result->billsOfLading[$key]->originClient = $billOfLading->nomeClienteOrigem;\n $this->result->billsOfLading[$key]->originCity = $billOfLading->municipioOrigem;\n $this->result->billsOfLading[$key]->originState = $billOfLading->ufOrigem;\n $this->result->billsOfLading[$key]->destinyClient = $billOfLading->nomeClienteDestino;\n $this->result->billsOfLading[$key]->destinyCity = $billOfLading->municipioDestino;\n $this->result->billsOfLading[$key]->destinyState = $billOfLading->ufDestino;\n $this->result->billsOfLading[$key]->invoiceNumber = $billOfLading->numeroNotaFiscal;\n $this->result->billsOfLading[$key]->eBillOfLadingNumber = $billOfLading->conhecimentoTransporteEletronico;\n $this->result->billsOfLading[$key]->deliveryForecast = (\\DateTime::createFromFormat('d/m/y', $billOfLading->dataPrevisaoEntrega))->format('d/m/Y');\n $this->result->billsOfLading[$key]->shippingCost = $billOfLading->valorFrete;\n $this->result->billsOfLading[$key]->deliveryReceiptLink = $billOfLading->linkImagemComprovanteEntrega;\n\n $this->result->billsOfLading[$key]->events = $this->parseTrackingEvents($billOfLading->historico);\n }\n\n }", "protected function init()\n {\n if ($this->request->getResponseFormat() == 'xml') {\n $aggregated = new \\SimpleXMLElement('<response/>');\n foreach ($this->responseRaw as $name => $response) {\n $child = $aggregated->addChild('classification');\n $child->addAttribute('classifier', $name);\n $xml = simplexml_load_string($response);\n\n if (! $xml instanceof \\SimpleXMLElement) {\n throw new ServiceReaderException('Failed parsing XML response.');\n }\n\n if ((string) $xml->status->attributes()->success !== 'true') {\n throw new ServiceReaderException($xml->status->attributes()->statusCode);\n }\n\n foreach ($xml->readCalls->classify as $classify) {\n $child->addAttribute('textCoverage', $classify->classification->attributes()->textCoverage);\n foreach ($classify->classification->class as $class) {\n $this->simplexmlImportXml($child, $class->asXML());\n }\n }\n }\n\n return $aggregated->asXML();\n }\n\n if ($this->request->getResponseFormat() == 'json') {\n $aggregated = array();\n foreach ($this->responseRaw as $name => $response) {\n $current = json_decode($response, 1);\n\n if (! array_key_exists('success', $current)) {\n throw new ServiceReaderException('Unable to complete request');\n }\n\n if ($current['success'] !== true) {\n throw new ServiceReaderException($current['statusCode'] . ' ' . $current['errorMessage']);\n }\n\n array_key_exists('textCoverage', $current) ? '' : $current['textCoverage'] = null;\n array_key_exists('cls1', $current) ? '' : $current['cls1'] = null;\n\n $aggregated[] = array(\n 'classifier' => $name,\n 'textCoverage' => $current['textCoverage'],\n 'classes' => $current['cls1']\n );\n }\n\n return json_encode($aggregated);\n }\n\n return $this->responseRaw;\n }", "function toJSON() {\r\n $unjsoned = array();\r\n \r\n $schedules = $this->has_schedules();\r\n $assignments = BPSP_Assignments::has_assignments();\r\n $entries = array_merge( $assignments, $schedules );\r\n foreach ( $entries as $e ) {\r\n setup_postdata( $e );\r\n if( $e->post_type == \"schedule\" )\r\n $entry = array(\r\n \"id\" => get_the_ID(),\r\n \"title\" => get_the_title( $e->ID ),\r\n \"start\" => date( 'c', strtotime( $e->start_date ) ),\r\n \"end\" => date( 'c', strtotime( $e->end_date ) ),\r\n \"url\" => $e->permalink,\r\n );\r\n elseif( $e->post_type == \"assignment\" )\r\n $entry = array(\r\n \"id\" => get_the_ID(),\r\n \"title\" => get_the_title( $e->ID ),\r\n \"start\" => date( 'c', strtotime( $e->due_date ) ),\r\n \"end\" => date( 'c', strtotime( $e->due_date ) ),\r\n \"url\" => $e->permalink,\r\n );\r\n \r\n if( !empty( $entry['end'] ) )\r\n $entry['allDay'] = false;\r\n \r\n $unjsoned[] = $entry;\r\n }\r\n \r\n header(\"HTTP/1.1 200 OK\");\r\n die( json_encode( $unjsoned ) );\r\n }", "public static function get_entries_by_date_returns() {\n return new external_single_structure(array(\n 'count' => new external_value(PARAM_INT, 'The total number of records matching the request.'),\n 'entries' => new external_multiple_structure(\n self::get_entry_return_structure()\n ),\n 'ratinginfo' => \\core_rating\\external\\util::external_ratings_structure(),\n 'warnings' => new external_warnings()\n ));\n }", "public function mapDataToResponseField($data, $response_field) {\n $map_data = [];\n // Index, all top level keys from response field.\n $fld_index = array_keys($response_field);\n\n // Map data to response field when data array has elements.\n if (is_array($data) && count($data) > 0) {\n foreach($data as $data_ctr => $item) {\n $item = (array) $item;\n // Field counter used to access field index above.\n $fld_ctr = 0;\n\n foreach($item as $key => $value) {\n if (is_array($response_field) && count($response_field) > 0) {\n // Response field is a full array.\n\n // If it is the full count, key full_count, mark it as comment.\n // Comments # will be removed by response class and will only be used\n // for pagination at this point.\n if ($key == 'full_count') {\n $map_data[ $data_ctr ][ '#' . $key ] = $value;\n }\n else {\n if (isset($response_field[ $fld_index[ $fld_ctr ] ]) && $response_field[ $fld_index[ $fld_ctr ] ]) {\n // Data has matching response field item.\n $value_response_field = $response_field[ $fld_index[ $fld_ctr ] ];\n\n if (is_array($value_response_field)) {\n // The response field has items down the line.\n $l1_index = array_keys($value_response_field);\n\n $z = 0;\n foreach($value as $l1_key => $l1_value) {\n if (is_array($l1_value)) {\n // Items and response field in this item.\n $l2_response_field = $value_response_field[ $l1_index[ $z ] ];\n if (is_array($l2_response_field)) {\n $l2_index = array_keys($l2_response_field);\n }\n\n if ($l1_key === 'set') {\n if (is_array($response_field[ $fld_index[ $fld_ctr ] ])) {\n if (is_string($response_field[ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ])) {\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ]\n = $this->mapSet($l1_value, $response_field[ $fld_index[ $fld_ctr ] ]);\n }\n else {\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ]\n = $this->mapSet($l1_value, $response_field[ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ]);\n }\n }\n\n // Stay on this response field til all items in the set have been mapped.\n $z++; continue;\n }\n\n $a = 0;\n foreach($l1_value as $l2_key => $l2_value) {\n if (is_array($l2_value)) {\n // Items and response field in this item.\n $l3_response_field = $l2_response_field[ $l2_index[ $a ] ];\n $l3_index = array_keys($l3_response_field);\n\n if ($l2_key === 'set') {\n // Use $a since this key is equals to set.\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ][ $l2_index[ $a ] ]\n = $this->mapSet($l2_value, $l2_response_field[ $l2_index[ $a ] ]);\n // Stay on this response field til all items in the set have been mapped.\n $a++; continue;\n }\n elseif ($l2_key === 'list') {\n // List of values in array..\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $l2_response_field ] = $l2_value;\n $a++; continue;\n }\n\n $b = 0;\n foreach($l2_value as $l3_key => $l3_value) {\n if (is_array($l3_value)) {\n // Items and response field in this item.\n $l4_response_field = $l3_response_field[ $l3_index[ $b ] ];\n $l4_index = array_keys($l4_response_field);\n\n if ($l3_key === 'set') {\n // Use $a and $b since this key is equals to set.\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ][ $l2_index[ $a ] ][ $l3_index[ $b ] ]\n = $this->mapSet($l2_value, $l3_response_field[ $l3_index[ $b ] ]);\n // Stay on this response field til all items in the set have been mapped.\n $b++; continue;\n }\n elseif ($l3_key == 'list') {\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ][ $l3_response_field ] = $l3_value;\n $b++; continue;\n }\n\n foreach($l3_value as $l4_key => $l4_value) {\n if (!is_array($l4_value)) {\n // $l1_index[ $l1_key ], $l2_index[ $l2_key ] and $l3_index[ $l3_key ] contain non numeric index number.\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ][ $l2_index[ $a ] ][ $l3_index[ $b ] ]\n [ $l4_response_field[ $l4_index[ $l4_key ] ] ] = $l4_value;\n }\n }\n }\n else {\n // $l1_index[ $l1_key ] and $l2_index[ $l2_key ] contain non numeric index number.\n if (isset($l3_response_field[ $l3_index[ $b ] ])) {\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ][ $l2_index[ $a ] ]\n [ $l3_response_field[ $l3_index[ $b ] ] ] = $l3_value;\n }\n }\n\n $b++;\n }\n }\n else {\n // $l1_index[ $l1_key ] contains non numeric index number.\n if (isset($l2_response_field[ $l2_index[ $a ] ])) {\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $l1_index[ $z ] ]\n [ $l2_response_field[ $l2_index[ $a ] ] ] = $l2_value;\n }\n }\n\n $a++;\n }\n }\n else {\n if (isset($value_response_field[ $l1_index[ $z ] ])) {\n $map_data[ $data_ctr ][ $fld_index[ $fld_ctr ] ][ $value_response_field[ $l1_index[ $z ] ] ] = $l1_value;\n }\n }\n\n $z++;\n }\n }\n else {\n // Flat string field - map response field to value.\n if (is_array($value)) {\n // List is given.\n $value_key = array_keys($value)[0];\n $value = ($value_key == 'list') ? $value['list'] : $value;\n }\n\n $map_data[ $data_ctr ][ $value_response_field ] = $value;\n }\n }\n }\n\n // Next value.\n $fld_ctr++;\n }\n else {\n // An empty array, ie in crops or commoncropnames.\n if ($key == 'full_count') {\n $map_data[ $data_ctr ][ '#' . $key ] = $value;\n }\n else {\n $map_data[ $data_ctr ] = $value;\n }\n }\n }\n }\n }\n\n return $map_data;\n }", "public function entries_get()\n {\n $from = (int)$this->get('from');\n $to = (int)$this->get('to');\n $gender = $this->get('gender');\n if(is_numeric($from) && is_numeric($to)){\n $users = $this->survey_data_model->getEntriesByAgeGender($from, $to, $gender);\n if($users){\n $this->response($users, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code \n }else {\n // Set the response and exit\n $this->response([\n 'status' => FALSE,\n 'message' => 'No Entries OR Error!!',\n 'response' => $users\n ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }\n\n //Get By ID\n $id = $this->get('id');\n if($id != NULL){\n\n // Find and return a single record for a particular user.\n $id = (int)$id;\n\n // Validate the id.\n if ($id <= 0){\n\n // Invalid id, set the response and exit.\n $this->response(NULL, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code\n }\n\n // Get the user from the array, using the id as key for retrieval.\n $user = $this->survey_data_model->getEntriesById($id);\n if (!empty($user))\n {\n $this->set_response($user, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }\n else\n {\n $this->set_response([\n 'status' => FALSE,\n 'message' => 'User could not be found'\n ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n } \n }\n\n if (($id === NULL) && ($from === NULL) && ($to === NULL)){\n \n // Check if the users data store contains users (in case the database result returns NULL)\n $user = $this->survey_data_model->getEntries();\n if($users){\n $this->response($users, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }else {\n // Set the response and exit\n $this->response([\n 'status' => FALSE,\n 'message' => 'No users were found'\n ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }\n }", "function smarty_function_papyrine_getentries ($params, &$smarty) \n\t{\n\t\tif (empty ($params['assign']))\n\t\t\t$params['assign'] = 'entries';\n\n\t\tif (empty ($params['limit']))\n\t\t\t$params['limit'] = 10;\n\n\t\tif (empty ($params['status']))\n\t\t\t$params['status'] = 2;\n\n\t\tif (empty ($params['frontpage']))\n\t\t\t$params['frontpage'] = false;\n\n\t\tif (empty ($params['category']))\n\t\t\t$entries = $smarty->GetEntries ($params['status'], $params['limit'], $params['frontpage']);\n\t\telse {\n\t\t\t$category = $smarty->GetCategory ($params['category']);\n\t\t\t$entries = $category->GetEntries ($params['limit']);\n\t\t}\n\n\t\t$smarty->assign (\n\t\t\t$params['assign'], \n\t\t\tPapyrine::Objects2Array ($entries)\n\t\t);\n\t}", "protected function formatHistoryList($content){\r\n\t\t// Looking for successful header\r\n\t\t$resultsList = explode(\"200 Ok\\n\",$content);\r\n\t\t// Separate the header and the actual body that contains the ticket list\r\n\t\t$results = explode(\"\\n\\n--\\n\", $resultsList[1]);\r\n\t\t// Check if there is any ticket in the body\r\n\t\tif (!empty($results) && strpos($results[0], \"id: \") > 0) { // if result if not empty\r\n\t\t\t// Translate the text list into array\r\n\t\t\tforeach ($results as $j => $ticket){\r\n\t\t\t\t// Get content atttribute out and treat it separately\r\n\t\t\t\t$head = explode(\"Content: \", $ticket);\r\n\t\t\t\t$tail = explode(\"Creator:\", $head[1]);\r\n\t\t\t\t$contentBody = $tail[0];\r\n\t\t\t\t$ticket = $head[0] . \"Creator:\" . $tail[1];\r\n\t\t\t\t$attributes = explode(\"\\n\",$ticket);\r\n\t\t\t\tif(empty($attributes[0])) unset($attributes[0]);\r\n\t\t\t\tif(empty($attributes[count($attributes)-1])) unset($attributes[count($attributes)-1]);\r\n\t\t\t\tforeach ($attributes as $i => $data){\r\n\t\t\t\t\t$keys = explode(\": \", $data);\r\n\t\t\t\t\tunset($attributes[$i]);\r\n\t\t\t\t\tif (!empty($keys[0])) $attributes[$keys[0]] = $keys[1];\r\n\t\t\t\t}\r\n\t\t\t\t$attributes['Content'] = trim($contentBody);\r\n\t\t\t\t$results[$j] = $attributes;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}", "protected function formatTicketList($content){\r\n\t\t// Looking for successful header\r\n\t\t$resultsList = explode(\"200 Ok\\n\",$content);\r\n\t\t// Separate the header and the actual body that contains the ticket list\r\n\t\t$results = explode(\"\\n\\n--\\n\", $resultsList[1]);\r\n\t\t// Check if there is any ticket in the body\r\n\t\tif (!empty($results) && strpos($results[0], \"id: ticket\") > 0) { // if result is not empty\r\n\t\t\t// Translate the text list into array\r\n\t\t\tforeach ($results as $j => $ticket){\r\n\t\t\t\t// If there are Content attribute, \r\n\t\t\t\t$attributes = explode(\"\\n\",$ticket);\r\n\t\t\t\tif(empty($attributes[0])) unset($attributes[0]);\r\n\t\t\t\tif(empty($attributes[count($attributes)-1])) unset($attributes[count($attributes)-1]);\r\n\t\t\t\tforeach ($attributes as $i => $data){\r\n\t\t\t\t\t$keys = explode(\": \", $data);\r\n\t\t\t\t\tunset($attributes[$i]);\r\n\t\t\t\t\t// Remove the 'ticket/' part of the id field\r\n\t\t\t\t\tif ($keys[0] == 'id'){\r\n\t\t\t\t\t\t$tmp = explode('/', $keys[1]);\r\n\t\t\t\t\t\t$keys[1] = $tmp[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!empty($keys[0])) $attributes[$keys[0]] = $keys[1];\r\n\t\t\t\t}\r\n\t\t\t\t$results[$j] = $attributes;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (count($results) > 1) ? $results : $results[0];\r\n\t}", "private function parseResponse($data = array(), $dataKey = '') {\n if(!empty($data) && is_array($data)) {\n $res = array();\n foreach ($this->default['field_mapping'] as $key => $label) {\n //merge keys are used to prepare single json by adding non json fields in it, only for stats\n if (array_key_exists($label, $this->default['merge_keys'])) {\n $mergeArray = $this->default['merge_keys'][$label];\n foreach($mergeArray as $field) {\n if(isset($data[$field])) {\n $data[$label][$field] = $data[$field];\n }\n }\n }\n if(isset($data[$label]) && !empty($data[$label])) {\n $res[$key] = $data[$label];\n }\n }\n return $res;\n }\n return false;\n }", "public function modelResponse(): array\n {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n 'image' => $this->image,\n 'longitude' => $this->longitude,\n 'latitude' => $this->latitude,\n 'place_type_id' => $this->place_type_id,\n 'information' => PlaceInformationResource::collection($this->placeInformation),\n 'place_type' => new PlaceTypeResource($this->placeType)\n ];\n }", "public static function get_entries_by_letter_returns() {\n return new external_single_structure(array(\n 'count' => new external_value(PARAM_INT, 'The total number of records matching the request.'),\n 'entries' => new external_multiple_structure(\n self::get_entry_return_structure()\n ),\n 'ratinginfo' => \\core_rating\\external\\util::external_ratings_structure(),\n 'warnings' => new external_warnings()\n ));\n }", "function posts_get()\n{\n try {\n $args = array(\n 'numberposts' => 100\n );\n\n $posts = get_posts($args);\n $body = array();\n\n foreach ($posts as $post) {\n $new_post[\"id\"] = $post->ID;\n $new_post[\"title\"] = $post->post_title;\n $new_post[\"extract\"] = generate_extract($post->post_content, 35);\n $new_post[\"date\"] = $post->post_date;\n $new_post[\"categories\"] = get_post_categories($post->ID);\n $new_post[\"author\"] = get_the_author_meta(\"display_name\", $post->post_author);\n $new_post[\"thumbnailLink\"] = get_the_post_thumbnail_url($post->ID);\n\n array_push($body, $new_post);\n }\n $resp = new WP_REST_Response($body);\n $resp->set_status(200);\n $resp->header('Content-type', 'application/json');\n return $resp;\n } catch (Exception $e) {\n $resp = new WP_REST_Response(generate_error_body($e));\n $resp->set_status(500);\n $resp->header('Content-type', 'application/json');\n return $resp;\n }\n}", "public function parse_multiple_response($resp, $data)\n {\n if ($resp['data']==null)\n {\n return ['error'=>404, 'message'=>'Data from youtube not found'];\n }\n else\n {\n $resp['data']->attribute=$data;\n return ['error'=>0, 'data'=>$resp['data']];\n }\n }", "public function formatResponse($locale): array\n {\n return [\n 'id' => $this->id,\n 'key' => $this->key,\n 'name' => optional($this->translateOrNew($locale))->name,\n 'items' => $this->items->map(function ($item) use ($locale) {\n return $item->formatResponse($locale);\n }),\n ];\n }", "public function entryAdvancedList() {\n $content = [];\n\n $content['message'] = [\n '#markup' => $this->t('A more complex list of entries in the database. Only the entries with name = \"John\" and age older than 18 years are shown, the username of the person who created the entry is also shown.'),\n ];\n\n $headers = [\n $this->t('pid'),\n $this->t('uid'),\n $this->t('studentname'),\n $this->t('studentno'),\n $this->t('chapter'),\n\t $this->t('status'),\n ];\n\n $rows = [];\n foreach ($entries = $this->repository->advancedLoad() as $entry) {\n // Sanitize each entry.\n $rows[] = array_map('Drupal\\Component\\Utility\\Html::escape', $entries);\n }\n $content['table'] = [\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#attributes' => ['id' => 'dbtng-example-advanced-list'],\n '#empty' => $this->t('No entries available.'),\n ];\n // Don't cache this page.\n //$content['#cache']['max-age'] = 0;\n return $content;\n }", "public function run()\n {\n $raws = [\n ['reference'=>'PA1X200/68T','value'=>'21.9','valueicms'=>'25.24','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'200','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA1X200/96M','value'=>'23.05','valueicms'=>'26.56','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'200','filaments'=>'96','finishing'=>'Mescla'],\n ['reference'=>'PA1X200/98M','value'=>'20.77','valueicms'=>'26.56','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'200','filaments'=>'98','finishing'=>'Mescla'],\n ['reference'=>'PA1X42/13L','value'=>'21.27','valueicms'=>'24.4','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'42','filaments'=>'13','finishing'=>'Liso'],\n ['reference'=>'PA1X60/60T','value'=>'23.99','valueicms'=>'27.65','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'60','filaments'=>'60','finishing'=>'Texturizado'],\n ['reference'=>'PA1X70/68T','value'=>'18','valueicms'=>'18.88','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'70','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA1X80/60L','value'=>'41.57','valueicms'=>'47.89','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'80','filaments'=>'60','finishing'=>'Liso'],\n ['reference'=>'PA1X80/68L','value'=>'19.62','valueicms'=>'22.61','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'Liso'],\n ['reference'=>'PA2X70/68T','value'=>'18','valueicms'=>'18.88','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'2','dtex'=>'70','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA3X78/23T','value'=>'22.54','valueicms'=>'25.96','provider_cod'=>'','description'=>'Poliamida','basecomponent'=>'PA','cables'=>'3','dtex'=>'78','filaments'=>'23','finishing'=>'Texturizado'],\n ['reference'=>'PA661X200/68T','value'=>'21.9','valueicms'=>'25.24','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'200','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA661X200/96T','value'=>'21.9','valueicms'=>'25.44','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'200','filaments'=>'96','finishing'=>'Texturizado'],\n ['reference'=>'PA661X40/13L','value'=>'21.21','valueicms'=>'24.4','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'40','filaments'=>'13','finishing'=>'Liso'],\n ['reference'=>'PA661X42/13T','value'=>'21.51','valueicms'=>'24.78','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'42','filaments'=>'13','finishing'=>'Texturizado'],\n ['reference'=>'PA661X60/60T','value'=>'23.99','valueicms'=>'27.64','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'60','filaments'=>'60','finishing'=>'Texturizado'],\n ['reference'=>'PA661X78/23T','value'=>'18.52','valueicms'=>'21.34','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'78','filaments'=>'23','finishing'=>'Texturizado'],\n ['reference'=>'PA661X80/68B','value'=>'22.53','valueicms'=>'25.96','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'Black'],\n ['reference'=>'PA661X80/68M','value'=>'32.04','valueicms'=>'36.96','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'Mescla'],\n ['reference'=>'PA661X80/68MB','value'=>'32.04','valueicms'=>'36.96','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'MesclaBlack'],\n ['reference'=>'PA661X80/68T','value'=>'21.12','valueicms'=>'24.33','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'1','dtex'=>'80','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PA662X60/60T','value'=>'24','valueicms'=>'27.64','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'2','dtex'=>'60','filaments'=>'60','finishing'=>'Texturizado'],\n ['reference'=>'PA662X78/48T','value'=>'19.66','valueicms'=>'22.65','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'2','dtex'=>'78','filaments'=>'48','finishing'=>'Texturizado'],\n ['reference'=>'PA662X80/68T','value'=>'21.11','valueicms'=>'24.33','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'2','dtex'=>'80','filaments'=>'68','finishing'=>'Texturizado'],\n ['reference'=>'PAPES1X110T','value'=>'23.99','valueicms'=>'27.64','provider_cod'=>'','description'=>'Poliamida+Poliester','basecomponent'=>'PAPES','cables'=>'1','dtex'=>'110','filaments'=>'0','finishing'=>'Texturizado'],\n ['reference'=>'PES1X150/144T','value'=>'6.7','valueicms'=>'7.08','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'150','filaments'=>'144','finishing'=>'Liso'],\n ['reference'=>'PES1X50/13L','value'=>'7.7','valueicms'=>'8.08','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'50','filaments'=>'13','finishing'=>'Liso'],\n ['reference'=>'PES1X50/72T','value'=>'9.98','valueicms'=>'10.44','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'50','filaments'=>'72','finishing'=>'Texturizado'],\n ['reference'=>'PES1X70/36B','value'=>'7.2','valueicms'=>'7.53','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'70','filaments'=>'36','finishing'=>'Black'],\n ['reference'=>'PES1X70/36L','value'=>'7.2','valueicms'=>'7.53','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'70','filaments'=>'36','finishing'=>'Liso'],\n ['reference'=>'PES1X70/48','value'=>'15','valueicms'=>'15','provider_cod'=>'MP não usado ???','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'70','filaments'=>'48','finishing'=>'???'],\n ['reference'=>'PES1X75/36T','value'=>'7.2','valueicms'=>'7.53','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'75','filaments'=>'36','finishing'=>'Texturizado'],\n ['reference'=>'PES1X75/72T','value'=>'7.6','valueicms'=>'7.99','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'75','filaments'=>'72','finishing'=>'Texturizado'],\n ['reference'=>'PUE1X20','value'=>'25.61','valueicms'=>'29.5','provider_cod'=>'','description'=>'Elastano','basecomponent'=>'PUE','cables'=>'1','dtex'=>'20','filaments'=>'0','finishing'=>' ---'],\n ['reference'=>'PUE1X40','value'=>'25.45','valueicms'=>'29.53','provider_cod'=>'','description'=>'Elastano','basecomponent'=>'PUE','cables'=>'1','dtex'=>'40','filaments'=>'0','finishing'=>' ---'],\n ['reference'=>'PUE1X70','value'=>'25.54','valueicms'=>'29.32','provider_cod'=>'','description'=>'Elastano','basecomponent'=>'PUE','cables'=>'1','dtex'=>'70','filaments'=>'0','finishing'=>' ---'],\n ['reference'=>'CO12X1/OE','value'=>'6.3','valueicms'=>'7.13','provider_cod'=>'','description'=>'Algodão','basecomponent'=>'CO','cables'=>'1','dtex'=>'0','filaments'=>'0','finishing'=>'OpenEnd'],\n ['reference'=>'CO16X1/OE','value'=>'8.03','valueicms'=>'9.6','provider_cod'=>'','description'=>'Algodão','basecomponent'=>'CO','cables'=>'1','dtex'=>'0','filaments'=>'0','finishing'=>'OpenEnd'],\n ['reference'=>'CO6X1/OE','value'=>'6','valueicms'=>'6.79','provider_cod'=>'','description'=>'Algodão','basecomponent'=>'CO','cables'=>'1','dtex'=>'0','filaments'=>'0','finishing'=>'OpenEnd'],\n ['reference'=>'COPES30X1/VORT','value'=>'8.74','valueicms'=>'10.6','provider_cod'=>'','description'=>'Algodão+Poliester','basecomponent'=>'COPES','cables'=>'1','dtex'=>'0','filaments'=>'0','finishing'=>'PES/CO TRAMA'],\n ['reference'=>'PA662X80/60TE','value'=>'38.4','valueicms'=>'47.9','provider_cod'=>'','description'=>'Poliamida 6.6','basecomponent'=>'PA6.6','cables'=>'2','dtex'=>'80','filaments'=>'60','finishing'=>'Texturizado Emana'],\n ['reference'=>'PES1X150/48T','value'=>'6.28','valueicms'=>'6.57','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'150','filaments'=>'48','finishing'=>'Texturizado'],\n ['reference'=>'PES1X75/36T/URDUME','value'=>'7.05','valueicms'=>'7.38','provider_cod'=>'','description'=>'Poliester','basecomponent'=>'PES','cables'=>'1','dtex'=>'75','filaments'=>'36','finishing'=>'Texturizado URDUME']\n ];\n RawMaterial::truncate();\n $piscofinscomplement = 0.9075;\n foreach ($raws as $raw) {\n $ra = new RawMaterial();\n $ra->reference = $raw['reference'];\n $ra->value = $raw['value']*$piscofinscomplement;\n $ra->valueicms = $raw['valueicms']*$piscofinscomplement;\n $ra->provider_cod = $raw['provider_cod'];\n $ra->description = trim($raw['description']);\n $ra->basecomponent = $raw['basecomponent'];\n $ra->cables = $raw['cables'];\n $ra->dtex = $raw['dtex'];\n $ra->filaments = $raw['filaments'];\n $ra->finishing = trim($raw['finishing']);\n $ra->save();\n }\n }" ]
[ "0.6414302", "0.6253073", "0.5832242", "0.5672432", "0.56423044", "0.5591802", "0.5566733", "0.549004", "0.54655933", "0.54157776", "0.539749", "0.5396387", "0.5329701", "0.5324562", "0.53005886", "0.5295929", "0.5292813", "0.5282089", "0.5264499", "0.5254967", "0.5249487", "0.524224", "0.52414787", "0.5235783", "0.5233603", "0.52299064", "0.5227239", "0.52195275", "0.5204912", "0.5202827", "0.51978433", "0.5191455", "0.5187144", "0.51797664", "0.5178262", "0.5178222", "0.5166296", "0.51550597", "0.5145514", "0.5144722", "0.51384383", "0.5133315", "0.5126724", "0.5120884", "0.5116137", "0.5113726", "0.5113401", "0.5102851", "0.5100899", "0.50936544", "0.50885254", "0.5083467", "0.5083136", "0.5082493", "0.5076725", "0.50732017", "0.50487655", "0.5045754", "0.5037166", "0.5029989", "0.50275695", "0.50241196", "0.50239146", "0.50202364", "0.50187445", "0.50133264", "0.5002476", "0.49981877", "0.49920493", "0.49862498", "0.49740255", "0.49703443", "0.49650732", "0.4963192", "0.49551687", "0.4953847", "0.49510968", "0.49383447", "0.49356374", "0.4930273", "0.4920209", "0.49193242", "0.4907528", "0.49042183", "0.48883432", "0.48830837", "0.48705178", "0.48699638", "0.48667818", "0.4855393", "0.4854794", "0.48539835", "0.48513177", "0.48453766", "0.4836031", "0.48340103", "0.48337534", "0.48221815", "0.48193073", "0.48157018", "0.48057136" ]
0.0
-1
Parse an entry to the correct format
private function parseEntry(array &$entry, array $mappedRelationships): void { // Remove the data object, because we only needed it to perform a HAVING search on it unset($entry['data']); foreach ($entry as $key => &$value) { // Only properties inside the data object are in the types array, not the ID for example if (!isset($this->properties[$key])) { continue; } /** @var Collection\Property $property */ $property = $this->properties[$key]; $type = $property->getType(); // JSON encoding collection property types if ($property->isTranslatable() || in_array($type->getType(), self::JSON, true)) { $value = json_decode($value, true); } // Cast the values to the correct format $this->performTypeCasting($type, $value); } // Prevent any problems with looped $value variable unset($value); // Parse the dates as ISO strings foreach (self::DATES as $date) { $dateTime = $entry[$date] instanceof DateTime ? $entry[$date] : new DateTime($entry[$date]); $entry[$date] = $dateTime->format(DateTime::ATOM); } // Update the user id's to become user objects foreach (self::USER_PROPERTIES as $id) { // Create a key without _id suffix $key = str_replace('_id', '', $id); // Create the new property with user object $entry[$key] = $this->users[$entry[$id]] ?? null; // No need to perform more actions when the user is NULL if ($entry[$key] !== null) { // Parse the users' dates foreach (self::DATES as $date) { /** @var DateTime $dateTime */ $dateTime = $entry[$key][$date]; $entry[$key][$date] = $dateTime !== null ? $dateTime->format(DateTime::ATOM) : null; } } // Unset the old value unset($entry[$id]); } // Insert the relationships $this->mapRelationships($mappedRelationships, $entry); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _parseEntry($entry) {\n\t\tglobal $bibliographie_bibtex_escaped_chars;\n\t\t$entrycopy = '';\n\t\tif ($this->_options['validate']) {\n\t\t\t$entrycopy = $entry; //We need a copy for printing the warnings\n\t\t}\n\t\t$ret = array();\n\t\tif ('@string' == strtolower(substr($entry, 0, 7))) {\n\t\t\t//String are not yet supported!\n\t\t\tif ($this->_options['validate']) {\n\t\t\t\t$this->_generateWarning('STRING_ENTRY_NOT_YET_SUPPORTED', '', $entry . '}');\n\t\t\t}\n\t\t} elseif ('@preamble' == strtolower(substr($entry, 0, 9))) {\n\t\t\t//Preamble not yet supported!\n\t\t\tif ($this->_options['validate']) {\n\t\t\t\t$this->_generateWarning('PREAMBLE_ENTRY_NOT_YET_SUPPORTED', '', $entry . '}');\n\t\t\t}\n\t\t} else {\n\t\t\t//Parsing all fields\n\t\t\twhile (strrpos($entry, '=') !== false) {\n\t\t\t\t$position = strrpos($entry, '=');\n\t\t\t\t//Checking that the equal sign is not quoted or is not inside a equation (For example in an abstract)\n\t\t\t\t$proceed = true;\n\t\t\t\tif (substr($entry, $position - 1, 1) == '\\\\') {\n\t\t\t\t\t$proceed = false;\n\t\t\t\t}\n\t\t\t\tif ($proceed) {\n\t\t\t\t\t$proceed = $this->_checkEqualSign($entry, $position);\n\t\t\t\t}\n\t\t\t\twhile (!$proceed) {\n\t\t\t\t\t$substring = substr($entry, 0, $position);\n\t\t\t\t\t$position = strrpos($substring, '=');\n\t\t\t\t\t$proceed = true;\n\t\t\t\t\tif (substr($entry, $position - 1, 1) == '\\\\') {\n\t\t\t\t\t\t$proceed = false;\n\t\t\t\t\t}\n\t\t\t\t\tif ($proceed) {\n\t\t\t\t\t\t$proceed = $this->_checkEqualSign($entry, $position);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$value = trim(substr($entry, $position + 1));\n\t\t\t\t$entry = substr($entry, 0, $position);\n\n\t\t\t\tif (',' == substr($value, strlen($value) - 1, 1)) {\n\t\t\t\t\t$value = substr($value, 0, -1);\n\t\t\t\t}\n\t\t\t\tif ($this->_options['validate']) {\n\t\t\t\t\t$this->_validateValue($value, $entrycopy);\n\t\t\t\t}\n\t\t\t\tif ($this->_options['stripDelimiter']) {\n\t\t\t\t\t$value = $this->_stripDelimiter($value);\n\t\t\t\t}\n\t\t\t\tif ($this->_options['unwrap']) {\n\t\t\t\t\t$value = $this->_unwrap($value);\n\t\t\t\t}\n\t\t\t\tif ($this->_options['removeCurlyBraces']) {\n\t\t\t\t\t$value = $this->_removeCurlyBraces($value);\n\t\t\t\t}\n\n\t\t\t\t$position = strrpos($entry, ',');\n\t\t\t\t$field = strtolower(trim(substr($entry, $position + 1)));\n\n\t\t\t\tif($field != 'author' and $field != 'editor')\n\t\t\t\t\t$value = str_replace(array_values($this->escapedChars), array_keys($this->escapedChars), $value);\n\n\t\t\t\t$ret[$field] = $value;\n\t\t\t\t$entry = substr($entry, 0, $position);\n\t\t\t}\n\t\t\t//Parsing cite and entry type\n\t\t\t$arr = explode('{', $entry);\n\t\t\t$ret['cite'] = trim($arr[1]);\n\t\t\t$ret['entryType'] = strtolower(trim($arr[0]));\n\t\t\tif ('@' == $ret['entryType']{0}) {\n\t\t\t\t$ret['entryType'] = substr($ret['entryType'], 1);\n\t\t\t}\n\t\t\tif ($this->_options['validate']) {\n\t\t\t\tif (!$this->_checkAllowedEntryType($ret['entryType'])) {\n\t\t\t\t\t$this->_generateWarning('WARNING_NOT_ALLOWED_ENTRY_TYPE', $ret['entryType'], $entry . '}');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$ret['entryType'] = mb_strtoupper(mb_substr($ret['entryType'], 0, 1)).mb_substr($ret['entryType'], 1);\n\t\t\t//Handling the authors\n\t\t\tif (in_array('author', array_keys($ret)) && $this->_options['extractAuthors']) {\n\t\t\t\t$ret['author'] = $this->_extractAuthors($ret['author']);\n\t\t\t}\n\n\t\t\tif (in_array('editor', array_keys($ret)) && $this->_options['extractAuthors']) {\n\t\t\t\t$ret['editor'] = $this->_extractAuthors($ret['editor']);\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "function parseEntry( array $entry ) {\n\tlist( $index, $id, $expression, $de, $fi, $page ) = $entry;\n\n\tif ( $id ) {\n\t\t$id = \"$expression ($id)\";\n\t} elseif ( strpos( $expression, '.' ) !== false ) {\n\t\t// SMW does not allow dots in the first five characters\n\t\t$id = str_replace( '.', '_', $expression );\n\t}\n\n\t$values = [\n\t\t'expression' => $expression,\n\t\t'de' => $de,\n\t\t'fi' => $fi,\n\t\t'page' => $page,\n\t\t'id' => $id,\n\t];\n\n\t$values = array_filter( $values );\n\n\treturn [ \"Sosva:$index\" => $values ];\n}", "function parseEntry( array $entry ): array {\n\t[ $frame, $LU ] = $entry[0];\n\n\t$linearDoc = linearize( $entry[1] );\n\t$text = stringify( $linearDoc );\n\n\tif ( trim( $LU ) === '' ) {\n\t\t$LU = '???';\n\t}\n\n\tif ( trim( $frame ) === '' ) {\n\t\t$frame = '???';\n\t}\n\n\treturn [ \"TransFrameNet:$frame\" => [ $LU => $text ] ];\n}", "protected function _prepare_entry ($entry)\n {\n parent::_prepare_entry ($entry);\n\n $db = $this->db;\n $entry->kind = $db->f ('entry_kind');\n\n switch ($entry->type)\n {\n case 'change':\n $entry->number = $db->f ('chng_number');\n $entry->job_id = $db->f ('chng_job_id');\n break;\n case 'job':\n $entry->time_created->set_from_iso ($db->f ('job_time_created'));\n $branch_info = $entry->main_branch_info ();\n $branch_info->status = $db->f ('job_status');\n $branch_info->priority = $db->f ('job_priority');\n $branch_info->time_closed->set_from_iso ($db->f ('job_time_closed'));\n $branch_info->closer_id = $db->f ('job_closer_id');\n break;\n }\n }", "function blog_entry_to_array ( $entryFile ) {\n\t\t// Reads a blog entry and returns an key/value pair array.\n\t\t//\n\t\t// Returns false on fail...\n\t\tglobal $sb_info;\n\t\t$blog_entry_data = array();\n\t\t\n\t\t$str = sb_read_file( $entryFile );\n\t\t$exploded_array = explode( '|', $str );\n\t\t\n\t\tif ( count( $exploded_array ) > 1 ) {\n\t\t\tif ( count( $exploded_array ) <= 6 ) {\n\t\t\t\t// Old List Format: subject, date, content, (mood, song)\n\t\t\t\t$blog_entry_data[ 'SUBJECT' ]\t\t= $exploded_array[0];\n\t\t\t\t$blog_entry_data[ 'DATE' ]\t\t\t= $exploded_array[1];\n\t\t\t\t$blog_entry_data[ 'CONTENT' ]\t\t= $exploded_array[2];\n\t\t\t\t$blog_entry_data[ 'relatedlink' ]\t= $exploded_array[3];\n\t\t\t\t$blog_entry_data[ 'VERSION' ]\t\t= $sb_info[ 'version' ];\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// New Format: key/value pairs\n\t\t\t\t//\n\t\t\t\t// The \"keys/value\" pairs can be in any order. Also, the only ones\n\t\t\t\t// that are required are VERSION, SUBJECT, DATE, and CONTENT.\n\t\t\t\t//\n\t\t\t\t// All the other keys are optional. Eventually the CATEGORY tag\n\t\t\t\t// will parse into an array of it's own (probably comma delimited...)\n\t\t\t\t//\n\t\t\t\t// VERSION, SUBJECT, DATE, CONTENT, (MOOD, SONG, CATEGORY, etc...)\n\t\t\t\t// Total count will be 14 items...\n\n\t\t\t\t$blog_entry_data = explode_with_keys( $str );\n\t\t\t}\n\t\t\t\n\t\t\treturn( $blog_entry_data );\n\t\t} else {\n\t\t\treturn( false ); // error\n\t\t}\n\t}", "private function _populateEntryModel(Entry $entry)\n {\n $request = Craft::$app->getRequest();\n\n // Set the entry attributes, defaulting to the existing values for whatever is missing from the post data\n $entry->typeId = $request->getBodyParam('typeId', $entry->typeId);\n $entry->slug = $request->getBodyParam('slug', $entry->slug);\n if (($postDate = $request->getBodyParam('postDate')) !== null) {\n $entry->postDate = DateTimeHelper::toDateTime($postDate) ?: null;\n }\n if (($expiryDate = $request->getBodyParam('expiryDate')) !== null) {\n $entry->expiryDate = DateTimeHelper::toDateTime($expiryDate) ?: null;\n }\n $entry->enabled = (bool)$request->getBodyParam('enabled', $entry->enabled);\n $entry->enabledForSite = $entry->getSection()->getHasMultiSiteEntries()\n ? (bool)$request->getBodyParam('enabledForSite', $entry->enabledForSite)\n : true;\n $entry->title = $request->getBodyParam('title', $entry->title);\n\n if (!$entry->typeId) {\n // Default to the section's first entry type\n $entry->typeId = $entry->getSection()->getEntryTypes()[0]->id;\n }\n\n // Prevent the last entry type's field layout from being used\n $entry->fieldLayoutId = null;\n\n $fieldsLocation = $request->getParam('fieldsLocation', 'fields');\n $entry->setFieldValuesFromRequest($fieldsLocation);\n\n // Author\n $authorId = $request->getBodyParam('author', ($entry->authorId ?: Craft::$app->getUser()->getIdentity()->id));\n\n if (is_array($authorId)) {\n $authorId = $authorId[0] ?? null;\n }\n\n $entry->authorId = $authorId;\n\n // Parent\n if (($parentId = $request->getBodyParam('parentId')) !== null) {\n if (is_array($parentId)) {\n $parentId = reset($parentId) ?: '';\n }\n\n $entry->newParentId = $parentId ?: '';\n }\n\n // Revision notes\n $entry->revisionNotes = $request->getBodyParam('revisionNotes');\n }", "function fullSplit($entry)\n {\n $matches = preg_split(\"/@(.*)[{(](.*),/U\", $entry, 2, PREG_SPLIT_DELIM_CAPTURE);\n $this->entries[$this->count]['bibtexEntryType'] = strtolower(trim($matches[1]));\n // sometimes a bibtex entry will have no citation key\n if(preg_match(\"/=/\", $matches[2])) // this is a field\n $matches = preg_split(\"/@(.*)\\s*[{(](.*)/U\", $entry, 2, PREG_SPLIT_DELIM_CAPTURE);\n // print_r($matches); print \"<P>\";\n $this->entries[$this->count]['bibtexCitation'] = $matches[2];\n $this->reduceFields($matches[3]);\n }", "protected function _hydrateEntry($entry) {\n\t\t//echo \"Hydrating: \"; print_r($entry);\n\t\t\n\t\tif ($entry->published && is_numeric($entry->published)) {\n\t\t\t$entry->published = date('c', $entry->published);\n\t\t}\n\n\t\tif ($entry->updated && is_numeric($entry->updated) && $entry->updated>0) {\n\t\t\t$entry->updated = date('c', $entry->updated);\n\t\t}\n\t\t\n\t\tif ($entry->author_id) {\n\t\t\t$entry->author = $this->getAuthorById($entry->author_id);\n\t\t\t//echo \"Hydrating author: \"; print_r($entry->author);\n\t\t\tunset($entry->author_id);\n\t\t}\n\t\t\n\t\treturn $entry;\n\t}", "function breakIntoDataStructure( $entry ){\n\tif(!is_string($entry)) return;\n\t$s = array();\n\t$key_value_pairs = explode(\"\\t\", $entry);\n\tforeach($key_value_pairs as $pair){\n\t\tlist($key, $value) = explode(\"#\", $pair);\n\t\t$s[trim($key)] = trim($value);\n\t}\n\tforeach($s as $k => $v){\n\t\tif(preg_match(\"/!_!/\", $v, $m)){\n\t\t\t$values = explode(\"!_!\", $v);\n\t\t\tforeach($values as &$value){\n\t\t\t\t$value = trim($value);\n\t\t\t}\n\t\t\t$s[trim($k)] = $values;\n\t\t}\n\t}\n\t/*\n\t// do lots of unnecessary logic in making $s['desc']\n\tif(isset($s['note']) || isset($s['function'])){\n\t\tif(isset($s['note']) && isset($s['function'])){\n\t\t\t$s['desc'] = $s['note'] . \"<br />\\n\" . $s['function'];\n\t\t} else {\n\t\t\tif(isset($s['note'])) $s['desc'] .= $s['note'];\n\t\t\tif(isset($s['function'])) $s['desc'] .= $s['function'];\n\t\t}\n\t} else {\n\t\t$s['desc'] = $s['product'];\n\t}\n\t*/\n\treturn $s;\n}", "public static function split_entry($row)\n\t{\n\t\t// Get the date\n\t\tpreg_match(self::$date_regex, $row, $matches);\n $data = array(\n 'date' => $matches[0],\n );\n\n\n\t\t// Trim off the date and ---\n\t\t$row = str_replace($data['date'].\" --- \", \"\", $row);\n\n\t\t// Now get the type\n\t\tpreg_match(\"/^\\w+/\", $row, $matches);\n\t\t$data['type'] = strtolower($matches[0]);\n\t\t$data['log'] = $row;\n\n\t\treturn $data;\n\t}", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "function transformEntry($timeTrackerEntry);", "protected function parse() {}", "protected function parse()\n {\n if($this->isRelationalKey()){\n $this->parsedValue = $this->makeRelationInstruction();\n } \n else {\n $this->parsedValue = $this->parseFlatValue($this->value);\n } \n }", "public function prepare_entry_for_response( $entry ) {\n\n\t\tif ( is_wp_error( $entry ) || ! isset( $entry['form_id'] ) ) {\n\t\t\treturn $entry;\n\t\t}\n\n\t\t$form = GFAPI::get_form( $entry['form_id'] );\n\t\tforeach ( $form['fields'] as $field ) {\n\n\t\t\tif ( empty( $entry[ $field->id ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $field instanceof GF_Field_MultiSelect ) {\n\n\t\t\t\t$entry[ $field->id ] = $field->to_array( $entry[ $field->id ] );\n\n\t\t\t} elseif ( $field instanceof GF_Field_FileUpload && $field->multipleFiles ) {\n\n\t\t\t\t$entry[ $field->id ] = json_decode( $entry[ $field->id ] );\n\n\t\t\t} elseif ( $field instanceof GF_Field_List ) {\n\n\t\t\t\t$entry[ $field->id ] = maybe_unserialize( $entry[ $field->id ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $entry;\n\t}", "public function processEntry( $entry ) {\n\t\t$revdeleted = 0;\n\t\tif ( isset( $entry['actionhidden'] ) ) {\n\t\t\t$revdeleted = $revdeleted | LogPage::DELETED_ACTION;\n\t\t\tif ( !isset( $entry['title'] ) ) {\n\t\t\t\t$entry['title'] = '';\n\t\t\t\t$entry['ns'] = 0;\n\t\t\t}\n\t\t}\n\t\tif ( isset( $entry['commenthidden'] ) ) {\n\t\t\t$revdeleted = $revdeleted | LogPage::DELETED_COMMENT;\n\t\t\tif ( !isset( $entry['comment'] ) ) {\n\t\t\t\t$entry['comment'] = '';\n\t\t\t}\n\t\t}\n\t\tif ( isset( $entry['userhidden'] ) ) {\n\t\t\t$revdeleted = $revdeleted | LogPage::DELETED_USER;\n\t\t\tif ( !isset( $entry['user'] ) ) {\n\t\t\t\t$entry['user'] = '';\n\t\t\t\t$entry['userid'] = 0;\n\t\t\t}\n\t\t}\n\t\tif ( isset( $entry['suppressed'] ) ) {\n\t\t\t$revdeleted = $revdeleted | LogPage::DELETED_RESTRICTED;\n\t\t}\n\n\t\t$title = $entry['title'];\n\t\t$ns = $entry['ns'];\n\t\t$title = $this->sanitiseTitle( $ns, $title );\n\n\t\t$ts = wfTimestamp( TS_MW, $entry['timestamp'] );\n\t\tif ( $ts < 20080000000000 && preg_match( '/^Wikia\\-/', $entry['user'], $matches ) ) {\n\t\t\t# A tiny bug on Wikia in 2006-2007, affects ~10 log entries only\n\t\t\tif ( isset( $matches[0] ) ) {\n\t\t\t\t$entry['user'] = substr( $entry['user'], 0, 6 );\n\t\t\t}\n\t\t}\n\n\t\t$performer = $this->getActorFromUser( (int)$entry['userid'], $entry['user'] );\n\n\t\t$e = [\n\t\t\t'log_id' => $entry['logid'],\n\t\t\t'log_type' => $entry['type'],\n\t\t\t'log_action' => $entry['action'],\n\t\t\t'log_timestamp' => $ts,\n\t\t\t'log_namespace' => $ns,\n\t\t\t'log_title' => $title,\n\t\t\t# This is now handled using builtin MediaWiki code below...\n\t\t\t#'log_user' => $entry['userid'],\n\t\t\t#'log_user_text' => $entry['user'],\n\t\t\t#'log_comment' => $wgContLang->truncateForDatabase( $entry['comment'], 255 ),\n\t\t\t'log_actor' => $performer,\n\t\t\t'log_params' => $this->encodeLogParams( $entry ),\n\t\t\t'log_deleted' => $revdeleted\n\t\t];\n\n\t\t# May not be set in older MediaWiki instances. This field can be null\n\t\t# Note that it contains the page id at the time the log was inserted,\n\t\t# not the current page id of the title.\n\t\tif ( isset( $entry['logpage'] ) ) {\n\t\t\t$e['log_page'] = $entry['logpage'];\n\t\t}\n\n\t\t# Bits of code picked from ManualLogEntry::insert()\n\t\t$e += $this->commentStore->insert( $this->dbw, 'log_comment', $entry['comment'] );\n\n\t\t$this->dbw->insert( 'logging', $e, __METHOD__ );\n\n\t\t# Insert tags, if any\n\t\tif ( isset( $entry['tags'] ) && count( $entry['tags'] ) > 0 ) {\n\t\t\t$this->insertTags( $entry['tags'], null, $entry['logid']);\n\t\t}\n\n\t\t$this->dbw->commit();\n\t}", "protected function processFeedEntry(JFeedEntry $entry, SimpleXMLElement $el)\n\t{\n\t\t$entry->uri = (string) $el->link;\n\t\t$entry->title = (string) $el->title;\n\t\t$entry->publishedDate = (string) $el->pubDate;\n\t\t$entry->updatedDate = (string) $el->pubDate;\n\t\t$entry->content = (string) $el->description;\n\t\t$entry->guid = (string) $el->guid;\n\t\t$entry->comments = (string) $el->comments;\n\n\t\t// Add the feed entry author if available.\n\t\t$author = (string) $el->author;\n\n\t\tif (!empty($author))\n\t\t{\n\t\t\t$entry->author = $this->processPerson($author);\n\t\t}\n\n\t\t// Add any categories to the entry.\n\t\tforeach ($el->category as $category)\n\t\t{\n\t\t\t$entry->addCategory((string) $category, (string) $category['domain']);\n\t\t}\n\n\t\t// Add any enclosures to the entry.\n\t\tforeach ($el->enclosure as $enclosure)\n\t\t{\n\t\t\t$link = new JFeedLink(\n\t\t\t\t(string) $enclosure['url'],\n\t\t\t\tnull,\n\t\t\t\t(string) $enclosure['type'],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t(int) $enclosure['length']\n\t\t\t);\n\n\t\t\t$entry->addLink($link);\n\t\t}\n\t}", "protected function parseEntryElement(\n $entry_html,\n $title_selector = null,\n $author_selector = null,\n $category_selector = null,\n $time_selector = null,\n $time_format = null,\n $content_cleanup = null,\n $title_default = null,\n $remove_styling = false\n ) {\n $article_content = convertLazyLoading($entry_html);\n\n if (is_null($title_selector)) {\n $article_title = $title_default;\n } else {\n $article_title = trim($entry_html->find($title_selector, 0)->innertext);\n }\n\n $author = null;\n if (!is_null($author_selector) && $author_selector != '') {\n $author = trim($entry_html->find($author_selector, 0)->innertext);\n }\n\n $categories = [];\n if (!is_null($category_selector && $category_selector != '')) {\n $category_elements = $entry_html->find($category_selector);\n foreach ($category_elements as $category_element) {\n $categories[] = trim($category_element->innertext);\n }\n }\n\n $time = null;\n if (!is_null($time_selector) && $time_selector != '') {\n $time_element = $entry_html->find($time_selector, 0);\n $time = $time_element->getAttribute('datetime');\n if (is_null($time)) {\n $time = $time_element->innertext;\n }\n\n $this->parseTimeStrAsTimestamp($time, $time_format);\n }\n\n $article_content = $this->cleanArticleContent($article_content, $content_cleanup, $remove_styling);\n\n $item = [];\n $item['title'] = $article_title;\n $item['content'] = $article_content;\n $item['categories'] = $categories;\n $item['timestamp'] = $time;\n $item['author'] = $author;\n return $item;\n }", "public function parse();", "public function parse();", "public function parse();", "public function parse()\n\t{\n\t\t$this->parseGroups();\n\t\t$this->parseBadges();\n\t}", "function parseVideoEntry($entry) { \n \t$obj\t\t\t\t= new \\stdClass;\n\t\t$media\t\t\t\t= $entry->children('http://search.yahoo.com/mrss/');\n $obj->title\t\t\t= $media->group->title;\n $obj->description\t= $media->group->description;\n\t\t\n\t\t$yt = $media->children('http://gdata.youtube.com/schemas/2007');\n $attrs = $yt->duration->attributes();\n $obj->length = $attrs['seconds']; \n return $obj; \n\t}", "private function parse($contents) // {{{\n {\n $entries = array();\n preg_match_all(\"/@(\\\\w+?)\\\\{([^,]+?),(.*?)\\\\n\\\\s*?\\\\}\\\\s*?\\\\n/ms\", \n $contents, $entries, PREG_SET_ORDER);\n foreach ($entries as $entry)\n {\n $bibtex_type = $entry[1];\n $bibtex_name = $entry[2];\n $bibtex_contents = $entry[3].\",\\n\"; // Newline added so that all entries are followed by one\n preg_match_all(\"/(\\\\w+?)\\\\s*=\\\\s*\\\\{(.*?)\\\\},\\\\n/ms\", \n $bibtex_contents, $pairs, PREG_SET_ORDER);\n $params = array();\n foreach ($pairs as $pair)\n {\n $k = $pair[1];\n $v = $pair[2];\n $params[\"raw\"][$k] = Bibliography::unspace($v); // We keep the original BibTeX string in the \"raw\" subarray\n $params[$k] = Bibliography::removeBraces(\n Bibliography::replaceAccents(Bibliography::unspace($v)));\n }\n $params[\"bibtex_type\"] = $bibtex_type;\n $this->m_entries[$bibtex_name] = $params;\n }\n }", "function _parseLine($line) {\n\t$line = trim($line);\n\n\t$array = array();\n\n\tif (preg_match('/^-(.*):$/',$line)) {\n\t\t// It's a mapped sequence\n\t\t$key = trim(substr(substr($line,1),0,-1));\n\t\t$array[$key] = '';\n\t} elseif ($line[0] == '-' && substr($line,0,3) != '---') {\n\t\t// It's a list item but not a new stream\n\t\tif (strlen($line) > 1) {\n\t\t$value = trim(substr($line,1));\n\t\t// Set the type of the value. Int, string, etc\n\t\t$value = $this->_toType($value);\n\t\t$array[] = $value;\n\t\t} else {\n\t\t$array[] = array();\n\t\t}\n\t} elseif (preg_match('/^(.+):/',$line,$key)) {\n\t\t// It's a key/value pair most likely\n\t\t// If the key is in double quotes pull it out\n\t\tif (preg_match('/^([\"\\'](.*)[\"\\'](\\s)*:)/',$line,$matches)) {\n\t\t$value = trim(str_replace($matches[1],'',$line));\n\t\t$key = $matches[2];\n\t\t} else {\n\t\t// Do some guesswork as to the key and the value\n\t\t$explode = explode(':',$line);\n\t\t$key = trim($explode[0]);\n\t\tarray_shift($explode);\n\t\t$value = trim(implode(':',$explode));\n\t\t}\n\n\t\t// Set the type of the value. Int, string, etc\n\t\t$value = $this->_toType($value);\n\t\tif (empty($key)) {\n\t\t$array[] = $value;\n\t\t} else {\n\t\t$array[$key] = $value;\n\t\t}\n\t}\n\treturn $array;\n\t}", "abstract public function parse ();", "protected function massageEntry($entry)\n {\n return [\n 'mediaId' => static::massageMediaId($entry['plrequest$mediaId']),\n 'requestCount' => $entry['plrequest$requestCount'],\n ];\n }", "function entry_parse($entry)\n{\n\n // Address\n if (!empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['city'];\n }\n if (!empty($entry['state']) && !empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['state'];\n }\n if (!empty($entry['zip']) && !empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['zip'];\n }\n $entry['address'] = ltrim($entry['address'], ', ');\n\n // DB Connection\n $db = DB::get('directory');\n\n // Images\n $result = $db->prepare(\"SELECT `file` FROM `\" . Settings::getInstance()->TABLES['UPLOADS'] . \"` WHERE `row` = :row AND `type` = :type ORDER BY `order` ASC;\");\n\n // Logo\n $result->execute(array('row' => $entry['id'], 'type' => 'directory_logo'));\n $logo = $result->fetchColumn();\n if (!empty($logo)) {\n $entry['logo'] = '/uploads/' . $logo;\n }\n\n // Thumbnails\n $result->execute(array('row' => $entry['id'], 'type' => 'directory'));\n $thumbnails = $result->fetchAll();\n if (!empty($thumbnails)) {\n $entry['thumbnails'] = array_map(function ($image) {\n return '/uploads/' . $image['file'];\n }, $thumbnails);\n }\n\n // Main Image (Logo, Thumbnail, No Image)\n $entry['image'] = !empty($entry['logo']) ? $entry['logo'] : false;\n if (empty($entry['image']) && !empty($entry['thumbnails'])) {\n $entry['image'] = $entry['thumbnails'][0];\n }\n $entry['image'] = !empty($entry['image']) ? $entry['image'] : '/img/404.gif';\n\n // Website URL\n if (!empty($entry['website'])) {\n // Escape HTML\n $entry['website'] = htmlspecialchars($entry['website']);\n // Prepend HTTP:// If Needed\n if (!preg_match('#http://#', $entry['website'])) {\n $entry['website'] = 'http://' . $entry['website'];\n }\n // Turn into Anchor Link\n if ($entry['website_link'] == 'Y') {\n $entry['website'] = '<a href=\"' . $entry['website'] . '\" target=\"_blank\"' . ($entry['no_follow'] == 'Y' ? ' rel=\"nofollow\"' : '') . '>' . preg_replace('#^http://#', '', rtrim($entry['website'], '/')) . '</a>';\n }\n }\n\n // Append rel=\"nofollow\" to Anchors\n if ($entry['no_follow'] == 'Y') {\n $entry['description'] = preg_replace(\"/<\\s*a\\s+(.+?)>/i\", '<a $1 rel=\"nofollow\">', $entry['description']);\n }\n\n // URL Details\n if (!empty($entry['primary_category'])) {\n $entry_dir = $entry['primary_category'];\n } elseif (!empty($_GET['category'])) {\n $entry_dir = $_GET['category'];\n } else {\n $entry_cats = explode(',', $entry['categories']);\n $entry_dir = $entry_cats[0];\n }\n $entry['url_details'] = sprintf(URL_DIRECTORY_LISTING, $entry_dir, $entry['link']);\n\n // Return Entry\n return $entry;\n}", "abstract public function parse($value);", "public function parse() {\n\t\t$pointer = 0;\n\t\t$ar_line = array();\n\n\t\tforeach ($this->structure as $key => $length) {\n\t\t\t$ar_line[$key] = trim(substr($this->line, $pointer, $length), \"\\n\\r \");\n\t\t\t$pointer += $length;\n\t\t}\n\t\t$ar_line['stamp'] = md5(serialize($ar_line));\n\n\t\tif ($this->return == 'array') {\n\t\t\treturn $ar_line;\n\t\t}\n\t\treturn (object) $ar_line;\n\t}", "abstract protected function populateEntry(HistoryEntry $entry);", "function _validateValue($entry, $wholeentry) {\n\t\t//There is no @ allowed if the entry is enclosed by braces\n\t\tif (preg_match('/^{.*@.*}$/', $entry)) {\n\t\t\t$this->_generateWarning('WARNING_AT_IN_BRACES', $entry, $wholeentry);\n\t\t}\n\t\t//No escaped \" allowed if the entry is enclosed by double quotes\n\t\tif (preg_match('/^\\\".*\\\\\".*\\\"$/', $entry)) {\n\t\t\t$this->_generateWarning('WARNING_ESCAPED_DOUBLE_QUOTE_INSIDE_DOUBLE_QUOTES', $entry, $wholeentry);\n\t\t}\n\t\t//Amount of Braces is not correct\n\t\t$open = 0;\n\t\t$lastchar = '';\n\t\t$char = '';\n\t\tfor ($i = 0; $i < strlen($entry); $i++) {\n\t\t\t$char = substr($entry, $i, 1);\n\t\t\tif (('{' == $char) && ('\\\\' != $lastchar)) {\n\t\t\t\t$open++;\n\t\t\t}\n\t\t\tif (('}' == $char) && ('\\\\' != $lastchar)) {\n\t\t\t\t$open--;\n\t\t\t}\n\t\t\t$lastchar = $char;\n\t\t}\n\t\tif (0 != $open) {\n\t\t\t$this->_generateWarning('WARNING_UNBALANCED_AMOUNT_OF_BRACES', $entry, $wholeentry);\n\t\t}\n\t}", "abstract public function parse( $line );", "function Parse($citation){\n\n\t\t// Get rid of the bibitem type...\n\t\t$citation=ereg_replace(\"@[^,]*,\", '', $citation);\n\n\t\t// ...also of those annoying LFs and CRs...\n\t\t$citation=str_replace(\"\\n\", ' ', $citation);\n\t\t$citation=str_replace(\"\\r\", '', $citation);\n\n\t\t// ...drop the capitalization aids...\n\t\t$citation=str_replace('{', '', $citation);\n\t\t$citation=str_replace('}', '', $citation);\n\n\t\t// ...also drop tex & latex commands for high ascii chars...\n\t\t$citation = strtr($citation, array(\"\\'a\" => 'á', \"\\'e\" => 'é', \"\\'\\i\" => 'í', \"\\'o\" => 'ó', \"\\'u\" => 'ú', \"\\~n\" => 'ñ'));\n\n\t\t// ...and then mark the end of every keyword-value pair\n\t $citation=ereg_replace(\"[[:blank:]]*=[[:blank:]]*\", '=', $citation);\n \t$citation=ereg_replace(\"([[:upper:]]+=\\\"[^\\\"]*\\\")[,)]\", '\\\\1::', $citation);\n\t $citation=ereg_replace(\"([[:upper:]]+=[^,^\\\"^ ]*)[[[:blank:]]*[,)]\", '\\\\1::', $citation);\n\n\t\t// Finally, lets decode the citation content\n\t\t$fields=explode('::', $citation);\n\n\t\t// Once decoded, set the local variables accordingly\n\t\tfor($index=0; $index<count($fields); $index++) {\n\t\t\tlist($keyword, $value) = explode('=', $fields[$index]);\n\t\t\t$keyword = strtoupper(ereg_replace(\"[[:blank:]]\", '', $keyword));\n\t\t\t$value = str_replace('\"', '', $value);\n\t\t\tswitch ($keyword) {\n\n\t\t\t\tcase 'AUTHOR';\n\t\t\t\t\t$authors = explode(' and ', $value);\n\n\t\t\t\t\tswitch (count($authors)) { // Poor man's version of bibtex author handling ;)\n\n\t\t\t\t\t\tcase 1;\n\t\t\t\t\t\t\t$this->author = $value;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 2;\n\t\t\t\t\t\t\t$this->author = $authors[0] . ' and ' . $authors[1];\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 3;\n\t\t\t\t\t\t\t$this->author = $authors[0] . ', ' . $authors[1] . ' and ' . $authors[2];\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$this->author = $authors[0] . ', ' . $authors[1] . ', et al';\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'TITLE';\n\t\t\t\t\t$this->title = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YEAR';\n\t\t\t\t\t$this->year = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'BOOKTITLE';\n\t\t\t\t\t$this->booktitle = $value;\n\t\t\t\t\tbreak;\n\t\n\t\t\t\tcase 'JOURNAL';\n\t\t\t\t\t$this->journal = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'VOLUME';\n\t\t\t\t\t$this->volume = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'NUMBER';\n\t\t\t\t\t$this->number = $value;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "abstract public static function parse($value);", "function salmon_from_atom($atom_string) {\n\t$xml_parser = xml_parser_create(''); \n\t$xml_values = array();\n\t$xml_tags = array();\n\tif(!$xml_parser) \n\t\treturn false; \n\txml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); \n\txml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0); \n\txml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, 1); \n\txml_parse_into_struct($xml_parser, trim($atom_string), $xml_values); \n\txml_parser_free($xml_parser); \n\n\t$entry = new SalmonEntry();\n\t$breadcrumbs = array();\n\tfor ($i = 0; in_array($i,array_keys($xml_values)); $i++) {\n\t\t$atom = $xml_values[$i];\n\t\t// Only process one entry. This could be generalized to a feed later.\n\t\tif (strtolower($atom['tag']) == 'entry' && \n\t\t\tstrtolower($atom['type']) == 'close') {\n\t\t\tbreak;\n\t\t}\n\t\t// Keep a \"breadcrumb\" list of the tag hierarchy we're currently in.\n\t\t$breadcrumbs[$atom['level']] = $atom['tag'];\n \n\t\t// Parse individual attributes one at a time.\n\t\tswitch (strtolower($atom['tag'])) {\n\t\t\tcase 'id':\n\t\t\t\t$entry->id = $atom['value'];\n\t\t\t\tbreak;\n\t\t\tcase 'name':\n\t\t\t\tif (salmon_parent_is($atom, 'author', $breadcrumbs)) {\n\t\t\t\t\t$entry->author_name = $atom['value'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'uri':\n\t\t\t\tif (salmon_parent_is($atom, 'author', $breadcrumbs)) {\n\t\t\t\t\t$entry->author_uri = $atom['value'];\n\t\t\t\t}\n\t\t\t\tbreak; \n\t\t\tcase 'thr:in-reply-to':\n\t\t\t\t$entry->thr_in_reply_to = $atom['value'];\n\t\t\t\tbreak;\n\t\t\tcase 'content':\n\t\t\t\t$entry->content = $atom['value'];\n\t\t\t\tbreak;\n\t\t\tcase 'title':\n\t\t\t\t$entry->title = $atom['value'];\n\t\t\t\tbreak;\n\t\t\tcase 'updated':\n\t\t\t\t$entry->updated = $atom['value'];\n\t\t\t\tbreak;\n\t\t\tcase 'sal:signature':\n\t\t\t\t$entry->salmon_signature = $atom['value'];\n\t\t\t\tbreak;\n\t\t}\n\t}\n \n\t$entry->webfinger = from_acct_string($entry->author_uri);\n\treturn $entry; \n}", "public function parseValue();", "protected function parse()\n {\n // [square] ..... visible comments (don't count as words for sorting, don't act as keywords)\n // (round) ....... for optional parts (count as words for sorting, act as keywords)\n // {curly} ........ word class definitions (use word class field instead, except for gender tags like {f}, {pl}, ...)\n\n while (($line = fgets($this->handle)) !== false) {\n if (strpos($line, '#') === 0) {\n continue;\n }\n\n if (trim($line) === '') {\n continue;\n }\n\n $data = preg_split('/[\\t]+/', $line);\n\n $headword = trim($data[0]);\n $translation = trim($data[1]);\n $wordclass = '';\n $subject = '';\n\n if (count($data) > 2) {\n $wordclass = trim($data[2]);\n }\n\n if (count($data) > 3) {\n $subject = trim($data[3]);\n }\n\n $entry = new Entry();\n\n $entry->directionId = $this->directionId;\n $entry->headword = $headword;\n $entry->translation = $translation;\n $entry->wordclass = $wordclass;\n\n $entry->subjects = $entry->getParsedSubjects($subject);\n $entry->parseHeadword();\n $entry->parseTranslation();\n\n yield $entry->jsonSerialize();\n }\n }", "protected function parse()\n {\n\t$event_lines = explode(HCAL_LINE_SPLITER, $this->_Content);\n\n\tforeach ($event_lines as $line)\n\t{\n\t $result = $this->parseProperty($line);\n\t $this->_Properties[$result['name']] = $result['value'];\n\t}\n }", "public function parse(string $input);", "function parseValue($value);", "public function ingestGenericEntry($entry)\n {\n // setup defaults (hopefully overwrite later)\n $values = self::getDefaults(true);\n // pull source filename\n if (isset($entry->{'file_original'})) {\n $this->original_source = 'file://' . $entry->file_original;\n }\n // use alias to set headline (if unset, hence imbue)\n if (isset($entry->{'alias'})) {\n $values['iptc_headline'] = str_replace('_', ' ', FileReader::stripExtension($entry->alias));\n }\n $this->imbue($values);\n return $this;\n }", "public function parse(string $value);", "public function deserializerRequest(\n string $entity,\n string $validationGroup = 'new',\n $entry = null\n ): object {\n if (!$entry) {\n $entry = new $entity();\n }\n $request = $this->requestStack->getMasterRequest();\n\n $entry = $this->serializer->deserialize(\n $request->getContent(),\n $entity,\n $request->getFormat($request->getRequestFormat()),\n [\n 'object_to_populate' => $entry\n ]\n );\n\n $errors = $this->validator->validate(\n $entry,\n null,\n $validationGroup\n );\n\n if (count($errors) > 0) {\n throw new APIValidationException($errors);\n }\n\n return $entry;\n }", "protected function parseTransactionEntryTimestamp()\n {\n $results = [];\n if (preg_match('/^:61:(\\d{2})((\\d{2})\\d{2})((\\d{2})\\d{2})[C|D]/', $this->getCurrentTransactionData(), $results)\n && !empty($results[1])\n ) {\n\n list(, $valueDateY, $valueDateMD, $valueDateM, $entryDateMD, $entryDateM) = $results;\n $entryDate = $valueDateY . $entryDateMD;\n if ($valueDateMD !== $entryDateMD && $valueDateM > $entryDateM) {\n $entryDate = ($valueDateY + 1) . $entryDateMD;\n }\n\n return $this->sanitizeTimestamp($entryDate, 'ymd');\n }\n return 0;\n }", "protected function parseSectionErrorCodes(array $entry) {\n\t\tif (strlen(trim($entry[1])) == 0) return;\n\t\t$this->getErrorhandler()->setErrorMessage(trim($entry[0]), trim($entry[1]));\n\t}", "protected function parseEntryElement(\\SimpleXMLElement $node) {\n\t\t\t$entry = array();\n\t\t\t$attributes = $node->attributes();\n\t\t\tif (!isset($attributes['key'])) {\n\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t}\n\t\t\t$key = $this->__valueOf($attributes['key']);\n\t\t\tif (!Spring\\Data\\XML\\Syntax::isKey($key)) {\n\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t}\n\t\t\t$children = $node->children();\n\t\t\tif (count($children) > 0) {\n\t\t\t\tforeach ($children as $child) {\n\t\t\t\t\tswitch ($child->getName()) {\n\t\t\t\t\t\tcase 'array':\n\t\t\t\t\t\t\t$entry[$key] = $this->parseArrayElement($child);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'dictionary':\n\t\t\t\t\t\t\t$entry[$key] = $this->parseDictionaryElement($child);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'expression':\n\t\t\t\t\t\t\t$entry[$key] = $this->parseExpressionElement($child);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'null':\n\t\t\t\t\t\t\t$entry[$key] = $this->parseNullElement($child);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'undefined':\n\t\t\t\t\t\t\t$entry[$key] = $this->parseUndefinedElement($child);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'value':\n\t\t\t\t\t\t\t$entry[$key] = $this->parseValueElement($child);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (isset($attributes['value'])) {\n\t\t\t\t$value = $this->__valueOf($attributes['value']);\n\t\t\t\tif (isset($attributes['type'])) {\n\t\t\t\t\t$type = $this->__valueOf($attributes['type']);\n\t\t\t\t\tif (!Spring\\Data\\XML\\Syntax::isPrimitiveType($type)) {\n\t\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t\t}\n\t\t\t\t\t$value = Core\\Convert::changeType($value, $type);\n\t\t\t\t}\n\t\t\t\t$entry[$key] = $value;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t}\n\t\t\treturn $entry;\n\t\t}", "public function parse( $contents );", "public function add_entry($entry);", "public function parse(string $row): Parser\\Result;", "function &addEntry($entry) {\n $reuslt = NULL;\n if (is_object($entry) && is_a($entry, 'papaya_atom_entry')) {\n $result = $this->add();\n $result->assign($entry);\n }\n return $result;\n }", "abstract protected function parse($data);", "public function parse($data);", "public function parse($data);", "public function parse($data);", "function processFileContents(&$entryArray, $dbentry) {\n //ignore $fileContents[0] assume headings - check\n\n print \"\\nProcess file contents, format entries:\\n\";\n\n $contentNum = sizeof($entryArray);\n $lineNums = 0;\n\n foreach($entryArray as $entry) {\n \n if ($lineNums == 0) { \n // del first entry as it 'should' be the headings- check\n if (checkFileHeading($entryArray[$lineNums])) {\n unset($entryArray[$lineNums]);\n } \n $lineNums++;\n continue; \n }\n // first name\n $entryArray[$lineNums][0] = nameFormatAnglo($entry[0]);\n // surname\n $entryArray[$lineNums][1] = nameFormatAnglo($entry[1]);\n // email check, can return NULL\n $entryArray[$lineNums][2] = simpleEmailCheck($entry[2]);\n if ($entry[2] === NULL) {\n // have error in email\n // option to manually fix email?\n print $entryArray[$lineNums][0].\n \",\".$entryArray[$lineNums][1].\n \", INVALID EMAIL.\\n\";\n }\n $lineNums++;\n }\n print \"\\nEnd of file processing.\\n\\n\";\n \n if ($dbentry === TRUE) {\n print \"\\nAdd entries.\\n\";\n addEntries($entryArray);\n }\n else {\n print \"\\nEntries not added.\\n\";\n }\n }", "protected function parse()\n {\n preg_match('/(user|ip)\\:\\\"?([0-9a-zA-ZąćęłńóśźżĄĆĘŁŃÓŚŹŻ._ -]{1,})\\\"?/', $this->inputQuery, $matches);\n\n if (empty($matches)) {\n return $this->filteredQuery = $this->inputQuery;\n }\n\n list($original, $key, $value) = $matches;\n\n $this->filteredQuery = str_replace($original, '', $this->inputQuery);\n $this->filters[$key] = trim($value, '\"');\n }", "public function parse($string);", "function parseLine($line) {\n $document = array();\n\n $document['geonameId'] = (int) $line[0];\n $document['name'] = $line[1];\n $document['asciiName'] = $line[2];\n\n if($line[3] !== NULL && $line[3] !== \"\") {\n $document['alternateNames'] = split(\",\", $line[3]);\n }\n\n $document['location'] = array('lat' => (float)($line[4]), 'lon' => (float)($line[5]));\n\n $document['featureClass'] = $line[6];\n $document['featureCode'] = $line[7];\n $document['countryCode'] = $line[8];\n\n if($line[8] !== NULL && $line[9] !== \"\") {\n $document['cc2'] = split(\",\", $line[9]);\n }\n\n $document['admin1Code'] = $line[10];\n $document['admin2Code'] = $line[11];\n $document['admin3Code'] = $line[12];\n $document['admin4Code'] = $line[13];\n $document['population'] = (int)$line[14];\n $document['elevation'] = (int)$line[15];\n $document['dem'] = (int)$line[16];\n $document['timezone'] = $line[17];\n $document['modificationDate'] = $line[18];\n\n return $document;\n}", "public function parseDailyEntry($file)\n {\n $matches = [];\n if (preg_match('/(\\d{4}-\\d{2}-\\d{2})-?([\\w\\d \\-_]+)?\\.md/', $file, $matches)) {\n // daily entry\n $datetime = \\DateTime::createFromFormat('Y-m-d', $matches[1]);\n $author = isset($matches[2]) ? ' ('.$matches[2].')' : '';\n $this->entries[$datetime->format('F Y')][$datetime->format('jS F Y').$author] = [\n 'date' => $datetime->format('jS F Y'),\n 'file' => $file,\n 'author' => $author\n ];\n } else {\n printf(\"Skipping malformed file (expected Y-m-d.md or Y-m-d-author.md) %s\\n\", $file);\n }\n }", "protected static function fill_entry_details($entry, $context) {\n global $PAGE;\n $canviewfullnames = has_capability('moodle/site:viewfullnames', $context);\n\n // Format concept and definition.\n $entry->concept = external_format_string($entry->concept, $context->id);\n list($entry->definition, $entry->definitionformat) = external_format_text($entry->definition, $entry->definitionformat,\n $context->id, 'mod_glossary', 'entry', $entry->id);\n\n // Author details.\n $user = mod_glossary_entry_query_builder::get_user_from_record($entry);\n $userpicture = new user_picture($user);\n $userpicture->size = 1;\n $entry->userfullname = fullname($user, $canviewfullnames);\n $entry->userpictureurl = $userpicture->get_url($PAGE)->out(false);\n\n // Fetch attachments.\n $entry->attachment = !empty($entry->attachment) ? 1 : 0;\n $entry->attachments = array();\n if ($entry->attachment) {\n $entry->attachments = external_util::get_area_files($context->id, 'mod_glossary', 'attachment', $entry->id);\n }\n $definitioninlinefiles = external_util::get_area_files($context->id, 'mod_glossary', 'entry', $entry->id);\n if (!empty($definitioninlinefiles)) {\n $entry->definitioninlinefiles = $definitioninlinefiles;\n }\n\n $entry->tags = \\core_tag\\external\\util::get_item_tags('mod_glossary', 'glossary_entries', $entry->id);\n }", "private function setFieldValue(ContentfulEntryField $field, ContentfulEntry $entry, array $innerField): void\n {\n try {\n if (array_key_exists('content', $innerField) && array_key_exists('nodeType', $innerField)) {\n $field->setValue($this->richTextParser->parseLocalized($innerField, null), ContentfulEntryFieldType::RICHTEXT);\n } elseif (array_key_exists('lon', $innerField) && array_key_exists('lat', $innerField)) {\n $field->setValue($innerField, ContentfulEntryFieldType::GEOLOCATION);\n } elseif (array_key_exists('sys', $innerField)) {\n if ($innerField['sys']['linkType'] === 'Entry') {\n $field->setValue($this->loadEntry($entry->getSpace(), $innerField['sys']['id']), ContentfulEntryFieldType::ENTRY);\n } elseif ($innerField['sys']['linkType'] === 'Asset') {\n $field->setValue($this->loadAsset($entry->getSpace(), $innerField['sys']['id']), ContentfulEntryFieldType::ASSET);\n }\n } elseif (array_is_list($innerField)) {\n $fieldValues = [];\n $fieldType = ContentfulEntryFieldType::ENTRIES;\n\n foreach ($innerField as $subField) {\n if ($subField instanceof Entry) {\n $type = $subField->getType();\n $id = $subField->getId();\n } else {\n $type = $subField['sys']['linkType'];\n $id = $subField['sys']['id'];\n }\n\n if ($type === 'Entry') {\n $fieldValues[] = $this->loadEntry($entry->getSpace(), $id);\n } elseif ($type === 'Asset') {\n $fieldValues[] = $this->loadAsset($entry->getSpace(), $id);\n $fieldType = ContentfulEntryFieldType::ASSETS;\n }\n }\n\n $field->setValue($fieldValues, $fieldType);\n } else {\n $field->setValue($innerField, ContentfulEntryFieldType::JSON);\n }\n } catch (Throwable) {\n // Do nothing\n }\n }", "public function parse($input, $flags = null);", "private function parse_task($task) {\n\n // defaults for things that could be missing\n $date = 0;\n $tags = array();\n // 0 = full match, 1 = done, 2 = text, 3 = action\n $match = array('', '', '', '');\n $date_match = array('', '');\n $tag_matches = array('', '');\n\n $task = trim($task);\n\n // First convert any =interval tags into real tags\n $task = $this->expand_interval_tags($task);\n\n $done = (bool) (strtolower($task[0]) == strtolower($this->term['done_prefix']));\n\n preg_match($this->term['split_task'], $task, $match);\n $action = strlen(trim($match[3]));\n if ($action > MAX_ACTION) {\n $action = MAX_ACTION;\n }\n $text = $match[2];\n\n if (preg_match($this->term['tag_date'], $text, $date_match) == 1) {\n $date = strtotime($date_match[1]);\n //remove the tags!\n $text = trim(preg_replace($this->term['tag_date'], '', $text));\n }\n\n if (preg_match_all($this->term['tag'], $text, $tag_matches) >= 1) {\n $tags = $tag_matches[1];\n //remove the tags\n $text = preg_replace($this->term['tag'], '', $text);\n }\n\n $text = trim($text);\n\n $task = (object) array('type' =>'task', 'text' => $text, 'done' => $done, 'tags' => $tags, 'action' => $action, 'date' => $date, 'raw' => $match[0], $note = '');\n\n return $task;\n }", "public function fromData(array $data): Entry\n {\n $entry = new Entry();\n\n if (isset($data[static::KEY_ID]) && is_int($data[static::KEY_ID])) {\n $entry->setId($data[static::KEY_ID]);\n } else {\n throw new MapperException('Missing key: ' . static::KEY_ID);\n }\n\n if (isset($data[static::KEY_DATETIME_FROM]) && is_string($data[static::KEY_DATETIME_FROM])\n && null !== ($dateTime = $this->createDateTime($data[static::KEY_DATETIME_FROM]))) {\n\n $entry->setDatetimeFrom($dateTime);\n } else {\n throw new MapperException('Missing key: ' . static::KEY_DATETIME_FROM);\n }\n\n if (isset($data[static::KEY_DATETIME_TO]) && is_string($data[static::KEY_DATETIME_TO])\n && null !== ($dateTime = $this->createDateTime($data[static::KEY_DATETIME_TO]))) {\n\n $entry->setDatetimeTo($dateTime);\n } else {\n throw new MapperException('Missing key: ' . static::KEY_DATETIME_TO);\n }\n\n if (isset($data[static::KEY_CONTENT]) && is_string($data[static::KEY_CONTENT])) {\n $entry->setContent($data[static::KEY_CONTENT]);\n }\n\n if (isset($data[static::KEY_ISSUE]) && is_string($data[static::KEY_ISSUE])) {\n $entry->setIssue($data[static::KEY_ISSUE]);\n }\n\n return $entry;\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "function parseVideoEntry($entry) {\n $obj= new stdClass;\n\n // get nodes in media: namespace for media information\n $media = $entry->children('http://search.yahoo.com/mrss/');\n $obj->title = $media->group->title;\n $obj->description = $media->group->description;\n\n // get video player URL\n $attrs = $media->group->player->attributes();\n $obj->watchURL = $attrs['url'];\n\n // get video thumbnail\n $attrs = $media->group->thumbnail[0]->attributes();\n $obj->thumbnailURL = $attrs['url'];\n\n // get <yt:duration> node for video length\n $yt = $media->children('http://gdata.youtube.com/schemas/2007');\n $attrs = $yt->duration->attributes();\n $obj->length = $attrs['seconds'];\n\n // get <yt:stats> node for viewer statistics\n $yt = $entry->children('http://gdata.youtube.com/schemas/2007');\n $attrs = $yt->statistics->attributes();\n $obj->viewCount = $attrs['viewCount'];\n\n // get <gd:rating> node for video ratings\n $gd = $entry->children('http://schemas.google.com/g/2005');\n if ($gd->rating) {\n $attrs = $gd->rating->attributes();\n $obj->rating = $attrs['average'];\n } else {\n $obj->rating = 0;\n }\n\n // get <gd:comments> node for video comments\n $gd = $entry->children('http://schemas.google.com/g/2005');\n if ($gd->comments->feedLink) {\n $attrs = $gd->comments->feedLink->attributes();\n $obj->commentsURL = $attrs['href'];\n $obj->commentsCount = $attrs['countHint'];\n }\n\n //Get the author\n $obj->author = $entry->author->name;\n $obj->authorURL = $entry->author->uri;\n\n // get feed URL for video responses\n $entry->registerXPathNamespace('feed', 'http://www.w3.org/2005/Atom');\n $nodeset = $entry->xpath(\"feed:link[@rel='http://gdata.youtube.com/schemas/\n 2007#video.responses']\");\n if (count($nodeset) > 0) {\n $obj->responsesURL = $nodeset[0]['href'];\n }\n\n // get feed URL for related videos\n $entry->registerXPathNamespace('feed', 'http://www.w3.org/2005/Atom');\n $nodeset = $entry->xpath(\"feed:link[@rel='http://gdata.youtube.com/schemas/\n 2007#video.related']\");\n if (count($nodeset) > 0) {\n $obj->relatedURL = $nodeset[0]['href'];\n }\n\n // return object to caller\n return $obj;\n}", "private function _parse($value)\n\t{\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$value[$k] = $this->_parse($v);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+$/\", $value)) {\n\t\t\treturn (int) $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+\\.[0-9]+$/\", $value)) {\n\t\t\treturn (float) $value;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "public function getEntry();", "public function __construct(EntryFormatter $entryFormatter, $format) {\n $this->entryFormatter = $entryFormatter;\n $this->format = $format;\n }", "protected function parseLine($line) {\n if (!$line) {\n return null;\n }\n\n $format = $this->options['format'];\n\n $fields = array();\n $last_pos = 0;\n foreach ($format as $name => $substr_opt) {\n if ($substr_opt['skip'] === true) {\n $last_pos = $last_pos + $substr_opt['size'];\n continue;\n }\n\n $value = substr($line, $last_pos, $substr_opt['size']);\n $last_pos = $last_pos + $substr_opt['size'];\n\n if ($substr_opt['validate_using_re']) {\n $regexp = $substr_opt['validate_using_re'];\n if (!preg_match($regexp, $value)) {\n $msg = \"Value $value doesn't match regexp $regexp\";\n throw new UnexpectedValueException($msg);\n }\n }\n\n $fields[] = $value;\n }\n\n return $fields;\n }", "public function process_feed( $feed, $entry, $form ) {\n\n $args = array(\n 'message' => $feed['meta']['message'],\n 'toUser' => rgars( $feed, 'meta/toUser' )\n\t\t);\n\n\t\t$args['toUser'] = apply_filters( 'gform_buddy_set_user', $args['toUser'], $entry, $feed['id'] );\n $args['message'] = apply_filters( 'gform_buddy_set_message', $args['message'], $entry, $feed['id'] );\n\n\t\tif( ! class_exists('GFBuddyData') ) {\n\n\t\t\trequire_once( 'includes/class_gf_buddy_data.php' );\n\t\t}\n\n\t\tif ( ! class_exists( 'GFBuddyFunctions' ) ) {\n\n\t\t\trequire_once( 'includes/class_gf_buddy_functions.php' );\n\t\t} \n\n\t\t$args['message'] = GFCommon::replace_variables($args['message'], $form, $entry, false, false, false, 'text');\n\n\t\t$map_id = GFBuddyData::add_new_item($feed['id'], $form['id'], $entry['id'], $args['message']);\n\n\t\t$toUser = rgar($args, 'toUser');\n\n\t\tGFBuddyFunctions::send_notification($toUser, $map_id, $entry);\n\n\t}", "public function parseStackTraceEntry(string $stackTraceEntry) : array;", "protected function parseListing(array $listing) {\n // Append ADDR3 to ADDR2 if not empty.\n if (!empty($listing['ADDR3'])) {\n $listing['ADDR2'] .= ', ' . $listing['ADDR3'];\n }\n // Ensure urls.\n $listing['WEBURL'] = $this->ensureExternalUrl($listing['WEBURL']);\n // Group some fields for component paragraph contact.\n if (!empty($listing['EMAIL']) || !empty($listing['PRIMARYCONTACTFULLNAME']) || !empty($listing['SOCIALMEDIA'])) {\n $urls = [];\n foreach ($listing['SOCIALMEDIA'] as $social) {\n $urls[] = [\n 'uri' => $this->ensureExternalUrl($social['VALUE']),\n 'title' => $social['SERVICE'],\n ];\n }\n $listing['FIELD_CONTACT'] = [\n [\n 'type' => 'contact',\n 'field_name' => $listing['PRIMARYCONTACTFULLNAME'],\n 'field_email' => $listing['EMAIL'],\n 'field_urls' => $urls,\n ],\n ];\n }\n return $listing;\n }", "public static function export_entry($entry)\n {\n }", "public function renderEntry($entry)\n {\n\n $date = $this->view->i18n->timestamp($entry['m_time_created']);\n\n $html = <<<HTML\n <li class=\"entry\" >\n <h3>\n {$entry['user_name']} &lt;{$entry['person_lastname']}, {$entry['person_firstname']}&gt;\n <span class=\"date\">[{$date}]</span>\n </h3>\n <div class=\"thumb\" >\n <img\n src=\"thumb.php?f=core_person-photo-{$entry['person_id']}&amp;s=xxsmall\"\n alt=\"{$entry['user_name']}\"\n style=\"max-width:48px;max-height:48px;\" >\n </div>\n <div class=\"content\" >\n {$entry['log_content']}\n </div>\n <div class=\"do-clear\" ></div>\n </li>\nHTML;\n\n return $html;\n\n }", "private function parse()\r\n\t{\r\n\t\t// Suppress annoying notices/warnings\r\n\t\tset_error_handler(function() { /* Nothing */ }, E_NOTICE|E_WARNING);\r\n\r\n\t\t$structure = mailparse_msg_get_structure($this->resource);\r\n\t\t$this->parts = array();\r\n\t\tforeach ($structure as $part_id) {\r\n\t\t\t$part = mailparse_msg_get_part($this->resource, $part_id);\r\n\t\t\t$this->parts[$part_id] = mailparse_msg_get_part_data($part);\r\n\t\t}\r\n\r\n\t\trestore_error_handler();\r\n\t}", "protected function parseValues()\n {\n\n $this->setValues([]);\n\n $matches = [];\n\n preg_match_all(\"/\\<(.+?)\\>/\", $this->getDomainRegex() . '/' . $this->getRegex(), $matches);\n\n if(!empty($matches[1])){\n foreach($matches[1] as $value){\n $this->values[$value] = null;\n }\n }\n }", "function Parseentries_refer()\r\n {\r\n $this->preamble = $this->strings = $this->entries = array();\r\n $this->currentLine=1;\r\n $this->referString=\"1\";\r\n $this->count=0;\r\n }", "protected function parse() {\n\n\t\t// only perform actions when we have a file\n\t\tif( Storage::exists('postal/data.txt') ) {\n\n\t\t\t// get the contents from storage\n\t\t\t$data = Storage::get('postal/data.txt');\n\n\t\t\t// add a header\n\t\t\t$data = \"Code1\\tPlace1\\tCode2\\tPlace2\\tType\\n\". $data;\n\n\t\t\t// convert to utf-8\n\t\t\t$data = iconv('ISO-8859-1', \"UTF-8\", $data);\n\n\t\t\t// set parser settings\n\t\t\t$this->parser->encoding('UTF-8');\n\t\t\t$this->parser->delimiter = \"\\t\";\n\n\t\t\t// parse the data\n\t\t\t$this->parser->parse( $data );\n\n\t\t\t// get the parsed csv\n\t\t\t$parsed = $this->parser->data;\n\n\t\t\t// empty arrays\n\t\t\t$codes = array();\n\n\t\t\t// loop items\n\t\t\tforeach($parsed as $parse) {\n\t\t\t\t\n\t\t\t\t$codes[] = array( 'code' => $parse['Code1'], 'place' => S::toTitleCase( $parse['Place1'] ) );\n\t\t\t\t$codes[] = array( 'code' => $parse['Code2'], 'place' => S::toTitleCase( $parse['Place2'] ) );\n\t\t\t}\n\n\t\t\t$this->data = $codes;\n\n\t\t}\n\n\t}", "private function fillEntry($entry)\n {\n $date = date('m/d/y', strtotime($entry['date']));\n\n return <<<HTML\n<li class=\"news-entry\">\n <section class=\"news-entry-heading\">\n <a href=\"/article/{$entry['id']}\">\n <h3 class=\"news-entry-title\">{$entry['title']}</h3>\n <p class=\"news-entry-attribution\">{$entry['author']} on {$date}</p>\n </a>\n </section>\n <section class=\"news-entry-body\">{$entry['content']}</section>\n <a class=\"news-entry-full\" href=\"/article/{$entry['id']}\">Read More</a>\n</li>\nHTML;\n }", "abstract public function parse($string);", "public function parseEntries(SimpleXMLElement $tree)\n {\n if (isset($tree->outline)) {\n foreach ($tree->outline as $item) {\n if (isset($item->outline)) {\n $this->parseEntries($item);\n } elseif ((isset($item['text']) || isset($item['title'])) && isset($item['xmlUrl'])) {\n $entry = new StdClass();\n $entry->category = $this->findCategory($tree);\n $entry->title = $this->findTitle($item);\n $entry->feed_url = $this->findFeedUrl($item);\n $entry->site_url = $this->findSiteUrl($item, $entry);\n $entry->type = $this->findType($item);\n $entry->description = $this->findDescription($item, $entry);\n $this->items[] = $entry;\n }\n }\n }\n }", "public function parse($input) {\n\t//--\n\treturn (array) $this->loadWithSource((array)$this->loadFromString((string)$input));\n\t//--\n}", "protected function parseLogLine(string $line, int $logID)\n {\n $lineArray = explode(' ', $line);\n \n $ip = $lineArray[0];\n $dateTimeString = str_replace('[', '', $lineArray[3]);\n $dateTime = DateTime::createFromFormat($this->logDateTimeFormat, $dateTimeString);\n $method = strtoupper(str_replace('\"', '', $lineArray[5]));\n $urlWithLeadingSlash = $method === 'GET' ? explode('?', $lineArray[6])[0] : $lineArray[6];\n\n if($dateTime === false) {\n return 'Unable to parse log entry datetime string';\n }\n\n if(!$this->isMethodValid($method)) {\n return 'Invalid method in request: ' . $line;\n }\n\n $logEntry = [\n 'access_log_id' => $logID,\n 'ip_address' => $ip,\n 'http_method' => $method,\n 'url' => $this->urlWithoutLeadingSlash($urlWithLeadingSlash),\n 'request_datetime' => $dateTime->format($this->targetDateTimeFormat)\n ];\n\n $validator = Validator::make($logEntry, $this->validationRules);\n\n if($validator->fails()) {\n return $validator->errors()->first();\n }\n\n return $logEntry;\n\n }", "public function parse($id){ }", "protected function parseSectionGlobal(array $entry) {\n\t\t$this->config['settings'][trim($entry[0])] = trim($entry[1]);\n\t}", "protected function parse_post_args( array $args ) {\n\t\tif ( isset( $args['page_type'] ) ) {\n\t\t\t$args['entry_type'] = $args['page_type'];\n\n\t\t\tunset( $args['page_type'] );\n\t\t}\n\n\t\t$entry_type = papi_get_entry_type_by_id( $args['entry_type'] );\n\n\t\tif ( $entry_type instanceof Papi_Page_Type ) {\n\t\t\t$args['post_type'] = papi_to_array( $entry_type->post_type );\n\t\t} else {\n\t\t\t$args['post_type'] = isset( $args['post_type'] ) ? $args['post_type'] : '';\n\t\t}\n\n\t\treturn $args;\n\t}", "function parseCmdResult($data) {\n if (trim($data) == '') {\n return;\n }\n $lines = explode(\"\\n\", $data);\n if (!is_array($lines) || count($lines) == 0) {\n return;\n }\n $result = '';\n foreach ($lines as $line) {\n $matched = FALSE;\n foreach ($this->infoRegex as $type => $currentRegex) {\n if (preg_match($currentRegex, $line, $matches)) {\n $matched = TRUE;\n switch ($type) {\n case 'version':\n $result['version'] = $matches[1];\n break;\n case 'config':\n $configOptions = explode('--', $matches[1]);\n foreach ($configOptions as $configOption) {\n if (trim($configOption) != '') {\n $result['config_options'][] = trim($configOption);\n }\n }\n break;\n case 'avutil':\n $result['avutil'] = $matches[1];\n break;\n case 'avcodec':\n $result['avcodec'] = $matches[1];\n break;\n case 'avformat':\n $result['avformat'] = $matches[1];\n break;\n case 'build':\n $result['build']['date'] = $matches[1];\n $result['build']['gcc'] = $matches[2];\n break;\n case 'input':\n $result['input']['id'] = $matches[1];\n $result['input']['format'] = $matches[2];\n $result['input']['file'] = $matches[3];\n break;\n case 'time':\n $result['time']['duration'] = $matches[1];\n $result['time']['start'] = $matches[2];\n $result['time']['bitrate'] = $matches[3];\n break;\n case 'output':\n $result['output'] = $matches[1];\n break;\n case 'stream':\n $streamInfo = explode(', ', $matches[3]);\n $matches[3] = $streamInfo;\n if (isset($result['output'])) {\n $streamType = 'output_streams';\n } else {\n $streamType = 'input_streams';\n }\n $result[$streamType][$matches[1]]['type'] = $matches[2];\n foreach ($streamInfo as $info) {\n if (isset($this->formats[$info])) {\n $result[$streamType][$matches[1]]['format'] = $info;\n } elseif (isset($this->codecs[$info])) {\n $result[$streamType][$matches[1]]['codec'] = $info;\n } elseif (preg_match('~([0-9]+)x([0-9]+)~', $info, $sizeMatches)) {\n $result[$streamType][$matches[1]]['width'] = $sizeMatches[1];\n $result[$streamType][$matches[1]]['height'] = $sizeMatches[2];\n } elseif (substr($info, -6) == 'fps(r)') {\n $result[$streamType][$matches[1]]['framerate'] = substr($info, 0, -7);\n } elseif (substr($info, -6) == 'fps(c)') {\n $result[$streamType][$matches[1]]['framerate'] = substr($info, 0, -7);\n } elseif (substr($info, -4) == 'kb/s') {\n $result[$streamType][$matches[1]]['bitrate'] = substr($info, 0, -5);\n } elseif (substr($info, 0, 2) == 'q=') {\n $result[$streamType][$matches[1]]['q'] = substr($info, 2);\n } elseif (substr($info, -2) == 'Hz') {\n $result[$streamType][$matches[1]]['audiorate'] = substr($info, 0, -3);\n }\n }\n break;\n case 'mapping':\n $result['mapping'][$matches[1]] = $matches[2];\n break;\n case 'progress':\n unset($progress);\n $progress['frame'] = trim($matches[1]);\n $progress['q'] = $matches[2];\n $progress['Lsize'] = trim($matches[3]);\n $progress['time'] = $matches[4];\n $progress['bitrate'] = substr($matches[5], 0, -7);\n $result['progress'][] = $progress;\n break;\n case 'result':\n $result['result']['video'] = $matches[1];\n $result['result']['audio'] = $matches[2];\n $result['result']['headers'] = $matches[3];\n $result['result']['muxing'] = $matches[4];\n break;\n }\n break;\n }\n }\n if (!$matched && trim($line) != '') {\n $unknown[] = $line;\n }\n }\n $result['unknown'] = $unknown;\n return $result;\n }", "protected function init_saved_value( $entry ) {\n\t\tif ( $this->field->type === 'html' ) {\n\t\t\t$this->saved_value = $this->field->description;\n\t\t} elseif ( isset( $entry->metas[ $this->field->id ] ) ) {\n\t\t\t$this->saved_value = $entry->metas[ $this->field->id ];\n\t\t} else {\n\t\t\t$this->saved_value = '';\n\t\t}\n\n\t\t$this->clean_saved_value();\n\t}", "private static function parseValue($val)\n {\n $parsedVal = null;\n\n // Cleanup\n $val = trim($val);\n\n if($val === '')\n {\n throw new Exception('Empty value not allowed');\n }\n\n // Boolean\n if($val == 'true' || $val == 'false')\n {\n $parsedVal = ($val == 'true');\n }\n // Literal multi-line string\n elseif(substr($val, 0, 3) == \"'''\" && substr($val, -3) == \"'''\")\n {\n $parsedVal = substr($val, 3, -3);\n\n // Trim first newline on multi-line string definition\n if($parsedVal[0] == \"\\n\")\n {\n $parsedVal = substr($parsedVal, 1);\n }\n }\n // Literal string\n elseif($val[0] == \"'\" && substr($val, -1) == \"'\")\n {\n // No newlines allowed\n if(strpos($val, \"\\n\") !== false)\n {\n throw new Exception('New lines not allowed on single line string literals.');\n }\n\n $parsedVal = substr($val, 1, -1);\n }\n // Multi-line string\n elseif(substr($val, 0, 3) == '\"\"\"' && substr($val, -3) == '\"\"\"')\n {\n $parsedVal = substr($val, 3, -3);\n\n // Trim first newline on multi-line string definition\n if($parsedVal[0] == \"\\n\")\n {\n $parsedVal = substr($parsedVal, 1);\n }\n\n // Use json_decode to finally parse the string.\n $parsedVal = json_decode('\"' . str_replace(\"\\n\", '\\n', $parsedVal) . '\"');\n }\n // String\n elseif($val[0] == '\"' && substr($val, -1) == '\"')\n {\n // TOML's specification says it's the same as for JSON format... so\n $parsedVal = json_decode($val);\n }\n // Numbers\n elseif(is_numeric(str_replace('_', '', $val)))\n {\n $val = str_replace('_', '', $val);\n\n $intVal = filter_var($val, FILTER_VALIDATE_INT);\n if($intVal !== false)\n {\n $parsedVal = $intVal;\n }\n else\n {\n $parsedVal = (float) $val;\n }\n }\n // Datetime. Parsed to UNIX time value.\n elseif(self::isISODate($val))\n {\n $parsedVal = new DateTime($val);\n }\n // Single line array (normalized)\n elseif($val[0] == '[' && substr($val, -1) == ']')\n {\n $parsedVal = self::parseArray($val);\n }\n // Inline table (normalized)\n elseif($val[0] == '{' && substr($val, -1) == '}')\n {\n $parsedVal = self::parseInlineTable($val);\n }\n else\n {\n throw new Exception('Unknown value type: ' . $val);\n }\n\n return $parsedVal;\n }", "private function handleEntry($entry)\n {\n foreach ($entry['messaging'] as $event) {\n $this->handleEvent($event);\n }\n }", "public function parse()\n {\n // TODO: Implement parse() method.\n }", "function newEntry( $args = null, $entry = null)\n { \n\t\t// default duration of a new activity\n\t\t$duration = (int)($_SESSION[$this->appName]['preferences']['duration']?$_SESSION[$this->appName]['preferences']['duration']:'3600');\n\n \t// no predefined activity time\n if( is_numeric($args['activity_start']) == true )\n {\n\t\t\t// when a user clicks on the visual calendar\n\t\t\t// the format is number of seconds not string date/time\n\t\t \t$entry['activity_start'] = gmdate( 'Y-m-d H:i:s', $args['activity_start']);\n\t $entry['activity_end'] = gmdate( 'Y-m-d H:i:s', (int)$args['activity_start']+$duration);\n\t unset($args['activity_start']);\n\t }\n\t else if( isset($args['activity_start']) == false )\n\t {\n\t \t// when a new activity is created as a related record\n\t\t\t$start = round((int)(strtotime('+0 hour')/60),-1)*60;\n\t $entry['activity_start'] = gmdate( 'Y-m-d H:i', $start);\n\t $entry['activity_end'] = gmdate( 'Y-m-d H:i', $start+$duration);\n\t\t} \n\t\t\n\t\t$entry['type_id'] = $_SESSION[$this->appName]['preferences']['type_id']?$_SESSION[$this->appName]['preferences']['type_id']:'CA';\n\t\t$entry['status_id'] = $_SESSION[$this->appName]['preferences']['status_id']?$_SESSION[$this->appName]['preferences']['status_id']:'SC';\n $entry['priority_id'] = $_SESSION[$this->appName]['preferences']['priority_id']?$_SESSION[$this->appName]['preferences']['priority_id']:'NO'; \n $entry['reminder_email'] = $_SESSION[$this->appName]['preferences']['reminder_email']?$_SESSION[$this->appName]['preferences']['reminder_email']:''; \n $entry['reminder_popup'] = $_SESSION[$this->appName]['preferences']['reminder_popup']?$_SESSION[$this->appName]['preferences']['reminder_popup']:''; \n\t\t$entry['is_allday'] = 'N';\n\n\t\treturn parent::newEntry( $args, $entry);\n }" ]
[ "0.7210516", "0.6658561", "0.6520176", "0.64159524", "0.60859144", "0.5877294", "0.58064485", "0.5788321", "0.5706311", "0.5683844", "0.56123936", "0.56123936", "0.56123936", "0.56123936", "0.5592298", "0.5591425", "0.5587302", "0.5570478", "0.55303407", "0.54738176", "0.54701585", "0.5466957", "0.5466957", "0.5466957", "0.5460323", "0.53751844", "0.5373157", "0.5352571", "0.5349786", "0.53440046", "0.5343861", "0.53174686", "0.5290718", "0.5288349", "0.5267813", "0.52473766", "0.52122736", "0.5160396", "0.51567286", "0.51294017", "0.5101398", "0.50869286", "0.5079135", "0.50695616", "0.50619674", "0.5061457", "0.5029713", "0.4995203", "0.4994778", "0.49906328", "0.49820924", "0.49493998", "0.49447247", "0.49270555", "0.49159652", "0.4895307", "0.4895307", "0.4895307", "0.48700598", "0.4862796", "0.48625958", "0.485997", "0.48587966", "0.48476678", "0.48456395", "0.48439062", "0.48235232", "0.48194575", "0.48093107", "0.48093107", "0.480802", "0.48076996", "0.48007783", "0.47838137", "0.4778365", "0.47780678", "0.47702816", "0.4761591", "0.4757797", "0.47500855", "0.47418565", "0.4731408", "0.47268677", "0.47252846", "0.47232065", "0.47196746", "0.4713743", "0.46947756", "0.4684214", "0.4683136", "0.46748158", "0.46596667", "0.46550065", "0.46475497", "0.464491", "0.4640155", "0.46274954", "0.46221545", "0.46213558", "0.460503" ]
0.5463793
24
Perform the type casting for the values
private function performTypeCasting(Collection\Property\Type $propertyType, &$value): void { // Additional type casting switch ($propertyType->getType()) { case 'coordinates': $value['latitude'] = (float) $value['latitude']; $value['longitude'] = (float) $value['longitude']; break; case 'dateTime': try { $value = new DateTime($value); $value = $value->format(DateTime::ATOM); } catch (Exception $exception) { $value = null; } break; case 'boolean': $value = $value === 'true'; break; case 'number': $value = (float) $value; break; case 'file': $value = array_map(function (string $fileName) { $relativePath = sprintf('/collections/%s/%s', $this->collection->getId(), $fileName); return [ 'file_name' => $fileName, 'file_path' => $relativePath, 'absolute_url' => $this->urlGenerator->generate( 'pronto_mobile_api_file_download', ['path' => ltrim($relativePath, '/')], UrlGeneratorInterface::ABSOLUTE_URL ), ]; }, $value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function cast($value);", "function cast($field, $value) {\n\t\t// if the column doesn't exist, don't cast the value\n\t\tif (!isset($this->columns[$field])) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t// precast arrays\n\t\tif (is_array($value)) {\n\t\t\t$value = $this->columns[$field]->array_to_type(array_values($value));\n\t\t}\n\n\t\t// cast value\n\t\t$value = $this->columns[$field]->type_cast($value);\n\n\t\treturn $value;\n\n\t}", "abstract protected function doActualConvert();", "private function castValue($type, $value)\n {\n switch ($type) {\n case 'number':\n $value = (int) $value;\n break;\n case 'boolean':\n $value = boolval($value);\n break;\n case 'map':\n case 'object':\n $value = json_decode($value);\n break;\n default:\n break;\n }\n\n return $value;\n }", "function cast_query_results($rs)\n{\n $fields = mysqli_fetch_fields($rs);\n $data = array();\n $types = array();\n foreach ($fields as $field) {\n switch ($field->type) {\n case 3:\n $types[$field->name] = 'int';\n break;\n case 4:\n $types[$field->name] = 'float';\n break;\n default:\n $types[$field->name] = 'string';\n break;\n }\n }\n while ($row = mysqli_fetch_assoc($rs)) {\n array_push($data, $row);\n }\n\n for ($i = 0; $i < count($data); $i++) {\n foreach ($types as $orgname => $type) {\n settype($data[$i][$orgname], $type);\n }\n }\n return $data;\n}", "abstract public function convertFromRawValue($value);", "protected abstract function operatorTypes();", "protected function typeCast($value) {\n\t\t# Cast\n\t\treturn (int) $value;\n\t}", "protected function _typecast($value) {\n\t\t$type = null;\t\t\n\n\t\tif (is_string($value)) {\n\t\t\t$type = 'string';\n\t\t}\n\t\tif (is_int($value)) {\n\t\t\t$type = 'int';\n\t\t}\n\t\tif (is_float($value)) {\n\t\t\t$type = 'double';\n\t\t}\n\t\tif (is_bool($value)) {\n\t\t\t$type = 'boolean';\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\t$type = 'array';\n\t\t\t\n\t\t\t$valueKeys = array_keys($value);\n\t\t\tforeach($valueKeys as $vk) {\n\t\t\t\tif (!is_numeric($vk)) {\n\t\t\t\t\t$type = 'struct';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $type;\n\t}", "public function convert();", "function variant_cast($variant, $type) {}", "private static function castToType($value) {\n if ($value == \"true\" || $value == \"1\")\n return true;\n\n if ($value == \"false\" || $value == \"0\")\n return false;\n\n return $value;\n\n }", "private static function doConvertType($value, $type) {\n switch ($type) {\n case 'def' :\n $newValue = self::convertTextContent($value);\n break;\n case 'int' :\n $newValue = (int) $value;\n break;\n case 'array':\n return $value;\n break;\n case 'double' :\n $value = str_replace('.', '', $value);\n $value = str_replace(',', '.', $value);\n $newValue = doubleval($value);\n break;\n case 'currency_format' :\n $newValue = self::currency_format($value);\n break;\n default :\n if (get_magic_quotes_gpc() == 0) {\n $value = addslashes($value);\n }\n $newValue = htmlspecialchars($value);\n break;\n }\n return $newValue;\n }", "protected function typecast($value)\n {\n if ($value === ''\n && !in_array(\n $this->type,\n [\n Schema::TYPE_TEXT,\n Schema::TYPE_STRING,\n Schema::TYPE_BINARY,\n Schema::TYPE_CHAR\n ],\n true)\n ) {\n return null;\n }\n\n if ($value === null\n || gettype($value) === $this->phpType\n || $value instanceof ExpressionInterface\n || $value instanceof Query\n ) {\n return $value;\n }\n\n if (is_array($value)\n && count($value) === 2\n && isset($value[1])\n && in_array($value[1], $this->getPdoParamTypes(), true)\n ) {\n return new PdoValue($value[0], $value[1]);\n }\n\n switch ($this->phpType) {\n case 'resource':\n case 'string':\n if (is_resource($value)) {\n return $value;\n }\n if (is_float($value)) {\n // ensure type cast always has . as decimal separator in all locales\n return str_replace(',', '.', (string) $value);\n }\n return (string) $value;\n case 'integer':\n if (is_bool($value)) {\n return ($value) ? 1 : 0;\n }\n return (int) $value;\n case 'boolean':\n return (boolean) $value;\n case 'double':\n return (double) $value;\n }\n\n return $value;\n }", "public function getCast()\n {\n $result = $this->getType();\n if ($result == \"date\")\n $result = \"string\";\n if ($result == \"datetime\")\n $result = \"string\";\n if ($result == \"enum\")\n $result = \"string\";\n if ($result == \"time\")\n $result = \"string\";\n // BIT, TIMESTAMP, VARBINARY, BLOB\n return \"(\" . $result . \")\";\n }", "abstract public function Convert($data);", "function variant_cast($variant, $type)\n{\n}", "private function _convertType(&$value='', $type='string')\n {\n switch($type){\n case 'string':\n default:\n $this->toString($value);\n break;\n case 'datetime':\n $this->toDateTime($value);\n break;\n case 'int':\n case 'integer':\n $this->toInteger($value);\n break;\n }\n }", "function getTypeConverter() ;", "private static function _casting(array &$row, &$castTable) {\n\n foreach ($castTable as $name => $cast) {\n\n if(isset($row[$name])) {\n\n /*\n * Bring back TYPE if flag is possibly may be NULL\n * -> will transform TYPE back to proper type\n */\n if (($cast & self::T_NULL) !== 0)\n $cast = $cast ^ self::T_NULL;\n\n switch ($cast) {\n\n case static::T_INT :\n $row[$name] = (int)$row[$name];\n break;\n\n case static::T_BOOL:\n $row[$name] = (int)$row[$name] === 1 ? true : false;\n break;\n\n case static::T_FLOAT:\n $row[$name] = (float)$row[$name];\n break;\n\n case static::T_ARRAY:\n $row[$name] = json_decode($row[$name], true);\n break;\n\n default: break;\n\n }\n\n }\n\n }\n\n }", "function _toType($value) {\n\tif (preg_match('/^(\"(.*)\"|\\'(.*)\\')/',$value,$matches)) {\n\t$value = (string)preg_replace('/(\\'\\'|\\\\\\\\\\')/',\"'\",end($matches));\n\t$value = preg_replace('/\\\\\\\\\"/','\"',$value);\n\t} elseif (preg_match('/^\\\\[(.+)\\\\]$/',$value,$matches)) {\n\t\t// Inline Sequence\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$value = array();\n\t\tforeach ($explode as $v) {\n\t\t$value[] = $this->_toType($v);\n\t\t}\n\t} elseif (strpos($value,': ')!==false && !preg_match('/^{(.+)/',$value)) {\n\t\t// It's a map\n\t\t$array = explode(': ',$value);\n\t\t$key = trim($array[0]);\n\t\tarray_shift($array);\n\t\t$value = trim(implode(': ',$array));\n\t\t$value = $this->_toType($value);\n\t\t$value = array($key => $value);\n\t} elseif (preg_match(\"/{(.+)}$/\",$value,$matches)) {\n\t\t// Inline Mapping\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$array = array();\n\t\tforeach ($explode as $v) {\n\t\t$array = $array + $this->_toType($v);\n\t\t}\n\t\t$value = $array;\n\t} elseif (strtolower($value) == 'null' or $value == '' or $value == '~') {\n\t\t$value = NULL;\n\t} elseif (preg_match ('/^[0-9]+$/', $value)) {\n\t// Cheeky change for compartibility with PHP < 4.2.0\n\t\t$value = (int)$value;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('true', 'on', '+', 'yes', 'y'))) {\n\t\t$value = true;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('false', 'off', '-', 'no', 'n'))) {\n\t\t$value = false;\n\t} elseif (is_numeric($value)) {\n\t\t$value = (float)$value;\n\t} else {\n\t\t// Just a normal string, right?\n\t\t$value = trim(preg_replace('/#(.+)$/','',$value));\n\t}\n\n\treturn $value;\n\t}", "public function cast($toType, $value) {\n\t\t$let = new DynamicScope(['*type-hint*' => $toType]);\n\t\treturn call_user_func($this->GetErForType('convert', $toType), $value);\n\t}", "function gvtypeval_to_gvval ($type, $val) {\n\tswitch (strtolower(trim($type))) {\n\t\tcase 'boolean': // a boolean\n\t\t\t$output = $val;\n\t\t\tbreak;\n\t\tcase 'number': // a number\n\t\t\t$output = $val;\n\t\t\tbreak;\n\t\tcase 'date': // a date column - requires the javascript hack\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'timeofday': // a timeofday column - requires the javascript hack\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'datetime': // a datetime column - requires the javascript hack\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'string': // a string column\n\t\t\t$output = $val;\n\t\t\tbreak;\n\t\tdefault: // an unanticipated column type\n\t\t\t$output = $val;\n\t}\n\treturn $output;\n}", "abstract public function getValueType();", "protected function castAttribute($key, $value)\n {\n if (is_null($value)) {\n return $value;\n }\n switch ($this->getCastType($key)) {\n case 'int':\n case 'integer':\n return (int) $value;\n case 'real':\n case 'float':\n case 'double':\n return (float) $value;\n case 'string':\n return (string) $value;\n case 'bool':\n case 'boolean':\n return (bool) $value;\n case 'object':\n return json_decode($value);\n case 'array':\n case 'json':\n return json_decode($value, true);\n default:\n return $value;\n }\n }", "protected function castAttribute($key, $value)\n {\n if (is_null($value))\n return $value;\n\n switch ($this->getCastType($key))\n {\n case 'int':\n case 'integer':\n return (int)$value;\n case 'real':\n case 'float':\n case 'double':\n return (float)$value;\n case 'string':\n return (string)$value;\n case 'bool':\n case 'boolean':\n return (bool)$value;\n case 'object':\n return $this->fromJson($value, true);\n case 'array':\n case 'json':\n return $this->fromJson($value);\n case 'collection':\n return new BaseCollection($this->fromJson($value));\n default:\n return $value;\n }\n }", "protected function castAttribute($key, $value)\n {\n $castType = $this->getCastType($key);\n\n if (is_null($value) && in_array($castType, static::$primitiveCastTypes)) {\n return $value;\n }\n\n switch ($castType) {\n case 'int':\n case 'integer':\n return (int) $value;\n case 'real':\n case 'float':\n case 'double':\n return $this->fromFloat($value);\n case 'decimal':\n return $this->asDecimal($value, explode(':', $this->getCasts()[$key], 2)[1]);\n case 'string':\n return (string) $value;\n case 'bool':\n case 'boolean':\n return (bool) $value;\n case 'object':\n return $this->fromJson($value, true);\n case 'array':\n case 'json':\n return $this->fromJson($value);\n case 'date':\n return $this->asDate($value);\n case 'datetime':\n case 'custom_datetime':\n return $this->asDateTime($value);\n }\n\n return $value;\n }", "protected function _convertValue ($value) {\n switch ($value) {\n case 'null':\n # Null value\n $value = null;\n break;\n\n case 'true':\n # Boolean\n $value = true;\n break;\n\n case 'false':\n # Boolean\n $value = false;\n break;\n\n default:\n if (is_numeric ($value)) {\n\n # Number\n if (preg_match ('/^-?[1-9][0-9]*$/', $value)) {\n\n # Regular 10-base integer\n $value = intval ($value, 10);\n\n } else if (preg_match ('/^-?0[0-7]*$/', $value)) {\n\n # 8-base integer\n $value = intval ($value, 8);\n\n } else if (preg_match ('/^-?0x[0-9a-z]*$/i', $value)) {\n\n # 16-base integer\n $value = intval ($value, 16);\n\n } else {\n\n # Floating point number\n $value = $value + 0;\n\n }\n\n } else {\n\n # String\n /*NOP*/;\n\n }\n }\n return $value;\n }", "protected function castValue($value)\n {\n switch ($value) {\n case 'false':\n return false;\n\n case 'true':\n return true;\n }\n\n if (is_numeric($value)) {\n $value = intval($value);\n }\n\n return $value;\n }", "public function castTyped( // phpcs:ignore\n $value\n ): string;", "protected function castify($value)\n {\n if (preg_match('/^\\-?([0-9]+)$/', $value)) {\n return intval($value);\n }\n\n if (preg_match('/^\\-?\\d+(\\.\\d+)?$/', $value)) {\n // @todo fix json returning float values.\n // return floatval($value);\n\n return $value;\n }\n\n return $value;\n }", "public function cast(string $type)\n {\n switch ($type) {\n case 'int':\n return intval($this->get());\n case 'string':\n return strval($this->get());\n case 'float':\n return floatval($this->get());\n case 'array':\n return $this->castToArray($this->get());\n case 'date':\n return $this->castToDate($this->get());\n default:\n return $this->defaultCast($type, $this->get());\n }\n }", "public function getValueType();", "public function get_cast_for_type($type = '')\n {\n }", "public function get_cast_for_type($type = '')\n {\n }", "static public function typedCast ($hxClass, $value) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:295: characters 3-33\n\t\tif ($value === null) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:295: characters 22-33\n\t\t\treturn null;\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:296: characters 11-31\n\t\t$__hx__switch = ($hxClass->phpClassName);\n\t\tif ($__hx__switch === \"Bool\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:306: lines 306-308\n\t\t\tif (is_bool($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:307: characters 6-18\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t} else if ($__hx__switch === \"Float\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:302: lines 302-304\n\t\t\tif (is_int($value) || is_float($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:303: characters 6-29\n\t\t\t\treturn floatval($value);\n\t\t\t}\n\t\t} else if ($__hx__switch === \"Int\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:298: lines 298-300\n\t\t\tif (is_int($value) || is_float($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:299: characters 6-33\n\t\t\t\treturn intval($value);\n\t\t\t}\n\t\t} else if ($__hx__switch === \"String\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:310: lines 310-312\n\t\t\tif (is_string($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:311: characters 6-18\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t} else if ($__hx__switch === \"php\\\\NativeArray\") {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:314: lines 314-316\n\t\t\tif (is_array($value)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:315: characters 6-18\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t} else {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:318: lines 318-320\n\t\t\tif (is_object($value) && Boot::is($value, $hxClass)) {\n\t\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:319: characters 6-18\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:322: characters 3-8\n\t\tthrow new HxException(\"Cannot cast \" . (\\Std::string($value)??'null') . \" to \" . (Boot::getClassName($hxClass->phpClassName)??'null'));\n\t}", "function convertTo ($type, $value) {\n assert(count(func_get_args()) == 2);\n if ($type == 'bool')\n return toBool($value);\n if ($type == 'float')\n return toFloat($value);\n if ($type == 'int')\n return toInt($value);\n if ($type == 'string')\n return toString($value);\n if (is_a($value, $type))\n return $value;\n throw new RuntimeException('Unable to convert to *' . $type . '*.');\n}", "public function convertToObject(\\SetaPDF_Core_Type_Raw $data) {}", "function o_castInt($value) {\n\t\t\treturn Obj::singleton()->castInt($value);\n\t\t}", "public function _typecastSaveField(Field $f, $value)\n {\n // work only on copied value not real one !!!\n $v = is_object($value) ? clone $value : $value;\n\n switch ($f->type) {\n case 'boolean':\n // if enum is not set, then simply cast value to integer\n if (!isset($f->enum) || !$f->enum) {\n $v = (int) $v;\n break;\n }\n\n // if enum is set, first lets see if it matches one of those precisely\n if ($v === $f->enum[1]) {\n $v = true;\n } elseif ($v === $f->enum[0]) {\n $v = false;\n }\n\n // finally, convert into appropriate value\n $v = $v ? $f->enum[1] : $f->enum[0];\n break;\n case 'date':\n case 'datetime':\n case 'time':\n $dt_class = isset($f->dateTimeClass) ? $f->dateTimeClass : 'DateTime';\n $tz_class = isset($f->dateTimeZoneClass) ? $f->dateTimeZoneClass : 'DateTimeZone';\n\n if ($v instanceof $dt_class) {\n $format = ['date' => 'Y-m-d', 'datetime' => 'Y-m-d H:i:s', 'time' => 'H:i:s'];\n $format = $f->persist_format ?: $format[$f->type];\n\n // datetime only - set to persisting timezone\n if ($f->type == 'datetime' && isset($f->persist_timezone)) {\n $v->setTimezone(new $tz_class($f->persist_timezone));\n }\n $v = $v->format($format);\n }\n break;\n case 'array':\n case 'object':\n // don't encode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonEncode($f, $v);\n break;\n }\n\n return $v;\n }", "public function cast()\n {\n $this->id = (int)$this->id;\n $this->onboarding_percentage = (int)$this->onboarding_percentage;\n $this->count_applications = (int)$this->count_applications;\n $this->count_accepted_applications = (int)$this->count_accepted_applications;\n }", "protected function _castValue ( $value ) {\n\t\t\tswitch ( $this->_settingType ) {\n\t\t\t\tcase self::TYPE_BOOLEAN: return $value == \"true\" ? true : false;\n\t\t\t\tcase self::TYPE_SWITCH: return $value ? \"on\" : \"off\";\n\t\t\t\tcase self::TYPE_INTEGER: return intval ( $value );\n\t\t\t\tcase self::TYPE_STRING: return \"$value\";\n\t\t\t\tdefault: return \"\";\n\t\t\t}\n\t\t}", "public function toMixed();", "public function cast( // phpcs:ignore\n $value\n ): string;", "public static function convertToNativeType($field, $value)\n {\n switch($field[\"type\"])\n {\n case \"number\":\n if(isset($field[\"field_options\"][\"integer_only\"]) && $field[\"field_options\"][\"integer_only\"])\n return intval($value);\n else\n return floatval($value);\n break; // defensive but not necessary\n case \"date\": // @todo: use a format attribute within field options accordig to date_parse_from_format function\n return $value;\n break;\n // @todo: file\n default:\n return $value;\n }\n }", "function pgtypeval_to_gvval ($field_type, $val) {\n\tswitch (strtolower(trim($field_type))) {\n\t\tcase 'bool': // a boolean from a pg database\n\t\t\t// convert to gviz column type of 'boolean'\n\t\t\t$output = $val;\n\t\t\tbreak;\n\t\tcase 'int2': // a small integer from a pg database\n\t\tcase 'int4': // an integer from a pg database\n\t\tcase 'int8': // a long integer from a pg database\n\t\t\t// convert to gviz column type of 'number'\n\t\t\t$output = (integer) $val;\n\t\t\tbreak;\n\t\tcase 'numeric': // a \"numeric\" real number field from a pg database\n\t\tcase 'float4': // a single precision real number field from a pg database\n\t\tcase 'float8': // a double precision real number field from a pg database\n\t\t\t// convert to gviz column type of 'number'\n\t\t\t$output = (float) $val;\n\t\t\tbreak;\n\t\tcase 'date': // a date field from a pg database\n\t\t\t// convert to gviz column type of 'date'\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'time': // a time field from a pg database\n\t\tcase 'timetz': // a time field with timezone from a pg database\n\t\t\t// convert to gviz column type of 'timeofday'\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'timestamp': // a timestamp field from a pg database\n\t\tcase 'timestamptz': // a timestamp field with timezone from a pg database\n\t\t\t// convert to gviz column type of 'datetime'\n\t\t\t$time_stamp = strtotime($val);\n\t\t\t$time_array = getdate($time_stamp);\n\t\t\t$yy = $time_array['year'];\n\t\t\t$mm = $time_array['mon']-1; //why -1? i have no idea...\n\t\t\t$dd = $time_array['mday'];\n\t\t\t$hr = $time_array['hours'];\n\t\t\t$min = $time_array['minutes'];\n\t\t\t$sec = $time_array['seconds'];\n\t\t\t$output = \"new Date($yy,$mm,$dd,$hr,$min,$sec)\";\n\t\t\tbreak;\n\t\tcase 'text': // a text field from a pg database\n\t\tcase 'varchar': // a varchar field from a pg database\n\t\tcase 'bpchar': // a bpchar field from a pg database\n\t\t\t// convert to gviz column type of 'string'\n\t\t\t$output = $val;\n\t\t\tbreak;\n\t\tdefault: // an unanticipated field type, put a text box or single selects, but may not work\n\t\t\t// convert to gviz column type of 'string'\n\t\t\t$output = $val;\n\t}\n\treturn $output;\n}", "function chartjs_array_typecaster($table){\r\n\t$table = chartjs_array_map_recursive('chartjs_typecaster', $table);\r\n\treturn $table;\r\n}", "protected function _cast($type, $value, $column, $schema = [])\n\t{\n\t\t$column += ['formatter' => null, 'format' => null];\n\t\t$schema += ['default' => null, 'null' => false];\n\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif ($formatter = $column['formatter']) {\n\t\t\t$format = $column['format'];\n\t\t\treturn $format ? $formatter($format, $value) : $formatter($value);\n\t\t}\n\t\treturn $this->connection->quote($value);\n\t}", "public function convert($data);", "private function castExplicit($key, $value, $collection) {\r\n switch($collection->model->getDbType($key)) {\r\n case 'integer':\r\n return (integer) $value;\r\n case 'float':\r\n return (float) $value;\r\n /*\r\n * PostgreSQL returns ST_AsGeoJSON(geometry) \r\n */\r\n case 'geometry':\r\n return json_decode($value, true);\r\n case 'array':\r\n return explode(',', substr($value, 1, -1));\r\n default:\r\n return $value;\r\n }\r\n }", "public function castType($value=null)\n {\n if (!is_null($value)) return (float)$value;\n return 0;\n }", "function convertValue( $value, $type = 'string', $options = array() )\n\t{\n\t\tswitch( $type )\n\t\t{\n\t\t\t//\tstring\n\t\t\tcase 'string':\n\t\t\t\tsettype( $value, 'string' );\n\t\t\t\tbreak;\n\n\t\t\t//\tboolean\n\t\t\tcase 'boolean':\n\t\t\tcase 'bool':\n\t\t\t\tif( $value == 'true' || $value == 'yes' || $value == 'on' )\n\t\t\t\t\t$value\t=\ttrue;\n\t\t\t\telse\n\t\t\t\t\t$value\t=\tfalse;\n\t\t\t\tbreak;\n\n\t\t\t//\tinteger\n\t\t\tcase 'integer':\n\t\t\tcase 'int':\n\t\t\t\tsettype( $value, 'integer' );\n\t\t\t\tbreak;\n\n\t\t\t//\tdouble\n\t\t\tcase 'float':\n\t\t\tcase 'double':\n\t\t\t\tsettype( $value, 'double' );\n\t\t\t\tbreak;\n\n\t\t\t//\tarray\n\t\t\tcase 'array':\n\t\t\t\tif( !is_array( $value ) )\n\t\t\t\t{\n\t\t\t\t\tif( trim( $value ) )\n\t\t\t\t\t\t$value\t=\tarray( $value );\n\t\t\t\t\telse\n\t\t\t\t\t\t$value\t=\tarray();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t//\tobject\n\t\t\tcase 'object':\n\t\t\t\tif( class_exists( $options['instanceof'] ) )\n\t\t\t\t\t$class = $options['instanceof'];\n\t\t\t\telse\n\t\t\t\t\t$class = 'stdClass';\n\t\t\t\t\t\n\t\t\t\t$value = &new $class( $value );\n\t\t\t\tbreak;\n\n\t\t}\n\t\treturn\t$value;\n\t}", "function cast($h, $i=0, $s=0, $m=0, $d=0, $y=0)\n\t{\n\t\treturn is_array($h) ?\n\t\t\tarray('h' => intval($h['h']), 'i' => intval($h['i']), 's' => intval($h['s']), 'm' => intval($h['m']), 'd' => intval($h['d']), 'y' => intval($h['y'])) :\n\t\t\tarray('h' => intval($h), 'i' => intval($i), 's' => intval($s), 'm' => intval($m), 'd' => intval($d), 'y' => intval($y));\n\t}", "abstract protected function to_primitive($res);", "public function typeCast($value, bool $isSamplifying = true): string\n {\n if (is_null($value)) {\n return \"(null) null\";\n }\n if (is_bool($value)) {\n return \"(bool) \" . ($value ? \"true\" : \"false\");\n }\n if (is_int($value)) {\n return sprintf(\n \"(int) %d\",\n $value\n );\n }\n if (is_float($value)) {\n return sprintf(\n \"(float) %s\",\n strval($value)\n );\n }\n if (is_string($value)) {\n if ($this->customStringFormatterCollection && $this->customStringFormatterCollection->count()) {\n foreach ($this->customStringFormatterCollection as $stringFormatter) {\n $stringFormatter = $stringFormatter->withIsPrependingType(true);\n $stringFormatter = $stringFormatter->withIsSamplifying($isSamplifying);\n $return = $stringFormatter->format($value);\n if (is_string($return)) {\n return $return;\n }\n }\n }\n $stringFormatter = $this->defaultStringFormatter->withIsPrependingType(true);\n $stringFormatter = $stringFormatter->withIsSamplifying($isSamplifying);\n return $stringFormatter->formatEnsureString($value);\n }\n if (is_object($value)) {\n if ($this->customObjectFormatterCollection && $this->customObjectFormatterCollection->count()) {\n foreach ($this->customObjectFormatterCollection as $objectFormatter) {\n $objectFormatter = $objectFormatter->withIsPrependingType(true);\n $objectFormatter = $objectFormatter->withIsSamplifying($isSamplifying);\n $return = $objectFormatter->format($value);\n if (is_string($return)) {\n return $return;\n }\n }\n }\n $objectFormatter = $this->defaultObjectFormatter->withIsPrependingType(true);\n $objectFormatter = $objectFormatter->withIsSamplifying($isSamplifying);\n return $objectFormatter->formatEnsureString($value);\n }\n if (is_array($value)) {\n if ($this->customArrayFormatterCollection && $this->customArrayFormatterCollection->count()) {\n foreach ($this->customArrayFormatterCollection as $arrayFormatter) {\n $arrayFormatter = $arrayFormatter->withIsPrependingType(true);\n $arrayFormatter = $arrayFormatter->withIsSamplifying($isSamplifying);\n $return = $arrayFormatter->format($value);\n if (is_string($return)) {\n return $return;\n }\n }\n }\n $arrayFormatter = $this->defaultArrayFormatter->withIsPrependingType(true);\n $arrayFormatter = $arrayFormatter->withIsSamplifying($isSamplifying);\n return $arrayFormatter->formatEnsureString($value);\n }\n if (is_resource($value)) {\n if (is_resource($value)) {\n if ($this->customResourceFormatterCollection && $this->customResourceFormatterCollection->count()) {\n foreach ($this->customResourceFormatterCollection as $resourceFormatter) {\n $resourceFormatter = $resourceFormatter->withIsPrependingType(true);\n $resourceFormatter = $resourceFormatter->withIsSamplifying($isSamplifying);\n $return = $resourceFormatter->format($value);\n if (is_string($return)) {\n return $return;\n }\n }\n }\n $resourceFormatter = $this->defaultResourceFormatter->withIsPrependingType(true);\n $resourceFormatter = $resourceFormatter->withIsSamplifying($isSamplifying);\n return $resourceFormatter->formatEnsureString($value);\n }\n }\n return sprintf(\n \"(%s) %s\",\n gettype($value),\n @strval($value)\n );\n }", "private function adjust_field_types() {\n // Adjust int fields.\n $ft = array('id', 'course', 'context', 'file', 'cropx', 'cropy', 'scalex', 'scaley', 'height', 'width', 'rotate');\n foreach ($ft as $f) {\n $this->$f = ($this->$f === null) ? null : (int)$this->$f;\n }\n }", "private function _castFields($recArray, $metas) {\n if(!is_array($recArray)) {\n var_dump($recArray);\n throw new \\Exception(\"DBO_ERROR: Must pass record array\");\n }\n foreach($metas as $meta) {\n $fieldName = $meta->name;\n if(key_exists($fieldName, $recArray)) {\n switch ($meta->type) {\n case 246: //Field is a floating point numeric\n $recArray[$fieldName] = floatval($recArray[$fieldName]);\n break;\n case 253: //Field is a string value\n $recArray[$fieldName] = strval($recArray[$fieldName]);\n break;\n case 3: //Field is an integer\n $recArray[$fieldName] = intval($recArray[$fieldName]);\n break;\n default: //Treat as string by default\n $recArray[$fieldName] = strval($recArray[$fieldName]);\n break;\n }\n }\n }\n return $recArray;\n }", "public function convert($data) {\r\n\t\tif(is_array($data) || is_object($data)) {\r\n\t\t\t$result = array();\r\n\t\t\tforeach ($data as $key => $value) {\r\n\t\t\t\t$result[$key] = $this->__convert($value);\r\n\t\t\t}\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "public static function castType($data, $type) {\n\t\tswitch (\\mb_strtolower(\\mb_substr( (string) $type, 0, 1))) {\n\t\t\t// string\n\t\t\tcase 's':\n\t\t\t\treturn ((string) $data);\n\t\t\t// integer\n\t\t\tcase 'i':\n\t\t\t\treturn ((integer) $data);\n//TODO: php 7 may have support for this?\n\t\t\t// long\n\t\t\tcase 'l':\n\t\t\t\treturn ((integer) $data);\n\t\t\t// float\n\t\t\tcase 'f':\n\t\t\t\treturn ((float) $data);\n\t\t\t// double\n\t\t\tcase 'd':\n\t\t\t\treturn ((double) $data);\n\t\t\t// boolean\n\t\t\tcase 'b':\n\t\t\t\treturn self::toBoolean($data);\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $data;\n\t}", "protected function getValCast()\n {\n if (is_null($this->value)) {\n return null;\n }\n if (mb_strpos($this->value, '.') !== false) {\n $temp = rtrim($this->value, '0');\n return ((mb_substr($temp, -1) == '.') ? (int) $this->value : (float) $this->value);\n }\n return (int) $this->value;\n }", "static function get_value($value, $type) {\n switch ($type) {\n case 'int':\n return (int)$value;\n break;\n case 'string':\n case 'text':\n case 'reference':\n return $value;\n break;\n case 'bool':\n return str_to_bool($value);\n break;\n case 'float':\n case 'double':\n return (float)$value;\n break;\n }\n\n return null;\n }", "protected function dataCast($value = null, string $type = null)\n {\n if (null === $value) {\n \n return $value;\n }\n new \\DateTime();\n switch ($type) {\n case self::CONSTRAINT_TYPE_NUMBER:\n return (float) $value;\n case self::CONSTRAINT_TYPE_STRING:\n return (string) $value;\n case self::CONSTRAINT_TYPE_BOOLEAN:\n return (bool) $value;\n case self::CONSTRAINT_TYPE_ARRAY:\n return is_array($value) ? $value : [$value];\n case self::CONSTRAINT_TYPE_DATE:\n if (is_numeric($value)) {\n $unixDate = ($value - 25569) * 86400;\n $value = gmdate(\"Y-m-d H:i:s\", $unixDate);\n $date = new \\DateTime($value);\n \n return (false !== $date) ? $date : null;\n }\n \n $formats = ['Y-m-d H:i:s.v', 'Y-m-d H:i:s', 'Y-m-d'];\n $loop = true; $date = false;\n foreach ($formats as $format) {\n if (!$loop) {\n break;\n }\n $date = DateTime::createFromFormat($format, $value);\n if (false !== $date) {\n $loop = false;\n }\n }\n \n if (false === $date) {\n $date = new \\DateTime($value);\n }\n \n \n return $date;\n default:\n break;\n }\n \n return $value;\n }", "public static function castFieldValue($value, $type)\n {\n if ($value === null || is_string($value)) {\n return $value;\n }\n\n if ($type === 'dateTime' && $value instanceof DateTime) {\n return (string)$value->getTimestamp();\n }\n\n if ($type === 'integer' && is_int($value)) {\n return sprintf('%011d', $value);\n }\n\n if ($type === 'double' && is_float($value)) {\n // 123.15 => 00000000123.15000, padding to 11 numbers before and padding to 5 behind decimal point\n return sprintf('%017.5f', $value);\n }\n\n if ($type === 'boolean' && is_bool($value)) {\n return $value ? '1' : '0';\n }\n\n if ($type === 'array' && is_array($value)) {\n return array_values($value);\n }\n\n return null;\n }", "function fiftyone_degrees_get_typed_value($property, $profile_value) {\n $value_string = $profile_value['value'];\n switch ($property['value_type_id']) {\n // String and Javascript.\n case 0:\n case 4:\n default:\n return $value_string;\n // Int.\n case 1:\n return (int) $value_string;\n // Double.\n case 2:\n return (double) $value_string;\n // Bool.\n case 3:\n return $value_string === 'True';\n }\n}", "public function convertToUserIntObject() {}", "public function _typecastLoadField(Field $f, $value)\n {\n // LOB fields return resource stream\n if (is_resource($value)) {\n $value = stream_get_contents($value);\n }\n\n // work only on copied value not real one !!!\n $v = is_object($value) ? clone $value : $value;\n\n switch ($f->type) {\n case 'string':\n case 'text':\n // do nothing - it's ok as it is\n break;\n case 'integer':\n $v = (int) $v;\n break;\n case 'float':\n $v = (float) $v;\n break;\n case 'money':\n $v = round($v, 4);\n break;\n case 'boolean':\n if (isset($f->enum) && is_array($f->enum)) {\n if (isset($f->enum[0]) && $v == $f->enum[0]) {\n $v = false;\n } elseif (isset($f->enum[1]) && $v == $f->enum[1]) {\n $v = true;\n } else {\n $v = null;\n }\n } elseif ($v === '') {\n $v = null;\n } else {\n $v = (bool) $v;\n }\n break;\n case 'date':\n case 'datetime':\n case 'time':\n $dt_class = isset($f->dateTimeClass) ? $f->dateTimeClass : 'DateTime';\n $tz_class = isset($f->dateTimeZoneClass) ? $f->dateTimeZoneClass : 'DateTimeZone';\n\n if (is_numeric($v)) {\n $v = new $dt_class('@'.$v);\n } elseif (is_string($v)) {\n // ! symbol in date format is essential here to remove time part of DateTime - don't remove, this is not a bug\n $format = ['date' => '+!Y-m-d', 'datetime' => '+!Y-m-d H:i:s', 'time' => '+!H:i:s'];\n $format = $f->persist_format ?: $format[$f->type];\n\n // datetime only - set from persisting timezone\n if ($f->type == 'datetime' && isset($f->persist_timezone)) {\n $v = $dt_class::createFromFormat($format, $v, new $tz_class($f->persist_timezone));\n if ($v === false) {\n throw new Exception(['Incorrectly formatted datetime', 'format' => $format, 'value' => $value, 'field' => $f]);\n }\n $v->setTimeZone(new $tz_class(date_default_timezone_get()));\n } else {\n $v = $dt_class::createFromFormat($format, $v);\n if ($v === false) {\n throw new Exception(['Incorrectly formatted date/time', 'format' => $format, 'value' => $value, 'field' => $f]);\n }\n }\n\n // need to cast here because DateTime::createFromFormat returns DateTime object not $dt_class\n // this is what Carbon::instance(DateTime $dt) method does for example\n if ($dt_class != 'DateTime') {\n $v = new $dt_class($v->format('Y-m-d H:i:s.u'), $v->getTimeZone());\n }\n }\n break;\n case 'array':\n // don't decode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonDecode($f, $v, true);\n break;\n case 'object':\n // don't decode if we already use some kind of serialization\n $v = $f->serialize ? $v : $this->jsonDecode($f, $v, false);\n break;\n }\n\n return $v;\n }", "function o_castString($value) {\n\t\t\treturn Obj::singleton()->castString($value);\n\t\t}", "function set_value_type(&$table, $value)\n{\n\t$tmp_value = trim($value);\n\tif(isset($table))\n\t\t$table = compare_data_type($table, recognize_data_type($value)); //if there already is set data type compare old and now to get the highest one\n\telse\n\t\t$table = (empty($tmp_value) ? NULL : recognize_data_type($value)); //if value (trimmed) is empty set it to NULL, else data type not set and there is a need to recognize it\n}", "public function dbTypecast($value)\n {\n // to override this with annotation of explicit PDO type.\n return $this->typecast($value);\n }", "public function cast($entity, array $data, array $options = array()) {\n $model = $entity->model();\n foreach ($data as $key => $val) {\n if (!is_array($val)) {\n continue;\n }\n $data[$key] = $this->item($model, $val, array('class' => 'entity'));\n }\n return parent::cast($entity, $data, $options);\n }", "public function castValue($value, $type = null, $length = false)\n {\n return $this->source->castValue($value, $type, $length);\n }", "protected function convertRow(&$row) {\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'int':\n\t\t\t\t\tif (! is_null($row[$name])) {\n\t\t\t\t\t\t$row[$name] = (int) $row[$name];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'real':\n\t\t\t\t\tif (! is_null($row[$name])) {\n\t\t\t\t\t\t$row[$name] = (float) $row[$name];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Currently unsure how to handle \"date\" formats\n\t\t\t\tcase 'datetime':\n\t\t\t\tcase 'timestamp':\n\t\t\t\t\tif (! is_null($row[$name])) {\n\t\t\t\t\t\tif ('0000-00-00 00:00:00' === $row[$name]) {\n\t\t\t\t\t\t\t$row[$name] = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$row[$name] = new DateTime($row[$name]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static function correctType($value)\n {\n try {\n if (Str::isBoolean($value)) {\n $value = Str::toBoolean($value);\n } elseif (is_float($value)) {\n $value = floatval($value);\n } elseif (is_int($value)) {\n $value = intval($value);\n }\n } catch (\\Exception $ex) {\n }\n return $value;\n }", "public function testSpecialDataTypes()\n\t{\n\t\ttestpack( 'Special data types' );\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = 'someday';\n\n\t\tR::store( $bean );\n\n\t\t$cols = R::getColumns( 'bean' );\n\n\t\tasrt( $cols['date'], 'TEXT' );\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = '2011-10-10';\n\n\t\tR::nuke();\n\n\t\t$bean = R::dispense( 'bean' );\n\n\t\t$bean->date = '2011-10-10';\n\n\t\tR::store( $bean );\n\n\t\t$cols = R::getColumns( 'bean' );\n\n\t\tasrt( $cols['date'], 'NUMERIC' );\n\t}", "public static function fromNative()\n {\n $value = func_get_arg(0);\n\n switch (true) {\n case preg_match(self::REGEX_TYPE_VARCHAR, $value, $matchesVarchar):\n $response = Varchar::fromNative($matchesVarchar[1]);\n break;\n\n case preg_match(self::REGEX_TYPE_CHAR, $value, $matchesVarchar):\n $response = Char::fromNative($matchesVarchar[1]);\n break;\n\n case preg_match(self::REGEX_TYPE_TIMESTAMP, $value, $matchesVarchar):\n $response = new Timestamp();\n break;\n\n case preg_match(self::REGEX_TYPE_DATETIME, $value, $matchesVarchar):\n $response = new Datetime();\n break;\n\n case preg_match(self::REGEX_TYPE_DATE, $value, $matchesVarchar):\n $response = new Date();\n break;\n\n case preg_match(self::REGEX_TYPE_TEXT, $value, $matchesVarchar):\n $response = new Text();\n break;\n\n case preg_match(self::REGEX_TYPE_INT_UNSIGNED, $value, $matchesVarchar):\n $response = IntUnsigned::fromNative($matchesVarchar[1]);\n break;\n\n case preg_match(self::REGEX_TYPE_INT_SIGNED, $value, $matchesVarchar):\n $response = IntSigned::fromNative($matchesVarchar[1]);\n break;\n\n case preg_match(self::REGEX_TYPE_DECIMAL, $value, $matchesVarchar):\n $response = Decimal::fromNative((int)$matchesVarchar[1], (int)$matchesVarchar[2]);\n break;\n\n case preg_match(self::REGEX_TYPE_TINYINT_SIGNED, $value, $matchesVarchar):\n $response = TinyIntSigned::fromNative($matchesVarchar[1]);\n break;\n\n case preg_match(self::REGEX_TYPE_ENUM, $value, $matchesVarchar):\n $response = Enum::fromNative($matchesVarchar[1]);\n break;\n\n // @todo Add more cases. http://dev.mysql.com/doc/refman/5.7/en/data-types.html\n\n default:\n $allowedPatterns = array_values(static::getConstants());\n throw new UnexpectedValueException($value, $allowedPatterns);\n break;\n }\n\n return $response;\n }", "public function convertToPHPValue($value);", "function string_to_value($mixed)\n{\n\tif(is_array($mixed)) {\n\t\tforeach($mixed as $key => $val) {\n\t\t\t$mixed[$key] = string_to_value($val);\n\t\t}\n\t}\n\telseif(is_string($mixed))\n\t{\n\t\t$str = rtrim($mixed);\n\t\tif(preg_match('`^null$`i', $str))\t\t\treturn null;\n\t\tif(preg_match('`^true$`i', $str))\t\t\treturn true;\n\t\tif(preg_match('`^false$`i', $str))\t\t\treturn false;\n\t\tif(preg_match('`^\\d+$`', $str))\t\t\t\treturn intval($str);\n\t\tif(preg_match('`^\\d+\\.\\d+$`', $str))\t\treturn floatval($str);\n\t\telse return $str;\n\t}\n\treturn $mixed;\n}", "public function cast($value, bool $isSamplifying = true): string\n {\n if (is_null($value)) {\n return \"null\";\n }\n if (is_bool($value)) {\n return ($value ? \"true\" : \"false\");\n }\n if (is_numeric($value)) {\n return strval($value);\n }\n if (is_string($value)) {\n if ($this->customStringFormatterCollection && $this->customStringFormatterCollection->count()) {\n foreach ($this->customStringFormatterCollection as $stringFormatter) {\n $stringFormatter = $stringFormatter->withIsPrependingType(false);\n $stringFormatter = $stringFormatter->withIsSamplifying($isSamplifying);\n $return = $stringFormatter->format($value);\n if (is_string($return)) {\n return $return;\n }\n }\n }\n $stringFormatter = $this->defaultStringFormatter->withIsPrependingType(false);\n $stringFormatter = $stringFormatter->withIsSamplifying($isSamplifying);\n return $stringFormatter->formatEnsureString($value);\n }\n if (is_object($value)) {\n if ($this->customObjectFormatterCollection && $this->customObjectFormatterCollection->count()) {\n foreach ($this->customObjectFormatterCollection as $objectFormatter) {\n $objectFormatter = $objectFormatter->withIsPrependingType(false);\n $return = $objectFormatter->format($value);\n if (is_string($return)) {\n return $return;\n }\n }\n }\n $objectFormatter = $this->defaultObjectFormatter->withIsPrependingType(false);\n $objectFormatter = $objectFormatter->withIsSamplifying($isSamplifying);\n return $objectFormatter->formatEnsureString($value);\n }\n if (is_array($value)) {\n if ($this->customArrayFormatterCollection && $this->customArrayFormatterCollection->count()) {\n foreach ($this->customArrayFormatterCollection as $arrayFormatter) {\n $arrayFormatter = $arrayFormatter->withIsPrependingType(false);\n $arrayFormatter = $arrayFormatter->withIsSamplifying($isSamplifying);\n $return = $arrayFormatter->format($value);\n if (is_string($return)) {\n return $return;\n }\n }\n }\n $arrayFormatter = $this->defaultArrayFormatter->withIsPrependingType(false);\n $arrayFormatter = $arrayFormatter->withIsSamplifying($isSamplifying);\n return $arrayFormatter->formatEnsureString($value);\n }\n if (is_resource($value)) {\n if ($this->customResourceFormatterCollection && $this->customResourceFormatterCollection->count()) {\n foreach ($this->customResourceFormatterCollection as $resourceFormatter) {\n $resourceFormatter = $resourceFormatter->withIsPrependingType(false);\n $resourceFormatter = $resourceFormatter->withIsSamplifying($isSamplifying);\n $return = $resourceFormatter->format($value);\n if (is_string($return)) {\n return $return;\n }\n }\n }\n $resourceFormatter = $this->defaultResourceFormatter->withIsPrependingType(false);\n $resourceFormatter = $resourceFormatter->withIsSamplifying($isSamplifying);\n return $resourceFormatter->formatEnsureString($value);\n }\n return $this->maskString(@strval($value));\n }", "protected function castValue($cast, $value)\n {\n switch ($cast) {\n case 'integer';\n $value = (integer) $value;\n break;\n case 'boolean';\n $value = in_array($value, array('true', 't', 'yes', 'y'));\n break;\n case 'string':\n default:\n $value = (string) $value;\n }\n\n return $value;\n }", "public function convertType(&$values=false, $type='string')\n {\n if(is_array($values)){\n foreach ($values as $key => $value) {\n $this->_convertType($values[$key], $type);\n }\n return;\n }\n $this->_convertType($values, $type);\n }", "public function getCasts()\n {\n $this->casts = array_merge($this->casts, [$this->getKeyName() => 'string']);\n\n return parent::getCasts();\n }", "private static function castArray($arr)\r\n\t{\r\n\t\t$res = array();\r\n\t\tforeach ($arr as $key=>$val) {\r\n\t\t\tif (is_array($val))\r\n\t\t\t\t$res[$key] = self::castArray($arr);\r\n\t\t\telse\r\n\t\t\t\t$res[$key] = (string)$val;\r\n\t\t}\r\n\t\treturn $res;\r\n\t}", "function _getTypes()\n {\n $types = array(\n 0 => \"null\",\n 1 => \"bool\",\n 2 => \"int\",\n 3 => \"float\",\n 4 => \"varchar\",\n 5 => \"text\",\n 6 => \"blob\"\n );\n $tLeast = $this->table->count() < 2 ? 4 : 0;\n if ($this->GET('override')) {\n $types[1] = \"int\";\n $types[4] = \"text\";\n $types[6] = \"text\";\n }\n foreach ($this->table->fields as $field) {\n $t[$field] = strcasecmp($field, \"id\") ? $tLeast : 2;\n }\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n if (preg_match('/[\\x00-\\x06\\x08\\x0B-\\x0C\\x0E-\\x13\\x16-\\x1F]/', $value))\n $t[$field] = 6;\n elseif (strlen($value) > 255 || strpos($value, \"\\n\"))\n $t[$field] = max($t[$field], 5);\n elseif (! empty($value) && ! is_numeric($value))\n $t[$field] = max($t[$field], 4);\n elseif (! preg_match('/^[+-]?\\d{0,10}$/s', $value))\n $t[$field] = max($t[$field], 3);\n elseif (! preg_match('/^[01]?$/s', $value))\n $t[$field] = max($t[$field], 2);\n elseif (strlen($value))\n $t[$field] = max($t[$field], 1);\n }\n }\n foreach ($this->table->fields as $field) {\n $this->types[$field] = $types[$t[$field]];\n }\n $this->table->reset();\n }", "function o_castFloat($value) {\n\t\t\treturn Obj::singleton()->castFloat($value);\n\t\t}", "public function getDatatype() {}", "private static function _castingByPlan(array &$row, array &$planCastTable) {\n\n $i = 0;\n\n foreach ($row as &$value) {\n\n if($value !== null) {\n\n switch ($planCastTable[$i]) {\n case 5: break;\n case 1: $value = (int) $value; break;\n case 2: $value = (int) $value === 1? true:false; break;\n case 3: $value = (float) $value; break;\n case 4: $value = json_decode($value); break;\n default: break;\n }\n\n }\n\n $i++;\n\n }\n\n }", "private function _parse($value)\n\t{\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$value[$k] = $this->_parse($v);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+$/\", $value)) {\n\t\t\treturn (int) $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+\\.[0-9]+$/\", $value)) {\n\t\t\treturn (float) $value;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "public static function castValues(Array $originalArray)\n {\n // Convert booleans and integers\n foreach ($originalArray as $key => $value) {\n\n // Value casting\n switch (true) {\n\n // Convert booleans\n case $value === 'true':\n $originalArray[$key] = true;\n break 1;\n case $value === 'false':\n $originalArray[$key] = false;\n break 1;\n\n // Convert integers\n case is_numeric($value):\n $originalArray[$key] = (int) $value;\n break 1;\n\n // Convert json\n case is_string($value) && null !== ($jsonToArray = json_decode($value, true)):\n $originalArray[$key] = $jsonToArray;\n break 1;\n }\n }\n\n // Return modfied array\n return $originalArray;\n }", "public function normalizeInVal($val){\n\n switch($this->getType()){\n \n case self::TYPE_INT:\n $val = (int)$val;\n break;\n \n case self::TYPE_STR:\n \n $val = (string)$val;\n break;\n \n case self::TYPE_POINT:\n \n // canary...\n if(empty($val)){\n throw new UnexpectedValueException(sprintf('point must be an array($lat (float),$long (float))'));\n }//if\n \n if(!is_array($val)){\n \n throw new InvalidArgumentException(\n sprintf('point must be an array($lat (float),$long (float)), %s given',gettype($val))\n );\n \n }else{\n \n if(!isset($val[0])){\n \n throw new UnexpectedValueException('no latitude (float) given');\n \n }else{\n \n $val[0] = $this->assureCoordinate($val[0]);\n if(($val[0] >= 90.0) || ($val[0] <= -90.0)){\n throw new UnexpectedValueException(\n sprintf('latitude of coordinate (%s) was not between 90 and -90 degrees',$val[0])\n );\n }//if\n \n }//if/else\n \n if(!isset($val[1])){\n \n throw new UnexpectedValueException('no longitude (float) given');\n \n }else{\n \n $val[1] = $this->assureCoordinate($val[1]);\n if(($val[1] >= 180.0) || ($val[1] <= -180.0)){\n throw new UnexpectedValueException(\n sprintf('longitude of coordinate (%s) was not between 180 and -180 degrees',$val[1])\n );\n }//if\n \n }//if/else\n \n }//if/else\n \n break;\n \n case self::TYPE_LIST:\n case self::TYPE_MAP:\n \n if(!is_array($val)){\n \n throw new UnexpectedValueException(\n sprintf('an array was expected, %s given',is_object($val) ? get_class($val) : gettype($val))\n );\n \n }//if\n break;\n \n case self::TYPE_BOOL:\n \n $val = empty($val) ? 0 : 1;\n break;\n \n case self::TYPE_FLOAT:\n \n $val = (float)$val;\n break;\n \n case self::TYPE_DEFAULT:\n default:\n\n if(is_object($val)){ $val = (string)$val; }//if\n if(is_bool($val)){ $val = empty($val) ? 0 : 1; }//if\n break;\n \n }//switch\n \n return $val;\n \n }", "public function visitTypeCastAstNode( ezcTemplateTypeCastAstNode $node )\n {\n $this->write( \"(\" . $node->type . \")\" );\n\n $node->value->accept( $this );\n }", "abstract function toEntity($value);", "private static function valueFromType($value, $type)\n {\n if ($value === null)\n {\n return null;\n }\n \n switch ($type)\n {\n case 'bool':\n case 'boolean':\n return (bool) $value;\n \n case 'int':\n case 'integer':\n return (int) $value;\n \n case 'lob':\n return stream_get_contents($value);\n \n case 'base64':\n return base64_decode($value);\n \n case 'date':\n case 'time':\n case 'timestamp':\n return strtotime($value);\n \n case 'string':\n case 'istring':\n default:\n return (string) $value;\n }\n }", "abstract public function checkValueType($arg_value);", "protected function castAttribute($key, $value)\n {\n $castTo = $this->getCastObjectType($key);\n\n if (null !== $castTo) {\n return $castTo::fromNative($value);\n }\n\n return parent::castAttribute($key, $value);\n }", "private function convert($val,$how){\r\n // 'enum' fields as array present only in filter and we have to handle them separately\r\n\r\n if(is_array($val) && $this->type!==BitrixORMDataTypes::ENUM){\r\n $arr = array();\r\n foreach($val as $v){\r\n $arr[] = call_user_func(array($this, $how.'_'.$this->type),$v);\r\n }\r\n\r\n return $arr;\r\n }else\r\n return call_user_func(array($this,$how.'_'.$this->type),$val);\r\n\r\n }", "abstract public function convert($param1, $param2);", "private function format_typed_value( &$value ) {\n\t\t$value = array(\n\t\t\t'content' => $value['typed'],\n\t\t\t'typed' => $value['typed'], // for reverse compatibility\n\t\t\t'format' => 'typed',\n\t\t);\n\t}", "protected function castToType($value, $property)\n {\n $type = $this->getPropertyType($property);\n\n switch ($type) {\n case 'array':\n return is_array($value) ? $value : explode(\",\", $value);\n case 'bool':\n case 'boolean':\n return (boolean) $value;\n case 'int':\n case 'integer':\n return (int) $value;\n case 'string':\n return (string) $value;\n default:\n return $value;\n }\n }", "private static function ConvertNodeValueToObject($value)\n\t{\n\t\tif (is_numeric($value)) {\n\t\t\tif (strcmp(strval(intval($value)), $value) === 0) {\n\t\t\t\treturn intval($value);\n\t\t\t} elseif (strcmp(sprintf('%.0f', floatval($value)), $value) === 0) {\n\t\t\t\treturn floatval($value);\n\t\t\t} else {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t} elseif (strtolower($value) == 'true' || strtolower($value) == 'false') {\n\t\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t\t} else {\n\t\t\treturn $value;\n\t\t}\n\t}", "public function cast($value)\n {\n return json_decode($value, true);\n }", "public function getValueModelTransformer();" ]
[ "0.7575215", "0.6780561", "0.6723624", "0.63616055", "0.63534564", "0.63191134", "0.62955993", "0.6251493", "0.62319994", "0.6194792", "0.6183101", "0.61252594", "0.60904026", "0.6079603", "0.6069224", "0.6052419", "0.60181534", "0.6014178", "0.5999609", "0.59546876", "0.5940132", "0.5933175", "0.5900209", "0.5865359", "0.58650935", "0.5839705", "0.5822632", "0.5790635", "0.5777398", "0.57699656", "0.57685137", "0.57663935", "0.57657665", "0.57631445", "0.57631445", "0.575964", "0.575676", "0.5741087", "0.57372946", "0.573283", "0.5728861", "0.5707797", "0.57046944", "0.5701885", "0.5660907", "0.5643038", "0.56335795", "0.562962", "0.5611247", "0.56084025", "0.56062937", "0.56001234", "0.55969673", "0.5596125", "0.55893147", "0.5576553", "0.55587786", "0.5555114", "0.5528561", "0.55164003", "0.5499011", "0.5492788", "0.5471383", "0.54704523", "0.5444865", "0.5442768", "0.5407533", "0.540027", "0.5399648", "0.5386031", "0.53858066", "0.5381817", "0.5374853", "0.5365572", "0.5364105", "0.5331755", "0.53281695", "0.53198344", "0.5319614", "0.53172797", "0.5306844", "0.530465", "0.53030914", "0.52969", "0.529269", "0.5289208", "0.5289141", "0.5270163", "0.5270006", "0.52699983", "0.5266317", "0.5261413", "0.5252155", "0.52458274", "0.5232111", "0.52271116", "0.52167773", "0.52163744", "0.5204143", "0.519984", "0.51954985" ]
0.0
-1
Add the relationships to the entry
private function mapRelationships(array $mappedRelationships, &$entry): void { if (!empty($mappedRelationships)) { /** @var Collection\Relationship $relationship */ foreach ($this->collection->getRelationships() as $relationship) { $identifier = $relationship->getIdentifier(); // The relationship may not be set when it shouldn't be shown in the listview response if (!isset($mappedRelationships[$entry['id']][$identifier])) { continue; } $related = array_values($mappedRelationships[$entry['id']][$identifier]); // Return only one record when it's a one to one relationship if (!$relationship->getType()->hasMany()) { $related = $related[0] ?? null; } $entry[$identifier] = $related; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n }", "public function buildRelations()\n {\n $this->addRelation('ArtRequest', 'ArtRequestORM\\\\ArtRequest', RelationMap::ONE_TO_MANY, array('event_id' => 'event_id', ), 'CASCADE', 'CASCADE', 'ArtRequests');\n }", "public function setRelations() {}", "protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function buildRelations()\n\t{\n\t}", "public function addRelationship(string $name, $relationship);", "private function prepRelations() : self\n {\n\n // Lvd.\n $maxRId = 0;\n $relationships = [];\n\n // Add Sheets.\n foreach ($this->xlsx->getBook()->getSheets() as $sheet) {\n\n $relationships[] = [\n '@Id' => 'rId' . $sheet->getId(),\n '@Type' => $this->types['sheet'],\n '@Target' => 'worksheets/sheet' . $sheet->getId() . '.xml',\n ];\n\n // Count max ID.\n $maxRId = max($maxRId, $sheet->getId());\n }\n\n // Add the rest of relationships.\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['styles'],\n '@Target' => 'styles.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['theme'],\n '@Target' => 'theme/theme1.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['sharedStrings'],\n '@Target' => 'sharedStrings.xml',\n ];\n\n // Save.\n $this->array['Relationships']['@@']['Relationship'] = $relationships;\n\n return $this;\n }", "public function buildRelations()\n {\n $this->addRelation('Moneda', 'Moneda', RelationMap::MANY_TO_ONE, array('moneda_id' => 'id', ), null, null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), null, null);\n $this->addRelation('Negocio', 'Negocio', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'Negocios');\n $this->addRelation('DireccionRequerimiento', 'DireccionRequerimiento', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'DireccionRequerimientos');\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}", "protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }", "public function buildRelations()\n {\n $this->addRelation('Marca', 'Marca', RelationMap::MANY_TO_ONE, array('idmarca' => 'idmarca', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedor', 'Proveedor', RelationMap::MANY_TO_ONE, array('idproveedor' => 'idproveedor', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n\t{\n $this->addRelation('Organisatie', 'Organisatie', RelationMap::MANY_TO_ONE, array('organisatie_id' => 'id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'persoon_id', ), null, null);\n\t}", "public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }", "private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $foreign_model = (is_array($relation)) ? $relation[0] : $relation;\n $foreign_model_name = strtolower($foreign_model);\n $this->load->model($foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n if($option=='has_many_pivot')\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n $foreign_key = (is_array($relation)) ? $relation[1] : $this->{$foreign_model_name}->primary;\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n else\n {\n $foreign_key = (is_array($relation)) ? $relation[1] : singular($this->table) . '_id';\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => $foreign_model_name, 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n ($option == 'has_many_pivot') ? ($this->_relationships[$key]['pivot_table'] = $pivot_table) : FALSE;\n\n }\n }\n }\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('idbanco' => 'idbanco', ), 'CASCADE', 'CASCADE');\n }", "public function push() {\n\t\t$this->save();\n\n\t\t// To sync all of the relationships to the database, we will simply spin through\n\t\t// the relationships, calling the \"push\" method on each of the models in that\n\t\t// given relationship, this should ensure that each model is saved.\n\t\tforeach ($this->relationships as $name => $models) {\n\t\t\tif ( ! is_array($models)) {\n\t\t\t\t$models = array($models);\n\t\t\t}\n\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->push();\n\t\t\t}\n\t\t}\n\t}", "public function buildRelations()\n {\n $this->addRelation('Users', 'Users', RelationMap::ONE_TO_MANY, array('r_user_type_id' => 'r_user_type_id', ), null, null, 'Userss');\n }", "public function buildRelations()\n {\n $this->addRelation('Label', '\\\\MediaProperty\\\\Label', RelationMap::MANY_TO_ONE, array('label_id' => 'id', ), null, null);\n $this->addRelation('Album', '\\\\MediaItem\\\\Album', RelationMap::ONE_TO_MANY, array('id' => 'artist_id', ), null, null, 'Albums');\n }", "public function buildRelations()\n\t{\n $this->addRelation('Genero', 'Genero', RelationMap::MANY_TO_ONE, array('id_genero' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tematica', 'Tematica', RelationMap::MANY_TO_ONE, array('id_tematica' => 'id', ), null, 'CASCADE');\n $this->addRelation('Autor', 'Autor', RelationMap::MANY_TO_ONE, array('id_autor' => 'id', ), null, 'CASCADE');\n $this->addRelation('Materia', 'Materia', RelationMap::MANY_TO_ONE, array('id_materia' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tipopublicacion', 'Tipopublicacion', RelationMap::MANY_TO_ONE, array('id_tipopublicacion' => 'id', ), null, 'CASCADE');\n\t}", "public function uriRelationships();", "public function buildRelations()\n {\n $this->addRelation(\n 'Group',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Group',\n RelationMap::MANY_TO_ONE,\n array('group_id' => 'id',),\n null,\n null\n );\n $this->addRelation(\n 'Batch',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Batch',\n RelationMap::MANY_TO_ONE,\n array('batch_id' => 'id',),\n null,\n null\n );\n }", "protected static function _relations() {\n\n\t}", "public function parseRelationships()\n {\n foreach ($this->relationships as $relationship) {\n if (in_array($relationship->getRelation(), $this::SUBJECTS))\n {\n $root = $this->getRelationship($relationship->getDependentId());\n $root->addDependency($relationship);\n }\n }\n }", "public function isAddToRelationship();", "public static function extraRelationships(){\n // NOTE: you may need to adjust the relation name and the related\n\t\t// class name for the relations automatically generated below.\n\t\t return array(\n 'author' => array(self::BELONGS_TO, 'User', 'object_author'),\n 'language' => array(self::BELONGS_TO, 'Language', 'lang'),\n \n ); \n }", "public function buildRelations()\n {\n $this->addRelation('Biblio', '\\\\Slims\\\\Models\\\\Bibliography\\\\Biblio\\\\Biblio', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':biblio_id',\n 1 => ':biblio_id',\n ),\n), null, null, null, false);\n $this->addRelation('User', '\\\\Slims\\\\Models\\\\System\\\\User\\\\User', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':uid',\n 1 => ':user_id',\n ),\n), null, null, null, false);\n $this->addRelation('Colltype', '\\\\Slims\\\\Models\\\\Masterfile\\\\Colltype\\\\Colltype', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':coll_type_id',\n 1 => ':coll_type_id',\n ),\n), null, null, null, false);\n }", "public function buildRelations()\n {\n $this->addRelation('Contact', 'Contact', RelationMap::MANY_TO_ONE, array('contact_id' => 'id', ), null, null);\n $this->addRelation('State', 'State', RelationMap::MANY_TO_ONE, array('state_id' => 'id', ), null, null);\n $this->addRelation('School', 'School', RelationMap::ONE_TO_MANY, array('id' => 'sponsor_id', ), null, null, 'Schools');\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function buildRelations()\n\t{\n\t\t$this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', null);\n\t\t$this->addRelation('OOBookingType', 'OOBookingType', RelationMap::MANY_TO_ONE, array('oobookingtype_id' => 'id', ), null, null);\n\t\t$this->addRelation('OOEntry', 'OOEntry', RelationMap::ONE_TO_MANY, array('id' => 'oobooking_id', ), 'CASCADE', null, 'OOEntrys');\n\t\t$this->addRelation('OORequest', 'OORequest', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);\n\t}", "public static function workflowRelations();", "public function export_addFilesFromRelations() {}", "public function buildRelations()\n {\n $this->addRelation('Alert', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'Alerts');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('AdsTags', 'AdsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'AdsTagss');\n $this->addRelation('Content', 'Content', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Contents');\n $this->addRelation('Ad', 'Ad', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Ads');\n }", "public function buildRelations()\n {\n $this->addRelation('Website', '\\\\CE\\\\Model\\\\Website', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('WebsiteRouting', '\\\\CE\\\\Model\\\\WebsiteRouting', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_routing_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n }", "public function buildRelations()\n {\n $this->addRelation('Denomination', 'Denomination\\\\Denomination', RelationMap::MANY_TO_ONE, array('denomination_id' => 'id', ), null, null);\n $this->addRelation('ProfessionalCategory', 'ProfessionalCategory\\\\ProfessionalCategory', RelationMap::MANY_TO_ONE, array('professional_category_id' => 'id', ), null, null);\n $this->addRelation('Country', 'Country\\\\Country', RelationMap::MANY_TO_ONE, array('country_of_birth_id' => 'id', ), null, null);\n $this->addRelation('Migration', 'Migration\\\\Migration', RelationMap::ONE_TO_MANY, array('id' => 'person_id', ), null, null, 'Migrations');\n }", "public function buildRelations()\n {\n $this->addRelation('SalesHistory', '\\\\SalesHistory', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':OehhNbr',\n 1 => ':OehhNbr',\n ),\n), null, null, null, false);\n $this->addRelation('SalesHistoryDetail', '\\\\SalesHistoryDetail', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':OehhNbr',\n 1 => ':OehhNbr',\n ),\n 1 =>\n array (\n 0 => ':OedhLine',\n 1 => ':OedhLine',\n ),\n), null, null, null, false);\n $this->addRelation('ItemMasterItem', '\\\\ItemMasterItem', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':InitItemNbr',\n 1 => ':InitItemNbr',\n ),\n), null, null, null, false);\n }", "public function buildRelations()\n {\n $this->addRelation('Country', 'Slashworks\\\\AppBundle\\\\Model\\\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), null, 'CASCADE');\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'SET NULL', 'CASCADE', 'RemoteApps');\n $this->addRelation('UserCustomerRelation', 'Slashworks\\\\AppBundle\\\\Model\\\\UserCustomerRelation', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'CASCADE', 'UserCustomerRelations');\n }", "public function testAddMultipleRelationshipItemsToData()\n {\n $this->document->addToData($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('selfUrl/'), // self url\n [], // links for resource\n null // meta\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('selfUrlWillBeHidden/'),\n [LinkInterface::SELF => new Link('selfUrlWillBeHidden/')], // links for resource\n ['this meta' => 'wont be shown'], // meta when resource is primary\n [], // links for included resource\n false, // show relationships in 'included'\n ['this meta' => 'wont be shown'], // meta when resource within 'included'\n ['some' => 'comment meta'] // meta when resource is in relationship\n ), new stdClass(), true);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [], // links\n null, // relationship meta\n true, // show data\n false // is root\n );\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : {\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : [\n { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} },\n { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} }\n ]\n }\n }\n }\n }\nEOL;\n $this->check($expected);\n }", "public function buildRelations()\n {\n $this->addRelation('Contrarecibo', 'Contrarecibo', RelationMap::MANY_TO_ONE, array('idcontrarecibo' => 'idcontrarecibo', ), 'CASCADE', 'CASCADE');\n }", "public function buildRelations()\n\t{\n $this->addRelation('Provincie', 'Provincie', RelationMap::MANY_TO_ONE, array('provincie_id' => 'id', ), null, null);\n $this->addRelation('OrganisatieType', 'OrganisatieType', RelationMap::MANY_TO_ONE, array('type_id' => 'id', ), null, null);\n $this->addRelation('Persoon', 'Persoon', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Vervolgactie', 'Vervolgactie', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Kans', 'Kans', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n\t}", "public function buildRelations()\n {\n $this->addRelation('RombonganBelajar', 'DataDikdas\\\\Model\\\\RombonganBelajar', RelationMap::MANY_TO_ONE, array('rombongan_belajar_id' => 'rombongan_belajar_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('EkstraKurikuler', 'DataDikdas\\\\Model\\\\EkstraKurikuler', RelationMap::MANY_TO_ONE, array('id_ekskul' => 'id_ekskul', ), 'RESTRICT', 'RESTRICT');\n }", "public function buildRelations()\n\t{\n $this->addRelation('SftOrganismo', 'SftOrganismo', RelationMap::ONE_TO_MANY, array('id' => 'id_pais', ), 'SET NULL', 'CASCADE');\n $this->addRelation('SftPersona', 'SftPersona', RelationMap::ONE_TO_MANY, array('id' => 'id_paisdocidentificacion', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('GenPaisI18n', 'GenPaisI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', 'CASCADE');\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('CuadreCaja', 'CuadreCaja', RelationMap::MANY_TO_ONE, array('id_cuadre_caja' => 'id_cuadre_caja', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdPersona', 'Persona', RelationMap::MANY_TO_ONE, array('id_persona' => 'id_persona', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdAutoriza', 'Persona', RelationMap::MANY_TO_ONE, array('id_autoriza' => 'id_persona', ), 'RESTRICT', null);\n\t}", "abstract protected function addForeignKeys(&$script);", "public function buildRelations()\n\t{\n $this->addRelation('Aviso', 'Aviso', RelationMap::MANY_TO_ONE, array('aviso_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n\t}", "public function buildRelations()\n\t{\n\t\t$this->addRelation('Cargo', 'Cargo', RelationMap::MANY_TO_ONE, array('cargo_id' => 'id', ), null, null);\n\t\t$this->addRelation('Departamento', 'Departamento', RelationMap::MANY_TO_ONE, array('departamento_id' => 'id', ), null, null);\n\t\t$this->addRelation('Endereco', 'Endereco', RelationMap::MANY_TO_ONE, array('endereco_id' => 'id', ), null, null);\n\t\t$this->addRelation('Perfil', 'Perfil', RelationMap::MANY_TO_ONE, array('perfil_id' => 'id', ), null, null);\n\t\t$this->addRelation('Auditoria', 'Auditoria', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Auditorias');\n\t\t$this->addRelation('AvaliacaoRespostaForum', 'AvaliacaoRespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'AvaliacaoRespostaForums');\n\t\t$this->addRelation('ColetaPesquisa', 'ColetaPesquisa', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ColetaPesquisas');\n\t\t$this->addRelation('ComentarioNoticia', 'ComentarioNoticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ComentarioNoticias');\n\t\t$this->addRelation('CurtidaForum', 'CurtidaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'CurtidaForums');\n\t\t$this->addRelation('Noticia', 'Noticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Noticias');\n\t\t$this->addRelation('Pesquisa', 'Pesquisa', RelationMap::ONE_TO_MANY, array('id' => 'criador_id', ), null, null, 'Pesquisas');\n\t\t$this->addRelation('PesquisaHabilitada', 'PesquisaHabilitada', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'PesquisaHabilitadas');\n\t\t$this->addRelation('Premio', 'Premio', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Premios');\n\t\t$this->addRelation('RespostaForum', 'RespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'RespostaForums');\n\t\t$this->addRelation('SolicitacaoResgateRelatedByAprovadorId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'aprovador_id', ), null, null, 'SolicitacaoResgatesRelatedByAprovadorId');\n\t\t$this->addRelation('SolicitacaoResgateRelatedBySolicitanteId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'solicitante_id', ), null, null, 'SolicitacaoResgatesRelatedBySolicitanteId');\n\t}", "public function buildRelations()\n {\n $this->addRelation('Evaluacion', '\\\\Evaluacion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_evaluacion',\n 1 => ':eval_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Objetivo', '\\\\Objetivo', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_objetivo',\n 1 => ':obje_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_pregunta',\n 1 => ':preg_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Seccion', '\\\\Seccion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_seccion',\n 1 => ':secc_codigo',\n ),\n), null, 'CASCADE', null, false);\n }", "public function buildRelations()\n {\n $this->addRelation('Photo', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\Photo', RelationMap::MANY_TO_ONE, array('photo_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('UserRate', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\UserRate', RelationMap::ONE_TO_MANY, array('photo_id' => 'photo_id', ), 'CASCADE', 'CASCADE', 'UserRates');\n $this->addRelation('User', 'wiosloCMS\\\\UserBundle\\\\Model\\\\User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Users');\n }", "protected function saveRelations()\n {\n $spotIdsToRemove = $relationsToAdd = [\n 'photos' => [],\n 'tags' => [],\n 'amenities' => [],\n 'locations' => []\n ];\n // Preparing spots remote photos for insert\n if($this->photos != [])\n {\n foreach($this->photos as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['associated_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['associated_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['photos'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['associated_id']))\n {\n $relationsToAdd['photos'][] = $item;\n }\n }\n }\n }\n // Preparing spots amenities for insert\n if($this->amenities != [])\n {\n foreach($this->amenities as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['amenities'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['amenities'][] = $item;\n }\n }\n }\n }\n // Preparing spots tags for insert\n if($this->tags != [])\n {\n foreach($this->tags as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['tags'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['tags'][] = $item;\n }\n }\n }\n }\n // Preparing spots points for insert\n if($this->locations != [])\n {\n foreach($this->locations as $remote_id => $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['locations'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['locations'][] = $item;\n }\n }\n }\n // Database transaction to remove all old relations of existing spots and add new relations for inserted and updated spots\n DB::transaction(function() use ($spotIdsToRemove, $relationsToAdd) {\n if($spotIdsToRemove['photos'] != [])\n {\n DB::table('remote_photos')->whereIn('associated_id', $spotIdsToRemove['photos'])->where('associated_type', Spot::class)->delete();\n }\n if($spotIdsToRemove['amenities'] != [])\n {\n DB::table('spot_amenities')->whereIn('spot_id', $spotIdsToRemove['amenities'])->delete();\n }\n if($spotIdsToRemove['tags'] != [])\n {\n DB::table('spot_tag')->whereIn('spot_id', $spotIdsToRemove['tags'])->delete();\n }\n if($spotIdsToRemove['locations'] != [])\n {\n DB::table('spot_points')->whereIn('spot_id', $spotIdsToRemove['locations'])->delete();\n }\n if($relationsToAdd['photos'] != [])\n {\n DB::table('remote_photos')->insert($relationsToAdd['photos']);\n }\n if($relationsToAdd['amenities'] != [])\n {\n DB::table('spot_amenities')->insert($relationsToAdd['amenities']);\n }\n if($relationsToAdd['tags'] != [])\n {\n DB::table('spot_tag')->insert($relationsToAdd['tags']);\n }\n if($relationsToAdd['locations'] != [])\n {\n DB::table('spot_points')->insert($relationsToAdd['locations']);\n }\n });\n }", "public function testAddRelationViaObject()\n {\n $resource = new Entry($this->createFakeNode());\n $resource->setEntityType('Foo');\n $resource->addLink('FooSet(123)', 'self');\n\n $entry = new Entry($this->createFakeNode());\n $entry->addRelation($resource);\n\n static::assertEquals(\n '<entry>' .\n '<link type=\"application/atom+xml;type=entry\" ' .\n 'href=\"FooSet(123)\" ' .\n 'rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Foo\" ' .\n 'title=\"Foo\"/>' .\n '</entry>',\n $this->getXML($entry)\n );\n }", "public function buildRelations()\n {\n $this->addRelation('EmailManagerTrace', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerTrace', RelationMap::MANY_TO_ONE, array('trace_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('EmailManagerHistoryEmail', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerHistoryEmail', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', 'RESTRICT', 'EmailManagerHistoryEmails');\n }", "public function __construct()\n {\n $this->relationships = array();\n }", "protected function relationships(): array\n {\n return [];\n }", "protected function addActionsForRelatedEntities()\n {\n if (! $this->mapper) {\n return;\n }\n\n foreach ($this->mapper->getRelations() as $name) {\n $this->mapper->getRelation($name)->addActions($this);\n }\n }", "public function getRelations();", "public function getRelations();", "public function addForeignKeys()\n\t{\n\t\t$table = $this->getTableName();\n\n\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t{\n\t\t\t$otherModel = new $config[1];\n\t\t\t$otherTable = $otherModel->getTableName();\n\t\t\t$fkName = \"{$table}_{$name}_fk\";\n\n\t\t\tif (isset($config['onDelete']))\n\t\t\t{\n\t\t\t\t$onDelete = $config['onDelete'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (empty($config['required']))\n\t\t\t\t{\n\t\t\t\t\t$onDelete = static::SET_NULL;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$onDelete = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tblx()->db->createCommand()->addForeignKey($fkName, $table, $config[2], $otherTable, 'id', $onDelete);\n\t\t}\n\t}", "protected function normalizeRelationsData()\n {\n if (is_null($this->data['relationships'])) {\n $this->data['relationships'] = [];\n }\n\n foreach ([ 'normal', 'reverse', 'image', 'file', 'checkbox', 'category' ] as $key) {\n\n if ( ! array_key_exists($key, $this->data['relationships'])\n || ! is_array($this->data['relationships'][ $key ])\n ) {\n $this->data->relationships[ $key ] = [];\n }\n }\n\n return $this;\n }", "static function add_rels($content,$args = []){\n\n\n }", "public function relationshipsAction()\n\t{\n\t\t$params = $this->getRequest()->getPost();\n\t\tif(!isset($params['uri']) || empty($params['uri'])) {\n\t\t\t$this->_forward('error', 'api', null, array(\n\t\t\t\t'code' => 'RequiredError',\n\t\t\t\t'message' => 'Not all parameters given. This method requires: uri.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$uri = $this->escape($params['uri'], 'uri');\n\t\tif(!($id = $this->loadUri($uri))) {\n\t\t\treturn;\n\t\t}\n\n\t\t$relationships = array();\n\t\tforeach($params as $key => $value) {\n\t\t\tif($key != 'uri' && isset($this->_relationships[$key]))\n\t\t\t\t$relationships[] = $key;\n\t\t}\n\t\t$relationships = array_unique($relationships);\n\n\t\tif(count($relationships) == 0)\n\t\t\t$relationships = array_keys($this->_relationships);\n\n\t\t$query = $this->_queryPrefix .\n\t\t\t'SELECT ?to ?p ?label WHERE {' .\n\t\t\t\t'{ <' . $id . '> ?p ?to . }' .\n\t\t\t\t' UNION ' .\n\t\t\t\t'{ <' . $id . '> owl:sameAs ?sameas . ' .\n\t\t\t\t'?sameas ?p ?to . ' .\n\t\t\t\t'OPTIONAL { ?sameas rdfs:label ?label . } }' .\n\t\t\t\t'FILTER(';\n\n\t\t$first = true;\n\t\tforeach($relationships as $rel) {\n\t\t\tif($first)\n\t\t\t\t$first = false;\n\t\t\telse\n\t\t\t\t$query .= ' || ';\n\t\t\t$query .= ' ?p = <' . $this->_relationships[$rel] . '> ';\n\t\t}\n\t\t$query .= ') }';\n\n\t\t$store = $this->getBrowserStore();\n\t\t$rows = $store->query($query, 'rows');\n\t\tif($errors = $store->getErrors()) {\n\t\t\t$this->forwardTripleStoreError($errors);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$rels = array();\n\t\tforeach($rows as $row) {\n\t\t\tif(isset($rels[$row['to']])) \n\t\t\t\t$rels[$row['to']] .= ',';\n\t\t\telse\n\t\t\t\t$rels[$row['to']] = '';\n\n\t\t\t$rels[$row['to']] .= array_search($row['p'], $this->_relationships);\n\t\t}\n\n\t\t$xml = '<result>';\n\n\t\tforeach($rels as $to => $rel) {\n\t\t\t$profile = $this->getProfile($to, $store);\n\t\t\tif($profile === false)\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t$xml .= '<relationship from=\"' . $id . '\"';\n\t\t\t\n\t\t\tif(isset($row['label']) && !empty($row['label'])) {\n\t\t\t\t$xml .= ' label=\"' . htmlentities($row['label'], ENT_COMPAT, 'UTF-8') . '\"';\n\t\t\t}\n\n\t\t\t$xml .= ' type=\"' . $rel . '\">';\n\t\t\t$xml .= $profile;\n\t\t\t$xml .= '</relationship>';\n\t\t}\n\n\t\t$xml .= '</result>';\n\t\t\t\n\t\t$this->outputXml($xml);\n\t}", "public function buildRelations()\n {\n $this->addRelation('Usuario', 'Usuario', RelationMap::ONE_TO_MANY, array('id' => 'plan_id', ), null, null, 'Usuarios');\n }", "public function linkRelationships() {\n\t\t// Loop through the databases' tables, and use any FK information to build all the relationships.\n\t\t\n\t\t// Build one-to-one and one-to-many relationships\n\t\tforeach ($this->getDatabases() as $dbName => $database) {\n\t\t\tforeach ($database->getTables() as $tableName => $table) {\n\t\t\t\tforeach ($table->getForeignKeys() as $fk) {\n\t\t\t\t\t\n\t\t\t\t\t// Skip this fk if we've already linked it.\n\t\t\t\t\tif ($fk->isLinked()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference database\n\t\t\t\t\tif ($fk->hasRefDatabaseName()) {\n\t\t\t\t\t\t$refDatabase = $table->getSchema()->getDatabase($fk->getRefDatabaseName());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$refDatabase = $table->getDatabase();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference table\n\t\t\t\t\t$refTable = $refDatabase->getTable($fk->getRefTableName());\n\t\t\t\t\t\n\t\t\t\t\tif (is_null($refTable)) {\n\t\t\t\t\t\techo 'ERROR IN DATABASE SCHEMA: FK setup to non-existing table. Take a look at ' . $dbName . '.' . $tableName . \"\\n\";\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference columns\n\t\t\t\t\t$refKey = array();\n\t\t\t\t\tforeach ($fk->getRefKeyName() as $columnName) {\n\t\t\t\t\t\t$refKey[] = $refTable->getColumn($columnName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get reference \"object name\"\n\t\t\t\t\tif ($fk->hasRefObjectName()) {\n\t\t\t\t\t\t$refObjectName = $fk->getRefObjectName();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$refObjectName = $refTable->getTableName();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get local columns\n\t\t\t\t\t$localKey = array();\n\t\t\t\t\tforeach ($fk->getLocalKeyName() as $columnName) {\n\t\t\t\t\t\t$localKey[] = $table->getColumn($columnName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get local \"object name\"\n\t\t\t\t\tif ($fk->hasLocalObjectName()) {\n\t\t\t\t\t\t$localObjectName = $fk->getLocalObjectName();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$localObjectName = $table->getTableName();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If a table has an FK, two things happen:\n\t\t\t\t\t\n\t\t\t\t\t// 1. The local table can pull a \"has one\" relationship to the reference table\n\t\t\t\t\t\n\t\t\t\t\t$hasOne = new SchemaRelationshipHasOne();\n\t\t\t\t\t$hasOne->setRefTable($refTable);\n\t\t\t\t\t$hasOne->setRefObjectName($refObjectName);\n\t\t\t\t\t$hasOne->setRefKey($refKey);\n\t\t\t\t\t$hasOne->setLocalTable($table);\n\t\t\t\t\t$hasOne->setLocalObjectName($localObjectName);\n\t\t\t\t\t$hasOne->setLocalKey($localKey);\n\t\t\t\t\t\n\t\t\t\t\t$table->addHasOneRelationship($hasOne);\n\t\t\t\t\t\n\t\t\t\t\t// 2. The reference table can pull a \"has many\" relationship to the local table\n\t\t\t\t\t\n\t\t\t\t\t$hasMany = new SchemaRelationshipHasMany();\n\t\t\t\t\t$hasMany->setRefTable($table);\n\t\t\t\t\t$hasMany->setRefObjectName($localObjectName);\n\t\t\t\t\t$hasMany->setRefKey($localKey);\n\t\t\t\t\t$hasMany->setLocalTable($refTable);\n\t\t\t\t\t$hasMany->setLocalObjectName($refObjectName);\n\t\t\t\t\t$hasMany->setLocalKey($refKey);\n\t\t\t\t\t\n\t\t\t\t\t$refTable->addHasManyRelationship($hasMany);\n\t\t\t\t\t\n\t\t\t\t\t// Link the has one and has many together\n\t\t\t\t\t$hasOne->setHasManyRelationship($hasMany);\n\t\t\t\t\t$hasMany->setHasOneRelationship($hasOne);\n\t\t\t\t\t\n\t\t\t\t\t// Set the FK as linked so we don't link it up again.\n\t\t\t\t\t$fk->setIsLinked(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function addConstraints()\n {\n if (static::$constraints) {\n /*\n * For belongs to relationships, which are essentially the inverse of has one\n * or has many relationships, we need to actually query on the primary key\n * of the parent model matching on the INCOMING relationship by name.\n *\n * We are trying to achieve a Cypher that goes something like:\n *\n * MATCH (phone:`Phone`), (phone)<-[:PHONE]-(owner:`User`)\n * WHERE id(phone) = 1006\n * RETURN owner;\n *\n * (phone:`Phone`) represents a matching statement where\n * 'phone' is the parent Node's placeholder and '`Phone`' is the parentLabel.\n * All node placeholders must be lowercased letters and will be used\n * throught the query to represent the actual Node.\n *\n * Resulting from:\n * class Phone extends NeoEloquent {\n *\n * public function owner()\n * {\n * return $this->belongsTo('User', 'PHONE');\n * }\n * }\n */\n\n // Get the parent node's placeholder.\n $parentNode = $this->query->getQuery()->modelAsNode($this->parent->nodeLabel());\n // Tell the query that we only need the related model returned.\n $this->query->select($this->relation);\n // Set the parent node's placeholder as the RETURN key.\n $this->query->getQuery()->from = array($parentNode);\n // Build the MATCH ()<-[]-() Cypher clause.\n $this->query->matchOut($this->parent, $this->related, $this->relation, $this->relationType, $this->otherKey, $this->parent->{$this->otherKey});\n // Add WHERE clause over the parent node's matching key = value.\n $this->query->where($this->otherKey, '=', $this->parent->{$this->otherKey});\n }\n }", "abstract function relations();", "public function buildRelations()\n\t{\n $this->addRelation('Track', 'Track', RelationMap::MANY_TO_ONE, array('track_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Featurevectortype', 'Featurevectortype', RelationMap::MANY_TO_ONE, array('featurevectortype_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('File', 'File', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('DistanceRelatedByTrackAId', 'Distance', RelationMap::ONE_TO_MANY, array('track_id' => 'track_a_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('DistanceRelatedByTrackBId', 'Distance', RelationMap::ONE_TO_MANY, array('track_id' => 'track_b_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Distancejob', 'Distancejob', RelationMap::ONE_TO_MANY, array('track_id' => 'track_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Featurevectorsegment', 'Featurevectorsegment', RelationMap::ONE_TO_MANY, array('track_id' => 'track_id', ), 'RESTRICT', 'CASCADE');\n\t}", "function save ()\n {\n parent::_save ( $this->relationships, $this->basepath ) ;\n }", "public function buildRelations()\n {\n $this->addRelation('GsHandelsproducten', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsHandelsproducten', RelationMap::MANY_TO_ONE, array('handelsproduktkode' => 'handelsproduktkode', ), null, null);\n $this->addRelation('GsGeneriekeNamen', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsGeneriekeNamen', RelationMap::MANY_TO_ONE, array('generiekenaamkode' => 'generiekenaamkode', ), null, null);\n $this->addRelation('EenheidHoeveelheidOmschrijving', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsThesauriTotaal', RelationMap::MANY_TO_ONE, array('eenh_hvh_werkzstof_thesaurus_1' => 'thesaurusnummer', 'eenhhoeveelheid_werkzame_stof_kode' => 'thesaurus_itemnummer', ), null, null);\n $this->addRelation('StamtoedieningswegOmschrijving', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsThesauriTotaal', RelationMap::MANY_TO_ONE, array('stamtoedieningsweg_thesaurus_58' => 'thesaurusnummer', 'stamtoedieningsweg_code' => 'thesaurus_itemnummer', ), null, null);\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('AmistadRelatedById_usuario', 'Amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'AmistadsRelatedById_usuario');\n\t\t$this->addRelation('AmistadRelatedByid_usuarioamigo', 'Amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuarioamigo', ), null, null, 'AmistadsRelatedByid_usuarioamigo');\n\t\t$this->addRelation('Calificacion', 'Calificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Calificacions');\n\t\t$this->addRelation('Comentario', 'Comentario', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Comentarios');\n\t\t$this->addRelation('LibroRelatedByUsuario_ult_acc', 'Libro', RelationMap::ONE_TO_MANY, array('id' => 'usuario_ult_acc', ), null, null, 'LibrosRelatedByUsuario_ult_acc');\n\t\t$this->addRelation('LibroRelatedById_usuario', 'Libro', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'LibrosRelatedById_usuario');\n\t\t$this->addRelation('Usuario_intereses', 'Usuario_intereses', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Usuario_interesess');\n\t\t$this->addRelation('Lista', 'Lista', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Listas');\n\t\t$this->addRelation('Libro_colaborador', 'Libro_colaborador', RelationMap::ONE_TO_MANY, array('id' => 'idusuario', ), null, null, 'Libro_colaboradors');\n\t\t$this->addRelation('Libro_version', 'Libro_version', RelationMap::ONE_TO_MANY, array('id' => 'idusuario', ), null, null, 'Libro_versions');\n\t\t$this->addRelation('MensajeRelatedById_usuario_destinatario', 'Mensaje', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_destinatario', ), null, null, 'MensajesRelatedById_usuario_destinatario');\n\t\t$this->addRelation('MensajeRelatedById_usuario_remitente', 'Mensaje', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_remitente', ), null, null, 'MensajesRelatedById_usuario_remitente');\n\t\t$this->addRelation('NotificacionRelatedById_emisor', 'Notificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_emisor', ), null, null, 'NotificacionsRelatedById_emisor');\n\t\t$this->addRelation('NotificacionRelatedById_receptor', 'Notificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_receptor', ), null, null, 'NotificacionsRelatedById_receptor');\n\t\t$this->addRelation('Solicitud_amistadRelatedById_usuario_solicitado', 'Solicitud_amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitado', ), null, null, 'Solicitud_amistadsRelatedById_usuario_solicitado');\n\t\t$this->addRelation('Solicitud_amistadRelatedById_usuario_solicitante', 'Solicitud_amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitante', ), null, null, 'Solicitud_amistadsRelatedById_usuario_solicitante');\n\t\t$this->addRelation('Solicitud', 'Solicitud', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitante', ), null, null, 'Solicituds');\n\t\t$this->addRelation('Postulantes', 'Postulantes', RelationMap::ONE_TO_MANY, array('id' => 'id_postulante', ), null, null, 'Postulantess');\n\t}", "public function buildRelations()\n\t{\n $this->addRelation('Tbnecesespecial', 'Tbnecesespecial', RelationMap::MANY_TO_ONE, array('id_neces_especial' => 'id_neces_especial', ), null, null);\n $this->addRelation('Tbcidade', 'Tbcidade', RelationMap::MANY_TO_ONE, array('naturalidade' => 'id_cidade', ), null, null);\n $this->addRelation('Tbpais', 'Tbpais', RelationMap::MANY_TO_ONE, array('nacionalidade' => 'id_pais', ), null, null);\n $this->addRelation('TblogradouroRelatedByCep', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep' => 'cep', ), null, null);\n $this->addRelation('Tbcursoversao', 'Tbcursoversao', RelationMap::MANY_TO_ONE, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbtipoingresso', 'Tbtipoingresso', RelationMap::MANY_TO_ONE, array('id_tipo_ingresso' => 'id_tipo_ingresso', ), null, null);\n $this->addRelation('Tbalunosituacao', 'Tbalunosituacao', RelationMap::MANY_TO_ONE, array('id_situacao' => 'id_situacao', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdDestino', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_destino' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById2grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_2grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById3grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_3grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdTrabalho', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_trabalho' => 'id_inst_externa', ), null, null);\n $this->addRelation('TblogradouroRelatedByCepTrabalho', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep_trabalho' => 'cep', ), null, null);\n $this->addRelation('Tbpolos', 'Tbpolos', RelationMap::MANY_TO_ONE, array('id_polo' => 'id_polo', ), null, null);\n $this->addRelation('Tbalunoracacor', 'Tbalunoracacor', RelationMap::MANY_TO_ONE, array('id_raca' => 'id_raca', ), null, null);\n $this->addRelation('Tbpendencia', 'Tbpendencia', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunodiploma', 'Tbalunodiploma', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosenha', 'Tbalunosenha', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosolicitacao', 'Tbalunosolicitacao', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbbanca', 'Tbbanca', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbfila', 'Tbfila', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbhistorico', 'Tbhistorico', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('TbturmaAluno', 'TbturmaAluno', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n\t}", "public function defineRelations()\n\t{\n\t\treturn array();\n\t}", "public function buildRelations()\n {\n $this->addRelation('CastleType', 'CastleType', RelationMap::MANY_TO_ONE, array('castle_type_id' => 'id', ), null, null);\n $this->addRelation('CastleLocation', 'CastleLocation', RelationMap::MANY_TO_ONE, array('castle_location_id' => 'id', ), null, null);\n $this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), null, null);\n $this->addRelation('Attack2castle', 'Attack2castle', RelationMap::ONE_TO_MANY, array('id' => 'castle_id', ), null, null, 'Attack2castles');\n $this->addRelation('TargetActions', 'TargetActions', RelationMap::ONE_TO_MANY, array('id' => 'castle_id', ), null, null, 'TargetActionss');\n $this->addRelation('Attack', 'Attack', RelationMap::MANY_TO_MANY, array(), null, null, 'Attacks');\n }", "public function createLinksFromRelations(Metadata $operation);", "public function buildRelations()\n {\n $this->addRelation('Skill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':skill_id',\n 1 => ':id',\n ),\n), 'CASCADE', null, null, false);\n $this->addRelation('Reference', '\\\\gossi\\\\trixionary\\\\model\\\\Reference', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':reference_id',\n 1 => ':id',\n ),\n), null, null, null, false);\n $this->addRelation('FeaturedSkill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':video_id',\n 1 => ':id',\n ),\n), 'SET NULL', null, 'FeaturedSkills', false);\n $this->addRelation('FeaturedTutorialSkill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':tutorial_id',\n 1 => ':id',\n ),\n), 'SET NULL', null, 'FeaturedTutorialSkills', false);\n }", "public function setupAssociations() \n {\n \n }", "public function buildRelations()\n {\n $this->addRelation('Attribute', '\\\\Thelia\\\\Model\\\\Attribute', RelationMap::MANY_TO_ONE, array('attribute_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Feature', '\\\\Thelia\\\\Model\\\\Feature', RelationMap::MANY_TO_ONE, array('feature_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('ChoiceFilterOther', '\\\\ChoiceFilter\\\\Model\\\\ChoiceFilterOther', RelationMap::MANY_TO_ONE, array('other_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Category', '\\\\Thelia\\\\Model\\\\Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Template', '\\\\Thelia\\\\Model\\\\Template', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', 'RESTRICT');\n }", "public function addOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->linkModelWithOwner($attributeName, $this->owner->{$attributeName});\n }\n }", "public function getRelationships(): ?array;", "public function entries() {\n return $this->hasMany('App\\Entry');\n }", "function add ($relationship)\n {\n parent::add ( $relationship ) ;\n $this->addFieldsToUndeployedLayouts ( $relationship ) ; // must come after parent::add as we need the relationship_name in the relationships getFieldsToLayouts() which is called by addFieldsToUndeployedLayouts() \n }", "public function buildRelations()\n {\n $this->addRelation('GsArtikelen', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsArtikelen', RelationMap::MANY_TO_ONE, array('zinummer' => 'zinummer', ), null, null);\n $this->addRelation('GsArtikelEigenschappen', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsArtikelEigenschappen', RelationMap::MANY_TO_ONE, array('zinummer' => 'zindex_nummer', ), null, null);\n $this->addRelation('RzvVerstrekkingOmschrijving', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsThesauriTotaal', RelationMap::MANY_TO_ONE, array('thesaurus_rzv_verstrekking' => 'thesaurusnummer', 'rzvverstrekking' => 'thesaurus_itemnummer', ), null, null);\n $this->addRelation('RzvHulpmiddelenOmschrijving', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsThesauriTotaal', RelationMap::MANY_TO_ONE, array('thesaurus_rzv_hulpmiddelen' => 'thesaurusnummer', 'hulpmiddelen_zorg' => 'thesaurus_itemnummer', ), null, null);\n $this->addRelation('RzvVoorwaardenOmschrijving', 'PharmaIntelligence\\\\GstandaardBundle\\\\Model\\\\GsThesauriTotaal', RelationMap::MANY_TO_ONE, array('rzv_thesaurus_120' => 'thesaurusnummer', 'rzvvoorwaarden_bijlage_2' => 'thesaurus_itemnummer', ), null, null);\n }", "public function buildRelations()\n\t{\n $this->addRelation('BatchJob', 'BatchJob', RelationMap::MANY_TO_ONE, array('batch_job_id' => 'id', ), null, null);\n $this->addRelation('BatchJob', 'BatchJob', RelationMap::ONE_TO_MANY, array('id' => 'batch_job_lock_id', ), null, null);\n\t}", "function setup(){\n if(!class_exists('Relationship')){\n\n }\n\n $rel = new Relationship();\n if(!empty($this->vardef['relationship'])){\n \t$rel->retrieve_by_name($this->vardef['relationship']);\n }\n if($rel->relationship_type == 'many-to-many'){\n if($rel->lhs_module == $this->module_dir){\n $this->related_module = $rel->rhs_module;\n $module_dir = $rel->lhs_module;\n }else {\n if($rel->rhs_module == $this->module_dir){\n $this->related_module = $rel->lhs_module;\n $module_dir = $rel->rhs_module;\n }else{\n die(\"this field has no relationships mapped with this module\");\n }\n }\n if($module_dir != $this->module_dir){\n die('These modules do not match : '. $this->module_dir . ' and ' . $module_dir);\n }\n if(isset($GLOBALS['beanList'][$this->module_dir])){\n $class = $GLOBALS['beanList'][$this->module_dir];\n if(file_exists($GLOBALS['beanFiles'][$class])){\n $this->bean = loadBean($this->module_dir);\n $this->bean->retrieve($_REQUEST['bean_id']);\n if($this->bean->load_relationship($this->vardef['name'])){\n $this->check_id();\n $this->retrieve_values();\n }else{\n die('failed to load the relationship');\n }\n }else{\n die('class file do not exist');\n }\n }else{\n die($this->module_dir . ' is not in the beanList.');\n }\n }\n else{\n die(\"the relationship is not a many-to-many\");\n }\n }", "public function buildRelations()\n {\n $this->addRelation('Attendance', '\\\\lwops\\\\lwops\\\\Attendance', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Attendances', false);\n $this->addRelation('Casualemployeepayslip', '\\\\lwops\\\\lwops\\\\Casualemployeepayslip', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Casualemployeepayslips', false);\n $this->addRelation('Employeeloan', '\\\\lwops\\\\lwops\\\\Employeeloan', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeloans', false);\n $this->addRelation('Employeeotherdeduction', '\\\\lwops\\\\lwops\\\\Employeeotherdeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeotherdeductions', false);\n $this->addRelation('Employeepurchases', '\\\\lwops\\\\lwops\\\\Employeepurchases', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeepurchasess', false);\n $this->addRelation('Employeerole', '\\\\lwops\\\\lwops\\\\Employeerole', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeroles', false);\n $this->addRelation('Employeesalaryexpenseallocation', '\\\\lwops\\\\lwops\\\\Employeesalaryexpenseallocation', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeesalaryexpenseallocations', false);\n $this->addRelation('Employeetermination', '\\\\lwops\\\\lwops\\\\Employeetermination', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeterminations', false);\n $this->addRelation('Fteemployeepayslip', '\\\\lwops\\\\lwops\\\\Fteemployeepayslip', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Fteemployeepayslips', false);\n $this->addRelation('Ftesalaryadvance', '\\\\lwops\\\\lwops\\\\Ftesalaryadvance', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Ftesalaryadvances', false);\n $this->addRelation('Medicaldeduction', '\\\\lwops\\\\lwops\\\\Medicaldeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Medicaldeductions', false);\n $this->addRelation('Nssfdeduction', '\\\\lwops\\\\lwops\\\\Nssfdeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Nssfdeductions', false);\n $this->addRelation('Parttimedetail', '\\\\lwops\\\\lwops\\\\Parttimedetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Parttimedetails', false);\n $this->addRelation('Salary', '\\\\lwops\\\\lwops\\\\Salary', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Salaries', false);\n }", "private function parseEntry(array &$entry, array $mappedRelationships): void\n {\n // Remove the data object, because we only needed it to perform a HAVING search on it\n unset($entry['data']);\n\n foreach ($entry as $key => &$value) {\n // Only properties inside the data object are in the types array, not the ID for example\n if (!isset($this->properties[$key])) {\n continue;\n }\n\n /** @var Collection\\Property $property */\n $property = $this->properties[$key];\n $type = $property->getType();\n\n // JSON encoding collection property types\n if ($property->isTranslatable() || in_array($type->getType(), self::JSON, true)) {\n $value = json_decode($value, true);\n }\n\n // Cast the values to the correct format\n $this->performTypeCasting($type, $value);\n }\n\n // Prevent any problems with looped $value variable\n unset($value);\n\n // Parse the dates as ISO strings\n foreach (self::DATES as $date) {\n $dateTime = $entry[$date] instanceof DateTime ? $entry[$date] : new DateTime($entry[$date]);\n\n $entry[$date] = $dateTime->format(DateTime::ATOM);\n }\n\n // Update the user id's to become user objects\n foreach (self::USER_PROPERTIES as $id) {\n // Create a key without _id suffix\n $key = str_replace('_id', '', $id);\n\n // Create the new property with user object\n $entry[$key] = $this->users[$entry[$id]] ?? null;\n\n // No need to perform more actions when the user is NULL\n if ($entry[$key] !== null) {\n // Parse the users' dates\n foreach (self::DATES as $date) {\n /** @var DateTime $dateTime */\n $dateTime = $entry[$key][$date];\n\n $entry[$key][$date] = $dateTime !== null ? $dateTime->format(DateTime::ATOM) : null;\n }\n }\n\n // Unset the old value\n unset($entry[$id]);\n }\n\n // Insert the relationships\n $this->mapRelationships($mappedRelationships, $entry);\n }" ]
[ "0.6514652", "0.6438462", "0.6438462", "0.6438462", "0.6438462", "0.6438462", "0.6438462", "0.6438462", "0.6438462", "0.6438462", "0.63514525", "0.63383263", "0.6338283", "0.633686", "0.633686", "0.633686", "0.633686", "0.633686", "0.633686", "0.633686", "0.633686", "0.63035804", "0.6285647", "0.62369525", "0.62196434", "0.6210254", "0.620893", "0.6188182", "0.61256444", "0.61160433", "0.6108658", "0.6086696", "0.6075525", "0.60623026", "0.60605687", "0.6052593", "0.60484797", "0.60236037", "0.6012624", "0.59626186", "0.59584713", "0.5957356", "0.5954808", "0.59506005", "0.59506005", "0.59424263", "0.592866", "0.5923875", "0.59125215", "0.59083235", "0.5904063", "0.58790916", "0.58672756", "0.58666843", "0.58629775", "0.58397204", "0.5822984", "0.58203703", "0.5810866", "0.57829696", "0.5764437", "0.57262266", "0.57163686", "0.5706704", "0.57024044", "0.5697191", "0.56964153", "0.56648785", "0.5654776", "0.5648467", "0.56342566", "0.56342566", "0.560944", "0.5593475", "0.559144", "0.5587926", "0.5578202", "0.5557217", "0.5543489", "0.5535229", "0.5510624", "0.5508462", "0.55078423", "0.55058527", "0.55020475", "0.5469869", "0.54543614", "0.54130185", "0.54068553", "0.5399675", "0.5394646", "0.53718066", "0.5368927", "0.5366737", "0.5363738", "0.53609383", "0.53579533", "0.53577906", "0.5357238", "0.5332426" ]
0.56859565
67
Get newsfeed item as HTML
public static function get(Model_NewsfeedItem $item) { $text = ''; switch ($item->type) { case self::TYPE_COMMENT: $entry = Model_Blog_Entry::factory($item->data['entry_id']); if ($entry->loaded()) { $text = __('commented to blog<br />:blog', array( ':blog' => HTML::anchor( Route::model($entry), '<i class="icon-book icon-white"></i> ' . HTML::chars($entry->name), array('title' => $entry->name) ) )); } break; case self::TYPE_ENTRY: $entry = Model_Blog_Entry::factory($item->data['entry_id']); if ($entry->loaded()) { $text = __('wrote a new blog entry<br />:blog', array( ':blog' => HTML::anchor( Route::model($entry), '<i class="icon-book icon-white"></i> ' . HTML::chars($entry->name), array('title' => $entry->name) ) )); } break; } return $text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function frontpage_news_rss($url) {\n $obj = simplexml_load_file($url);\n\n // If an RSS feed:\n if(!empty($obj->channel)) {\n $description = \"description\";\n $pubDate = \"pubDate\";\n $collect = $obj->channel->item;\n // Else an Atom feed\n } else {\n $description = \"content\";\n $pubDate = \"published\";\n $collect = $obj->entry;\n }\n\n foreach($collect as $item) {\n $news .= \"<div style='border:1px solid #CCC;margin:4px;padding:4px;-moz-border-radius-topright:12px;border-radius-topright:12px;'>\n <a href='\".$item->link.\"'>\".$item->title.\"</a><br />\n <span style='font-size:10px;'>\".date(\"h:i A M jS\",strtotime($item->$pubDate)).\"</span>\n <p>\".$item->$description.\"</p></div>\";\n }\n\n return $news;\n}", "public function getNewsFeed()\n\t{\n\t\treturn \"\";\n\t}", "function getFeed($feed_url) {\n\t\n\t$content = file_get_contents($feed_url);\n\t\n\t$x = new SimpleXmlElement($content);\n\t\n\techo \"<ul>\";\n\t\n\tforeach($x->channel->item as $entry) {\n\t\techo \"\n\t\t<li>\n\t\t <a href='$entry->link' title='$entry->title'>\" . $entry->title . \"</a>\n\t\t</li>\";\n\t\t}\n\techo \"</ul>\";\n}", "function fww_news_rss( $rssUrlNews, $id ) {\n // Do we have this information in our transients already?\n $transient_news = get_transient( 'tna_rss_news_transient' . $id );\n // Yep! Just return it and we're done.\n if( ! empty( $transient_news ) ) {\n echo $transient_news ;\n // Nope! We gotta make a call.\n } else {\n // Get feed source.\n $content = file_get_contents( $rssUrlNews );\n if ( $content !== false ) {\n $x = new SimpleXmlElement( $content );\n $n = 0;\n // Loop through each feed item and display each item\n foreach ( $x->channel->item as $item ) :\n if ( $n == 1 ) {\n break;\n }\n $enclosure = $item->enclosure['url'];\n $pubDate = $item->pubDate;\n $pubDate = date( \"l d M Y\", strtotime( $pubDate ) );\n $img = str_replace( home_url(), '', get_stylesheet_directory_uri() ) . '/img/thumb-news.jpg';\n $link = str_replace( 'livelb', 'www', $item->link );\n $html = '<div class=\"col-sm-6\"><div class=\"card clearfix\">';\n if ( $enclosure ) {\n $html .= '<a href=\"' . $link . '\" title=\"' . $item->title . '\">';\n $html .= '<div class=\"entry-thumbnail\" style=\"background: url(' . $enclosure . ') no-repeat center center;background-size: cover;\">';\n // $html .= '<img src=\"' . $enclosure . '\" class=\"img-responsive\" alt=\"' . $item->title . '\">';\n $html .= '</div></a>';\n }\n if ( !$enclosure ) {\n $html .= '<a href=\"' . $link . '\" title=\"' . $item->title . '\">';\n $html .= '<div class=\"entry-thumbnail\" style=\"background: url(' . $img . ') no-repeat center center;background-size: cover;\">';\n // $html .= '<img src=\"' . $img . '\" class=\"img-responsive\" alt=\"' . $item->title . '\">';\n $html .= '</div></a>';\n }\n $html .= '<div class=\"entry-content\"><small>News</small><h2><a href=\"' . $link . '\">';\n $html .= $item->title;\n $html .= '</a></h2>';\n $html .= '<small>' . $pubDate . '</small>';\n preg_match( \"/<p>(.*)<\\/p>/\", $item->description, $matches );\n $intro = strip_tags($matches[1]);\n $html .= '<p>' . first_sentence( $intro ) . '</p><ul class=\"child\"><li><a href=\"http://www.nationalarchives.gov.uk/about/news/?news-tag=first-world-war&news-view=child\" title=\"Read more news\">More news</a></li></ul></div>';\n $html .= '</div></div>';\n $n ++;\n endforeach;\n set_transient( 'tna_rss_news_transient' . $id, $html, HOUR_IN_SECONDS );\n echo $html;\n }\n else {\n echo '<div class=\"col-md-6\"><div class=\"card\"><div class=\"entry-content\"><h2>First World War news</h2><ul class=\"child\"><li><a href=\"http://www.nationalarchives.gov.uk/about/news/?news-tag=first-world-war&news-view=child\">Join us on our news page</a></li></ul></div></div></div>';\n }\n }\n}", "function article_html() {\n return parse(Registry::prop('article', 'html'), false);\n}", "public function createHTML () {\r\n\t\t\r\n\t\t//Declare STD Object $res\r\n\t\t$res = $this->blogstate->blogStatement();\r\n\r\n\t\t$blogPost = \"\";\r\n\r\n\t\t//Adding news items contained in $res variable.\r\n\t\tforeach($res AS $key => $val) {\r\n\t\t\t$catLink = \"\";\r\n\t\t\t$categoryAnchors = explode(\",\",($val->category));\r\n\t\t\t\r\n\t\t\tforeach($categoryAnchors as $catVal) {\r\n\t\t\t\t$catLink .= \"<a href='\". $this->db->getQueryString(array('genre' => $catVal)) .\"'>$catVal</a> &nbsp;\";\r\n\t\t\t}\r\n\r\n\t\t\t//Calling the function handleString to handle the $val-data variable with the chosen filters.\r\n \t\t\t$blogPost .= \"\r\n \t\t\t\t<div class='one-blog-post'>\r\n \t\t\t\t\t<h2><a href='newsitem.php?slug=\". $val->slug .\"'>{$val->title}</a></h2>\r\n \t\t\t\t\t<p>{$this->handleString($val->DATA, $val->slug, $val->FILTER)}</p>\r\n\r\n \t\t\t\t\t<div class='container-fluid'>\r\n \t\t\t\t\t\t<p class='pull-right'>Kategori: \". $catLink .\" &nbsp; Publicerad: {$val->published}</p>\r\n \t\t\t\t\t</div>\r\n \t\t\t\t</div>\";\r\n\t\t}\r\n\r\n\t\t//Adding HTML markup to $out.\r\n\t\t$out = \"\r\n\t\t\t\t<div class='container-fluid text-center show-all-movies'>\r\n\t\t\t\t\tNyheter\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<div class='blog-posts'> \t\r\n\t\t\t\t\t{$blogPost}\r\n\t\t\t\t</div>\r\n\t\t\";\r\n\t\treturn $out;\r\n\t}", "public function get_item() {\r\n\t\t\t//get feed content\r\n\t\t\t$content = $this->get_content();\r\n\r\n\t\t\t//content the same as description?\r\n\t\t\tif( $content == $this->get_description() ):\r\n\t\t\t\t$content = false;\r\n\t\t\tendif;\r\n\r\n\t\t\t//content links itself?\r\n\t\t\t$html = new simple_html_dom();\r\n\t\t\t$html->load( $content );\r\n\t\t\tforeach( $html->find( 'a' ) as $link )\r\n\t\t\t\tif( $link->src == $this->get_permalink() or is_numeric( strpos( $this->get_permalink(), $link->src ) ) )\r\n\t\t\t\t\t$content = false;\r\n\r\n\t\t\t//return mod feed article\r\n\t\t\treturn new mod_feed_article( $this->get_permalink(), $content );\r\n\t\t}", "public function __toString()\n {\n ob_start();\n\n $link = '<a href=\"'. $this->_url .'\" rel=\"nofollow\">%s</a>';\n\n ?>\n\n <li>\n <header>\n <h3><?php printf( $link, $this->_title ); ?></h3>\n <div class=\"meta\"><strong><?php _e( 'Date posted', 'feed-scraper' ); ?></strong>: <time><?php echo $this->_pubDate->format( 'd/m/Y' ); ?></time></div>\n </header>\n <p><?php echo $this->_excerpt; ?></p>\n <footer>\n <?php printf( $link, __( 'Read more', 'feed-scraper' ) .' &raquo;' ); ?>\n </footer>\n </li>\n\n <?php\n\n return ob_get_clean();\n }", "function PageSummaries_rssToHtml($rss) {\n\t$rss=str_replace('<'.'?xml version=\"1.0\" ?'.'><rss version=\"2.0\">', '', $rss);\n\t$rss=preg_replace('/<channel.*?\\/description>/', '', $rss);\n\t$rss=preg_replace('/<pubDate>.*?<\\/pubDate>/', '', $rss);\n\t$rss=str_replace(\n\t\tarray('<title>', '</title>', '&#8364;'),\n\t\tarray('<h3>', '</h3>', '&euro;'),\n\t\t$rss\n\t);\n\t$rss=str_replace('<description>', '<p>', $rss);\n\t$rss=str_replace('</description>', '</p>', $rss);\n\t$rss=str_replace('<item>', '<div class=\"page_summary_item\">', $rss);\n\t$rss=str_replace('</item>', '</div>', $rss);\n\t$rss=str_replace('<link>', '<a href=\"', $rss);\n\t$rss=str_replace('</link>', '\">'.__('[more...]').'</a>', $rss);\n\t$rss=str_replace(array('</rss>', '</channel>'), array('', ''), $rss);\n\treturn $rss==''?'<em>'.__('No articles contained here.').'</em>':$rss;\n}", "function actionRssitem() {\n $bodytag = str_replace(\"centro_sinmarco\", \"img-responsive\", $_POST['description']) ;\n $body = str_replace('frameborder=\"0\"', 'frameborder=\"0\" class=\"embed-responsive-item\"', $bodytag) ;\n $model = [\n 'titleNews' => $_POST['titleNews'],\n 'description' => $body,\n 'title' => $_POST['title'],\n 'pubDate' => $_POST['pubDate'],\n 'link' => $_POST['link'],\n ] ;\n return $this->render('rssitem', [\n 'model' => $model\n ]) ;\n }", "public function work() {\n\t\t$feedContent = $this->renderHead();\n\t\t$feedContent .=$this->renderChannels();\n\t\t$feedContent .=$this->renderItems();\n\t\t$feedContent .=$this->renderBottom();\n\t\treturn $feedContent;\n\t}", "public function createIndexHTML() {\r\n\t\t//Declare $res variable from blogStatement\r\n\t\t$res = $this->blogstate->blogStatement();\r\n\r\n\t\t$HTML = \"\";\r\n\t\t//Adding the news items.\r\n\t\tforeach($res AS $key => $val) {\r\n\t\t\t$HTML .= \r\n\t\t\t\t\"<div class='col-md-4'>\r\n\t\t\t\t\t<h2><a href='newsitem.php?slug=\". $val->slug .\"'>{$val->title}</a></h2>\r\n \t\t\t\t\t<p>{$this->handleString($val->DATA, $val->slug, $val->FILTER)}</p>\r\n \t\t\t\t</div>\r\n\t\t\t\t\";\r\n\t\t}\r\n\t\treturn $HTML;\r\n\t}", "private function renderItems() {\n\t\t$items = '';\n\t\tif ($this->feedElements['items']) {\n\t\t\tforeach ($this->feedElements['items'] as $item)\n\t\t\t\t$items .= $item->getNode();\n\t\t}\n\t\treturn $items;\n\t}", "public function getRssCall() {\n $settings = $this->getContainerSettings();\n $content = '[[!getArchives?\n &pageVarKey=`page`\n &parents=`'.$this->get('id').'`\n &where=`{\"class_key\":\"Article\",\"searchable\":1}`\n &limit=`'.$this->xpdo->getOption('rssItems',$settings,10).'`\n &showHidden=`1`\n &includeContent=`1`\n &includeTVs=`1`\n &processTVs=`1`\n &sortby=`'.$this->xpdo->getOption('sortBy',$settings,'publishedon').'`\n &sortdir=`'.$this->xpdo->getOption('sortDir',$settings,'DESC').'`\n\n &tagKey=`articlestags`\n &tagSearchType=`contains`\n &makeArchive=`0`\n &cache=`0`\n &tpl=`'.$this->xpdo->getOption('tplRssItem',$settings,'sample.ArticlesRssItem').'`\n ]]';\n $content = $this->xpdo->getChunk($this->xpdo->getOption('tplRssFeed',$settings,'sample.ArticlesRss'),array(\n 'content' => $content,\n 'year' => date('Y'),\n ));\n return $content;\n }", "function get_news(){\n\t\tif($result = $this->db->query('SELECT * FROM news WHERE id<>1 ORDER BY add_date DESC LIMIT 50')){\n\t\t\t$return = '';\n\t\t\twhile($r = $result->fetch_object()){\n\t\t\t\t$return .= '<p>id: '.$r->id.' | '.htmlspecialchars($r->title).'</p>';\n\t\t\t\t$return .= '<hr/>';\n\t\t\t}\n\t\t\treturn $return;\n\t\t}\n\t}", "function frontpage_news_manual(&$db) {\n $newsq = $db->Execute(\"SELECT * FROM `frontpage_news`\");\n if($newsq->numrows()==0) return \"No news to show.\";\n\n while($item = $newsq->fetchrow()) {\n $news .= \"<div style='border:1px solid #CCC;margin:4px;padding:4px;-moz-border-radius-topright:12px;border-radius-topright:12px;'>\n <a>\".$item['title'].\"</a><br />\n <span style='font-size:10px;'>\".date(\"h:i A M jS\",$item['time']).\"</span>\n <p>\".$item['body'].\"</p></div>\";\n }\n return $news;\n}", "public function render()\n {\n $feed = NokIt::orderBy(\"id\",\"DESC\")->select('*')->where([\"id\" => $this->id])->first();\n return view('components.nok-it.single-feed', compact('feed'));\n }", "public function getRss()\n {\n global $module, $lang;\n \n $this->getModuleLanguage('rss');\n $rssVersion2 = $this->getRssUri('2.0');\n return '<p><a href=\"' . $rssVersion2 . '\" class=\"rss\" title=\"' \n . $lang['rss_2_of_this_page'] . '\">RSS</a></p>' . \"\\n\";\n }", "function outputNews() {\r\n\t\tglobal $currentNewsItems, $newsCount, $fourWeeksAgo, $json;\r\n\t\tfor ($i = 0; $i < $currentNewsItems; $i++) {\r\n\t\t\tif (strtotime($json->data[$i]->releaseDate) >= $fourWeeksAgo) {\r\n\t\t\t\t$newsCount = $newsCount + 1;\r\n\t\t\t\techo '{';\r\n\t\t\t\techo '\"uid\": \"', $json->data[$i]->id, '\",';\r\n\t\t\t\techo '\"updateDate\": \"', gmdate(\"Y-m-d\\TH:i:s\\Z\", strtotime($json->data[$i]->releaseDate)), '\",';\r\n\t\t\t\techo '\"titleText\": ', json_encode($json->data[$i]->title), ',';\r\n\t\t\t\tif ($json->data[$i]->url != '') {\r\n\t\t\t\t\techo '\"mainText\": ', json_encode($json->data[$i]->abstract), ',';\r\n\t\t\t\t\techo '\"redirectionUrl\": \"', $json->data[$i]->url, '\"';\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo '\"mainText\": ', json_encode($json->data[$i]->abstract);\r\n\t\t\t\t}\r\n\t\t\t\tif ($currentNewsItems > $newsCount) {\r\n\t\t\t\t\techo '},';\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo '}';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function toHtml()\n {\n $iterator = new \\ArrayIterator((array)$this);\n\n echo \"<div style=\\\"padding-left: 16px\\\">\";\n\n $itemLink = '';\n\n while ($iterator->valid()) {\n $value = $iterator->current();\n $key = $iterator->key();\n\n if (strpos($key, 'link') !== false) {\n $itemLink = $value;\n }\n\n echo \\MIMAS\\Service\\Jorum\\Formatters\\Html::get($key, $value, $itemLink);\n\n $iterator->next();\n }\n echo \"</div>\";\n }", "public function getRss(){\n\n\t\t$pathern = \"D, d M Y H:i:s\";\n\t\t$dataAtual = date($pathern);\n\t\t\n\t\t$writer = new Writer();\n\t\t$writer->writeln(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\");\n\t\t$writer->writeln(\"<rss version=\\\"2.0\\\">\");\n\t\t$writer->writeln(\"\");\n\t\t$writer->writeln(\"<channel>\");\n\t\t$writer->writeln(\" <title>\".$this->title.\"</title>\");\n\t\t$writer->writeln(\" <link>\".$this->link.\"</link>\");\n\t\t$writer->writeln(\" <description>\".$this->description.\"</description>\");\n\t\t$writer->writeln(\" <language>pt-BR</language>\");\n\t\t$writer->writeln(\" <pubDate>\".$dataAtual.\" -0300</pubDate>\");\n\n\t\tforeach($this->itensArray as $item){\t\t\t\t\n\t\t\t$writer->writeln($item);\t\t\t\t\n\t\t}\n\t\t\n\t\t$writer->writeln(\"</channel>\");\n\t\t$writer->writeln(\"</rss>\");\n\n\t\treturn $writer->getString();\n\t}", "public function rss() {\n\t $rss = new RSSFeed($this->Children(), $this->Link(), \"The coolest news around\");\n\t //interesting as you can now add news/rss and get a new rss page, without actually creating the page..\n\t return $rss->outputToBrowser();\n\t}", "abstract public function getHtml();", "function akrabat_simple_rss($options = array()) \n{\n $defaults = array(\n 'url' => '', \n 'number_of_items' => 5,\n 'display_date' => true,\n 'date_format' => 'd M Y at H:i', \n 'display_summary' => true,\n 'number_of_summary_chars' => 100,\n 'link_on_title' => true,\n 'link_on_date' => false,\n 'separate_link' => false,\n 'separate_link_text' => 'view', \n 'css_class' => 'akrabat-simple-rss',\n );\n \n extract (array_merge($defaults, $options));\n \n $output = '';\n if (!empty($url)) {\n include_once(ABSPATH . WPINC . '/rss.php');\n $messages = fetch_rss($url);\n if(count($messages->items) == 0){\n return '';\n }\n \n if($number_of_items > count($messages->items)) {\n $number_of_items = count($messages->items);\n }\n \n $output = '<ul class=\"'.$css_class.'\">';\n for($i = 0; $i < $number_of_items; $i++){\n $message = $messages->items[$i];\n \n $link = $message['link'];\n $title = $message['title'];\n $date = null;\n $date = !$date && isset($message['published']) ? $message['published'] : $date;\n $date = !$date && isset($message['pubdate']) ? $message['pubdate'] : $date;\n $summary = null;\n $summary = !$summary && isset($message['summary']) ? $message['summary'] : $summary;\n $summary = !$summary && isset($message['description']) ? $message['description'] : $summary;\n \n $output .= \"<li>\";\n $title_string = htmlspecialchars($title_string);\n if ($link_on_title) {\n $output .= '<a href=\"'.$link.'\">'.$title_string.'</a>';\n }\n $output .= '<div class=\"akrabat-rss-title\">'.$title_string.'</a></div>';\n \n if ($date && $display_date) {\n $dateString = date($date_format, strtotime($date));\n if ($link_on_date) {\n $dateString = '<a href=\"'.$link.'\">'.$dateString.'</a>';\n }\n $output .= '<div class=\"date\">'.$dateString.'</div>';\n }\n if ($summary && $display_summary) {\n $summary_string = substr($summary, 0, $number_of_summary_chars);\n if (count(summary) > $number_of_summary_chars) {\n $summary_string = substr(summary_string, 0, -3) . '...';\n }\n $summary_string = htmlspecialchars($summary_string);\n $output .= '<div class=\"akrabat-rss-summary\">'.$summary_string.'</div>';\n }\n if ($separate_link) {\n $output .= '<div class=\"akrabat-rss-link\"><a href=\"'.$link.'\">'.$separate_link_text.'</a></div>';\n }\n $output .= \"</li>\";\n }\n $output .= \"</ul>\";\n }\n \n return $output;\n}", "public function getHtml();", "function ShowNewsFromURL()\n{\n\t$str0=\"select value1 from options where name='newsfromurl'\";\n\t$result0=mysql_query($str0) or die(mysql_error());\n\t$row0=mysql_fetch_array($result0);\n\tif ($row0['value1']==1)\n\t{ \n\n\t\techo(\"<tr><td bgcolor='\");\n\t\techo(background());\n\t\techo(\"' class='leftmenumainitem' width='216'\");\n\t\techo(\"valign='top'><img src='image/point.jpg' />&nbsp;&nbsp;\");\n\t\techo(getPara('newsfromurl','value2'));\n\t\techo(\"</td>\");\n\t\techo(\"</tr><tr><td height='176'>\");\n\t\techo(\"<marquee height='170' onmouseover=this.stop() onmouseout=this.start() \");\n\t\techo(\"scrollamount='1' scrolldelay='80' truespeed='true' direction=up>\");\n\t\techo(\"<div class='topnews'>\");\n\t\t\n\t\t$content = file_get_contents(getPara('newsfromurl','value3'));\n\t\t$x = new SimpleXmlElement($content);\n\t\t$s=\"\";\n\t\tforeach($x->channel->item as $entry) \n\t\t{\n\t\t\t$s.=\"<a target='_blank' href='\".$entry->link.\"'>\" . $entry->title . \"</a><br><br>\";\n\t\t}\n\n\t\techo($s);\n\t\techo(\"</div></marquee></td></tr>\");\n \t}\n\tmysql_free_result($result0);\n}", "public function rss_box()\n {\n include_once(ABSPATH . WPINC . '/feed.php');\n\n $num_items = $this->get_settings('rss_feed_number_of_item');\n $introduction = $this->get_settings('rss_introduction');\n $show_post_content = $this->get_settings('show_post_content');\n $url = $this->get_settings('rss_feed_address');\n\n if ($introduction) {\n echo '<p>' . $introduction . '</p>';\n }\n\n $rss = fetch_feed($url);\n\n if ($error = is_wp_error($rss)) {\n echo '<div class=\"warning-text\">' . $rss->get_error_message() . '</div>';\n\n wlcms_set_css(\n '.index-php .warning-text',\n array('color' => 'rgba(240, 116, 95, 0.808)', 'display' => 'block')\n );\n return;\n }\n\n $maxitems = $rss->get_item_quantity($num_items);\n $rss_items = $rss->get_items(0, $maxitems);\n\n if ($maxitems == 0) {\n echo 'No items.';\n return;\n }\n\n $rss_list = '<ul>';\n\n foreach ($rss_items as $item) :\n\n $rss_list .= sprintf(\n '<li><strong><a href=\"%s\" title=\"Posted %s target=\"_blank\">%s</a> </strong> <br />',\n esc_url($item->get_permalink()),\n $item->get_date('j F Y | g:i a'),\n esc_html($item->get_title())\n );\n\n if ($show_post_content) :\n $rss_list .= preg_replace('/<img[^>]+./', '', $item->get_content());\n\n endif;\n $rss_list .= '</li>';\n\n endforeach;\n\n $rss_list .= '</ul>';\n\n echo $rss_list;\n }", "public function wmel_news_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 3,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'post',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'news-wmel'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "function newsstats_parse_feed( $url ) {\n\n $body = netrics_request_data( $url );\n $articles = array();\n $items = array( 'Error: failed newsstats_parse_feed()' );\n\n if ( $body ) {\n $items = newsstats_get_string_between( $body, '<item>', '</item>' );\n\n if ( $items ) {\n\n foreach ($items as $key => $item) {\n $articles[$key]['title'] = newsstats_get_string_between( $item, '<title>', '</title>' );\n $articles[$key]['url'] = newsstats_get_string_between( $item, '<link>', '</link>' );\n if ( 3 > $key ) {\n break;\n }\n\n }\n\n }\n\n }\n\n return $items;\n\n}", "protected abstract function formatFeed(string $content): NewsReaderItemList;", "function fww_rss( $rssUrl, $id ) {\n // Do we have this information in our transients already?\n $transient = get_transient( 'tna_rss_blog_transient' . $id );\n // Yep! Just return it and we're done.\n if( ! empty( $transient ) ) {\n echo $transient ;\n // Nope! We gotta make a call.\n } else {\n // Get feed source.\n $content = file_get_contents( $rssUrl );\n if ( $content !== false ) {\n $x = new SimpleXmlElement( $content );\n $n = 0;\n // Loop through each feed item and display each item\n foreach ( $x->channel->item as $item ) :\n if ( $n == 1 ) {\n break;\n }\n $enclosure = $item->enclosure['url'];\n $namespaces = $item->getNameSpaces( true );\n $dc = $item->children( $namespaces['dc'] );\n $pubDate = $item->pubDate;\n $pubDate = date( \"l d M Y\", strtotime( $pubDate ) );\n $html = '<div class=\"col-sm-6\"><div class=\"card clearfix\">';\n if ( $enclosure ) {\n $html .= '<a href=\"' . $item->link . '\" title=\"' . $item->title . '\">';\n $html .= '<div class=\"entry-thumbnail\" style=\"background: url(' . $enclosure . ') no-repeat center center;background-size: cover;\">';\n // $html .= '<img src=\"' . $enclosure . '\" class=\"img-responsive\" alt=\"' . $item->title . '\">';\n $html .= '</div></a>';\n }\n $html .= '<div class=\"entry-content\"><small>Blog</small><h2><a href=\"' . $item->link . '\">';\n $html .= $item->title;\n $html .= '</a></h2>';\n $html .= '<small>' . $dc->creator . ' | ' . $pubDate . '</small>';\n $html .= '<p>' . $item->description . '</p><ul class=\"child\"><li><a href=\"http://blog.nationalarchives.gov.uk/blog/tag/first-world-war/\">Join us on our blog</a></li></ul></div>';\n $html .= '</div></div>';\n $n ++;\n endforeach;\n set_transient( 'tna_rss_blog_transient' . $id, $html, HOUR_IN_SECONDS );\n echo $html;\n }\n else {\n echo '<div class=\"col-md-6\"><div class=\"card\"><div class=\"entry-content\"><h2>First World War blog</h2><ul class=\"child\"><li><a href=\"http://blog.nationalarchives.gov.uk/blog/tag/first-world-war/\">Join us on our blog</a></li></ul></div></div></div>';\n }\n }\n}", "function plugin_tb_output_rsslist($tb_id)\n{\n\tglobal $script, $vars, $entity_pattern;\n\n\t$page = tb_id2page($tb_id);\n\tif ($page === FALSE) return FALSE;\n\n\t$items = '';\n\tforeach (tb_get(tb_get_filename($page)) as $arr) {\n\t\t// _utime_, title, excerpt, _blog_name_\n\t\tarray_shift($arr); // Cut utime\n\t\tlist ($url, $title, $excerpt) = array_map(\n\t\t\tcreate_function('$a', 'return htmlsc($a);'), $arr);\n\t\t$items .= <<<EOD\n\n <item>\n <title>$title</title>\n <link>$url</link>\n <description>$excerpt</description>\n </item>\nEOD;\n\t}\n\n\t$title = htmlsc($page);\n\t$link = $script . '?' . rawurlencode($page);\n\t$vars['page'] = $page;\n\t$excerpt = strip_htmltag(convert_html(get_source($page)));\n\t$excerpt = preg_replace(\"/&$entity_pattern;/\", '', $excerpt);\n\t$excerpt = mb_strimwidth(preg_replace(\"/[\\r\\n]/\", ' ', $excerpt), 0, 255, '...');\n\t$lang = PLUGIN_TB_LANGUAGE;\n\n\t$rc = <<<EOD\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<response>\n <error>0</error>\n <rss version=\"0.91\">\n <channel>\n <title>$title</title>\n <link>$link</link>\n <description>$excerpt</description>\n <language>$lang</language>$items\n </channel>\n </rss>\n</response>\nEOD;\n\n\tpkwk_common_headers();\n\theader('Content-Type: text/xml');\n\techo mb_convert_encoding($rc, 'UTF-8', SOURCE_ENCODING);\n\texit;\n}", "function Feed($title, $link, $body) {\n return\n'<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n <title>'. $title . '</title>\n <link href=\"' . $link . '\" />\n ' . $body . '\n</feed>\n';\n}", "function display_news_page($atts) {\n \n $newsTopic = isset($atts[\"topic\"]) ? $atts[\"topic\"] : \"\";\n $fromDate = isset( $atts[\"fromDate\"])? $atts[\"fromDate\"] : \"\";\n $sortBy = isset($atts[\"sortBy\"]) ? $atts[\"sortBy\"] : \"\";\n \n $value = get_option('newsfeed_option_name');\n if($value){\n $request = wp_remote_get( 'http://newsapi.org/v2/everything?q='.$newsTopic.'&from='.$fromDate.'&sortBy='.$sortBy.'&apiKey='.$value );\n \n if( is_wp_error( $request ) ) {\n return false; \n }\n \n $body = wp_remote_retrieve_body( $request );\n $feed = \"\";\n $data = json_decode( $body );\n if( isset($data) && !empty($data) ) {\n $feed .='<div class=\"container\">';\n $feed .= '<div class=\"row\">';\n if(isset($data->articles)){\n foreach($data->articles as $article ) {\n $feed .='<div class=\"col-md-4 tile\">';\n $feed .='<img src='.$article->urlToImage.' class=\"img-responsive\">';\n $feed .='<h5>'.$article->title.'</h5>' ;\n $feed .= '<p>'.$article->description.'</p>';\n $feed .= '</div>';\n }\n }\n $feed .= '</div>';\n $feed .= '</div>';\n return $feed;\n }\n } else {\n echo \"<h2>Something is wrong, Can you check the API key in Configuration page</h2>\";\n }\n}", "public function get(): string {\n\t\t$fn = $this->fn();\n\t\t$Selection = new Selection($this->Automad->getCollection());\n\t\t$items = $this->getItems($Selection->getSelection());\n\n\t\treturn <<< XML\n\t\t\t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t<rss \n\t\t\tversion=\"2.0\" \n\t\t\txmlns:atom=\"http://www.w3.org/2005/Atom\" \n\t\t\txmlns:content=\"http://purl.org/rss/1.0/modules/content/\"\n\t\t\t>\n\t\t\t\t<channel>\n\t\t\t\t\t<title>{$fn($this->Automad->Shared->get(Fields::SITENAME))}</title>\n\t\t\t\t\t<link>{$fn(AM_SERVER)}</link>\n\t\t\t\t\t<atom:link href=\"{$fn(AM_SERVER . AM_BASE_INDEX . AM_FEED_URL)}\" rel=\"self\" type=\"application/rss+xml\" />\n\t\t\t\t\t<description>\n\t\t\t\t\t\t{$fn(Str::stripTags(Str::findFirstParagraph($this->getPageContent($this->Automad->getPage('/')))))}\n\t\t\t\t\t</description>\n\t\t\t\t\t<generator>https://automad.org</generator>\n\t\t\t\t\t<lastBuildDate>{$fn(date(DATE_RSS, Cache::readSiteMTime()))}</lastBuildDate>\n\t\t\t\t\t$items\n\t\t\t\t</channel>\n\t\t\t</rss>\n\t\t\tXML;\n\t}", "public function oceanwp_news_output() {\n\t\t\t$this->oceanwp_rss_output( self::$feed );\n\t\t}", "public function getHTML();", "public function generate_feed_block()\n\t{\n\t\t$feed = fetch_feed( $this->url );\n\t\t\n\t\tif ( is_wp_error( $feed ) )\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\t$feed_item_quantity = $feed->get_item_quantity( $this->limit );\n\t\t\n\t\tif ( $feed_item_quantity <= 0 )\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\t$data = new stdClass();\n\t\t\n\t\t$data->show_title = $this->show_title;\n\t\t$data->show_description = $this->show_description;\n\t\t$data->show_enclosure = $this->show_enclosure;\n\t\t$data->link_active = $this->link_active;\n\t\t$data->link_target = $this->link_target;\n\t\t$data->feed_items = $feed->get_items( 0, $feed_item_quantity );\n\t\t\n\t\tob_start();\n\t\tinclude $this->plugin->path . 'public' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'feed_block.php';\n\t\treturn ob_get_clean();\n\t}", "public abstract function get_html();", "private function rss_news( $feed, $title, $extra_links = '' ) {\n\t\t$content = get_transient( 'helpscout-docs-api-feed' );\n\t\tif ( empty( $content ) ) {\n\t\t\tinclude_once ABSPATH . WPINC . '/feed.php';\n\t\t\t$rss = fetch_feed( $feed );\n\n\t\t\tif ( is_wp_error( $rss ) ) {\n\t\t\t\t$rss = '<li class=\"yoast\">' . __( 'No news items, feed might be broken...', 'helpscout-docs-api' ) . '</li>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$rss_items = $rss->get_items( 0, $rss->get_item_quantity( 5 ) );\n\n\t\t\t\t$rss = '';\n\t\t\t\tforeach ( $rss_items as $item ) {\n\t\t\t\t\t$url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocols = null, 'display' ) );\n\t\t\t\t\t$rss .= '<li class=\"yoast\">';\n\t\t\t\t\t$rss .= '<a href=\"' . $url . '#utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsitem&utm_campaign=clickywpplugin\">' . $item->get_title() . '</a> ';\n\t\t\t\t\t$rss .= '</li>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$content = '<ul>';\n\t\t\t$content .= $rss;\n\t\t\t$content .= $extra_links;\n\t\t\t$content .= '</ul>';\n\n\t\t\tset_transient( 'helpscout-docs-api-feed', $content );\n\t\t}\n\n\t\t$this->box( $title, $content );\n\t}", "public function getFeedLink();", "function feed_formatter_web_format_feed_item($variables) {\r\n $feed_item = $variables['#feed_item'];\r\n \r\n $allowed = array('a', 'em', 'strong', 'cite', 'blockquote', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'img');\r\n\r\n $element = array(\r\n 'feed_item_fields' => $variables['#content'],\r\n );\r\n return theme('feed_item_web_formatter', array('element' => $element));\r\n}", "function get_news(){\r\n $string=\"SELECT * from news\";\r\n\r\n $result=mysqli_query($GLOBALS['conn'],$string);\r\n\r\n while($row=mysqli_fetch_array($result)){\r\n echo \"<br><br><div id='top'><img src='data:image/jpeg;base64,\".base64_encode($row['image']).\"'><div id='headline'>\".$row['headline'].\"</div></div><br><div id='bottom'><div id='detail'>\".substr($row['detail'], 0, 300).\"</div></div><a style='color:#008db1;font-family:sans-serif;font-size:14px' href='\".$row['source'].\"'>Read More>></a>\";\r\n }\r\n\r\n}", "public function getRss()\n {\n if(!get_section_enabled_status('news')){\n App::abort(404, 'Sekcija obavijesti nije pronađena.');\n }\n\n //generate feed and cache for 60 min\n $feed = Feed::make();\n $feed->setCache(60, getenv('RSS_CACHE_KEY'));\n\n //check if there is cached version\n if(!$feed->isCached()) {\n //grab news data from database\n $news_data = News::orderBy('id', 'DESC')->take(5)->get();\n //check if there are news\n if ($news_data == true) {\n //set feed parameters\n $feed->title = getenv('WEB_NAME').' :: RSS';\n $feed->description = 'Najnovije vijesti na '.getenv('WEB_NAME').'';\n $feed->logo = URL::to('css/assets/images/logo_main_small.png');\n $feed->link = URL::to('rss');\n $feed->setDateFormat('datetime');\n $feed->pubdate = $news_data[0]->created_at;\n $feed->lang = getenv('APP_LOCALE');\n $feed->setShortening(true);\n $feed->setTextLimit(500);\n foreach ($news_data as $news) {\n $feed->add($news->news_title, 'admin', URL::to(route('news-show', $news->slug)), $news->created_at, (new BBCParser)->unparse($news->news_body), '');\n }\n }\n else{\n return Redirect::to(route('news'))->withErrors('Trenutno nema vijesti. RSS je isključen.');\n }\n }\n\n return $feed->render('atom');\n }", "public function toFeedItem()\n {\n return FeedItem::create()\n ->id($this->id)\n ->title($this->subject)\n ->summary($this->summary)\n ->updated($this->updated_at)\n ->link($this->url)\n ->author($this->user()->email);\n }", "public function se_news_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 3,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'post',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'news-structural-engineering'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "public function toRssString()\n {\n return $this->format(\\DateTime::RSS);\n }", "public function p_news_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 3,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'post',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'news-polymeric'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "public function cbm_news_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"loop\">\n\t\t\t<?php\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' => 3,\n\t\t\t\t'offset'=> 0,\n\t\t\t\t'post_type' => 'post',\n\t\t\t\t'tax_query' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => 'news-cbm'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$my_posts = new WP_Query( $args );\n\n\t\t\tif ( $my_posts->have_posts() ) : while( $my_posts->have_posts() ) : $my_posts->the_post();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t\t<p><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></p>\n\t\t\t<?php endwhile; endif;\n\t\t\twp_reset_query();\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "public function getHTML(): string;", "function rss()\n\t{\n\t\t// Header\n\t\theader(\"Content-Type: application/rss+xml\");\n\t\t$xml = '<?xml version=\"1.0\" encoding=\"utf-8\"?>';\n\t\t$xml .= \"\\n\".'<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">';\n\t\t$xml .= \"\\n\".'<channel>';\n\t\t$xml .= \"\\n\".'<atom:link href=\"'.SITEURL.'?rss\" rel=\"self\" type=\"application/rss+xml\" />';\n\n\t\t$last_edit = $this->find('page', null, null, 1, SORT_DESC, 'date', true);\n\t\t$last_edit = $this->get('page', $last_edit, 'date');\n\n\t\t// Channel description\n\t\t$xml .= \"\\n\".'<title>' . $this->setting('site_title') . '</title>';\n\t\t$xml .= \"\\n\".'<link>' . SITEURL . '</link>';\n\t\t$xml .= \"\\n\".'<description>' . $this->setting('site_description') . '</description>';\n\t\t$xml .= \"\\n\".'<lastBuildDate>' . date('r', intval($last_edit)) . '</lastBuildDate>';\n\t\t$xml .= \"\\n\".'<language>' . $this->language() . '</language>';\n\n\t\t// Items\n\t\tforeach($this->get('page') as $name => $page) {\n\t\t\t$url = $this->page_url($name);\n\n\t\t\t$content = $this->parse($page['content'], false);\n\t\t\t$content = $this->markup_del($content, false);\n\t\t\t$content = $this->excerpt($content, 300, '...');\n\t\t\t$content = html_entity_decode(strip_tags($content), ENT_QUOTES, 'UTF-8');\n\n\t\t\t$xml .= \"\\n\".'<item>';\n\t\t\t$xml .= \"\\n\\t\".'<title>' . html_entity_decode($this->page_title($name), ENT_QUOTES, 'UTF-8'). '</title>';\n\t\t\t$xml .= \"\\n\\t\".'<link>' . $url . '</link>';\n\t\t\t$xml .= \"\\n\\t\".'<guid>' . $url . '</guid>';\n\t\t\t$xml .= \"\\n\\t\".'<pubDate>' . $page['date'] . '</pubDate>';\n\t\t\t$xml .= \"\\n\\t\".'<description>' . $content . '</description>';\n\t\t\t$xml .= \"\\n\".'</item>';\n\t\t}\n\t\t$xml .= '</channel></rss>';\n\t\treturn $xml;\n\t}", "public abstract function html(): string;", "private function getHTMLTitle($item)\n {\n if ($item['uri'] == '') {\n $html = '<h2>' . $item['title'] . '</h2>';\n } else {\n $html = '<h2><a href=\"' . $item['uri'] . '\">'\n . $item['title'] . '</a></h2>';\n }\n\n return $html;\n }", "abstract function get_html();", "function link_to_items_rss($text = null, $params = array())\n{\n if (!$text) {\n $text = __('RSS');\n }\n return '<a href=\"' . html_escape(items_output_url('rss2', $params)) . '\" class=\"rss\">' . $text . '</a>';\n}", "public abstract function asHTML();", "public function getRssText() {\n $attribute = $this->getAttribute();\n $module = $this->getModule()->getLowerModuleName();\n $namespace = $this->getNamespace(true);\n return $this->getPadding(3).'$'.'description .= \\'<div>\\'.Mage::helper(\\''.$namespace.'_'.$module.'\\')->__(\\''.$attribute->getLabel().'\\').\\': \\'.Mage::helper(\\'core\\')->formatDate($item->get'.$this->getAttribute()->getMagicMethodCode().'(), \\'full\\').\\'</div>\\';'.$this->getEol();\n }", "public function rss()\r\n{\r\n\r\n $data['noticias'] = $this->news->all();\r\n\r\n\r\n return response()->view('www/rss',$data)->header('Content-Type', 'application/rss+xml');\r\n\r\n\r\n}", "public function GrRss()\n\t{\n\n\t\t$lang = get_bloginfo(\"language\") == 'pl-PL' ? 'pl' : 'com';\n\t\t$feed_url = 'http://blog.getresponse.' . $lang . '/feed';\n\n\t\t$num = 15; // numbers of feeds:\n\t\tinclude_once(ABSPATH . WPINC . '/feed.php');\n\t\t$rss = fetch_feed($feed_url);\n\n\t\tif (is_wp_error($rss))\n\t\t{\n\t\t\t_e('No rss items, feed might be broken.', 'Gr_Integration');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$rss_items = $rss->get_items(0, $rss->get_item_quantity($num));\n\n\t\t\t// If the feed was erroneously\n\t\t\tif ( ! $rss_items)\n\t\t\t{\n\t\t\t\t$md5 = md5($feed_url);\n\t\t\t\tdelete_transient('feed_' . $md5);\n\t\t\t\tdelete_transient('feed_mod_' . $md5);\n\t\t\t\t$rss = fetch_feed($feed_url);\n\t\t\t\t$rss_items = $rss->get_items(0, $rss->get_item_quantity($num));\n\t\t\t}\n\n\t\t\t$content = '<ul class=\"GR_rss_ul\">';\n\t\t\tif ( ! $rss_items)\n\t\t\t{\n\t\t\t\t$content .= '<li class=\"GR_rss_li\">' . _e('No rss items, feed might be broken.', 'Gr_Integration') . '</li>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ($rss_items as $item)\n\t\t\t\t{\n\t\t\t\t\t$url = preg_replace('/#.*/', '', esc_url($item->get_permalink(), $protocolls = null, 'display'));\n\t\t\t\t\t$content .= '<li class=\"GR_rss_li\">';\n\t\t\t\t\t$content .= '<a class=\"GR_rss_a\" href=\"' . $url . '\" target=\"_blank\">' . esc_html($item->get_title()) . '</a> ';\n\t\t\t\t\t$content .= '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content .= '</ul>';\n\t\t\techo $content;\n\t\t}\n\t}", "private static function provideRSSContent()\n\t{\n\t\treturn simplexml_load_file(self::RSS_FEED_URL);\n\t}", "public function html(): string;", "public function getNews()\n {\n $sql = \"SELECT * FROM news \";\n return $this->get($sql, array());\n }", "public function fetchHTML()\n {\n return $this->fetch();\n }", "public function getRandomNewsItems($tags=\"\")\n\t{\n\t\tglobal\t$gMysql;\n\n\t\t$news_data_array\t=\t$gMysql->selectToArray(\"select * from sm_post where status='A' order by published DESC limit 4 \",__FILE__,__LINE__);\n\n\t\t$string\t=\t\"\n<div style='font-size:16px; font-weight:bold; background:#07638C; color:#ffffff; padding:4px;' ><div class='container-fluid fp-website-container' style='padding-left:20px;'>\nFlight Delay Claim News</div></div>\n<div class='container-fluid fp-website-container' style='padding-top:10px;padding-bottom:10px;padding-left:10px;padding-right:10px;background-color:#ffffff; '>\";\n\n\t\t$i=0;\n\t\tforeach\t($news_data_array as $news_data)\n\t\t{\n\t\t\t$html\t=\t$this->prepareHTMLCarousel($news_data,100);\n\n\t\t\t$string\t.=\t\"<div style='border:0px solid red;' class='col-sm-6 col-xs-12 fp-blog-news-item'>$html</div>\";\n\n\t\t\t# after 2 stories, clear this to stop float left/height issues\n\t\t\tif (($i++ &1) == 1)\n\t\t\t{\n\t\t\t\t$string\t.=\t\"<div style='clear:both;'></div>\";\n\t\t\t}\n\t\t}\n\n\t\t$string\t.=\t\"</div>\";\n\n\t\treturn $string;\n\t}", "public function getContent() : string\n {\n return sprintf('<a href=\"%s\">%s</a>', $this->link, parent::getContent());\n }", "public function getBody() {\n return $this->get('body', 'news');\n }", "public function getNews()\r\n\t{\r\n\t\treturn $this->makeRequest('/news');\r\n\t}", "public function getFeedAsString() {\n\t\treturn $this->work();\n\t}", "public function show()\n {\n $offset = Input::get('offset');\n $news = App\\News::latest('created_at')->skip($offset)->take(6)->get();\n \\DB::table('news')->count() > 7 + $offset ? $hide = false : $hide = true;\n foreach ($news as $item){\n $item['url'] = IndexController::translitURL($item['title']);\n $item['created'] = IndexController::restyleDate($item['created_at']);\n }\n return ['news' => $news, 'hide' => $hide];\n }", "function html_type_rss()\n {\n }", "public function fetch() {\n return $this->html;\n }", "function the_content_rss($more_link_text = '(more...)', $stripteaser = 0, $more_file = '', $cut = 0, $encode_html = 0)\n {\n }", "function b_news_bigstory_show() {\n\tinclude_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';\n include_once XOOPS_ROOT_PATH.\"/modules/news/class/class.newsstory.php\";\n $myts =& MyTextSanitizer::getInstance();\n\t$restricted=getmoduleoption('restrictindex');\n\t$dateformat=getmoduleoption('dateformat');\n\t$infotips=getmoduleoption('infotips');\n\n\t$block = array();\n $onestory = new NewsStory();\n\t$stories = $onestory->getBigStory(1,0,$restricted,0,1, true, 'counter');\n\tif(count($stories)==0) {\n\t\t$block['message'] = _MB_NEWS_NOTYET;\n\t} else {\n\t\tforeach ( $stories as $key => $story ) {\n\t\t\t$htmltitle='';\n\t\t\tif($infotips>0) {\n\t\t\t\t$block['infotips'] = xoops_substr(strip_tags($story->hometext()),0,$infotips);\n\t\t\t\t$htmltitle=' title=\"'.$block['infotips'].'\"';\n\t\t\t}\n\t\t\t$block['htmltitle']=$htmltitle;\n\t\t\t$block['message'] = _MB_NEWS_TMRSI;\n\t\t\t$block['story_title'] = $story->title('Show');\n\t\t\t$block['story_id'] = $story->storyid();\n\t\t\t$block['story_date'] = formatTimestamp($story->published(), $dateformat);\n\t\t\t$block['story_hits'] = $story->counter();\n $block['story_rating'] = $story->rating();\n $block['story_votes'] = $story->votes();\n $block['story_author']= $story->uname();\n $block['story_text']= $story->hometext();\n $block['story_topic_title']= $story->topic_title();\n $block['story_topic_color']= '#'.$myts->displayTarea($story->topic_color);\n\t\t}\n\t}\n\treturn $block;\n}", "public function html() {}", "private function yoast_news() {\n\t\t$extra_links = '<li class=\"facebook\"><a href=\"https://www.facebook.com/yoast\">' . __( 'Like Yoast on Facebook', 'helpscout-docs-api' ) . '</a></li>';\n\t\t$extra_links .= '<li class=\"twitter\"><a href=\"https://twitter.com/yoast\">' . __( 'Follow Yoast on Twitter', 'helpscout-docs-api' ) . '</a></li>';\n\t\t$extra_links .= '<li class=\"email\"><a href=\"https://yoast.com/newsletter/\">' . __( 'Subscribe by email', 'helpscout-docs-api' ) . '</a></li>';\n\n\t\t$this->rss_news( 'https://yoast.com/feed/', __( 'Latest news from Yoast', 'helpscout-docs-api' ), $extra_links );\n\t}", "private function fillEntry($entry)\n {\n $date = date('m/d/y', strtotime($entry['date']));\n\n return <<<HTML\n<li class=\"news-entry\">\n <section class=\"news-entry-heading\">\n <a href=\"/article/{$entry['id']}\">\n <h3 class=\"news-entry-title\">{$entry['title']}</h3>\n <p class=\"news-entry-attribution\">{$entry['author']} on {$date}</p>\n </a>\n </section>\n <section class=\"news-entry-body\">{$entry['content']}</section>\n <a class=\"news-entry-full\" href=\"/article/{$entry['id']}\">Read More</a>\n</li>\nHTML;\n }", "protected function get_post_content( $feed_item ) {\n\t\t$content = $feed_item->HtmlBody;\n\n\t\tif ( empty( $feed_item->Files ) ) {\n\t\t\treturn $content;\n\t\t}\n\n\t\t$pdf = false;\n\t\tforeach ( $feed_item->Files as $file ) {\n\t\t\t$file_type = wp_check_filetype( $file->Url );\n\t\t\tif ( 'pdf' === $file_type['ext'] ) {\n\t\t\t\t$pdf = $file->Url;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ( $pdf !== false ) {\n\t\t\t$string = ( 'sv' === $this->lang ) ? 'Ladda ner som PDF' : 'Download as PDF';\n\t\t\t$content .= \"\\n\\n\" . sprintf(\n\t\t\t\t\t'<a target=\"_blank\" href=\"%s\">%s</a></p>',\n\t\t\t\t\t$pdf,\n\t\t\t\t\t$string\n\t\t\t\t);\n\t\t}\n\n\t\treturn $content;\n\t}", "function PageSummaries_getHtml($id) {\n\t$PAGEDATA=Page::getInstance($id);\n\tglobal $sitedomain;\n\t$r=dbRow('select * from page_summaries where page_id=\"'.$PAGEDATA->id.'\"');\n\tif (!count($r)) {\n\t\treturn '<em>'.__(\n\t\t\t'This page is marked as a page summary, but there is no '\n\t\t\t.'information on how to handle it.'\n\t\t)\n\t\t\t.'</em>';\n\t}\n\tif ($r['rss']) {\n\t\treturn PageSummaries_rssToHtml($r['rss']);\n\t}\n\t// { build rss\n\t$title=($PAGEDATA->title=='')\n\t\t?$sitedomain\n\t\t:htmlspecialchars($PAGEDATA->title);\n\t$rss='<'.'?xml version=\"1.0\" ?'.'><rss version=\"2.0\"><channel><title>'\n\t\t.$title.'</title>';\n\t$rss.='<link>'.$_SERVER['REQUEST_URI'].'</link><description>RSS for '\n\t\t.$PAGEDATA->name.'</description>';\n\t$category=$PAGEDATA->category?' and category=\"'.$PAGEDATA->category.'\"':'';\n\t$containedpages=PageSummaries_getContainedPages($r['parent_id']);\n\tif (count($containedpages)) {\n\t\t$q2=dbAll(\n\t\t\t'select edate,name,title,body from pages where id in ('\n\t\t\t.join(',', $containedpages).')'.$category.' order by cdate desc limit 20'\n\t\t);\n\t\tforeach ($q2 as $r2) {\n\t\t\t$rss.='<item>';\n\t\t\tif (!$r2['title']) {\n\t\t\t\t$r2['title']=$r2['name'];\n\t\t\t}\n\t\t\t$rss.='<title>'.htmlspecialchars($r2['title']).'</title>';\n\t\t\t$rss.='<pubDate>'.Core_dateM2H($r2['edate']).'</pubDate>';\n\t\t\t// { build body\n\t\t\tif ($r['amount_to_show']==0 || $r['amount_to_show']==1) {\n\t\t\t\t$length=$r['amount_to_show']==0?300:600;\n\t\t\t\t$body=substr(\n\t\t\t\t\tpreg_replace(\n\t\t\t\t\t\t'/<[^>]*>/',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t\tarray('&amp;', '&nbsp;', '&lsquo;'),\n\t\t\t\t\t\t\tarray('&',' ','&apos;'),\n\t\t\t\t\t\t\t$r2['body']\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t0,\n\t\t\t\t\t$length\n\t\t\t\t)\n\t\t\t\t.'...';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$body=$r2['body'];\n\t\t\t}\n\t\t\t$body=str_replace('&euro;', '&#8364;', $body);\n\t\t\t// }\n\t\t\t$rss.='<description>'.$body.'</description>';\n\t\t\t$rss.='<link>http://'.$_SERVER['HTTP_HOST'].'/'\n\t\t\t\t.urlencode(str_replace(' ', '-', $r2['name'])).'</link>';\n\t\t\t$rss.='</item>';\n\t\t}\n\t}\n\t$rss.='</channel></rss>';\n\tdbQuery(\n\t\t'update page_summaries set rss=\"'.addslashes($rss)\n\t\t.'\" where page_id=\"'.$PAGEDATA->id.'\"'\n\t);\n\t// }\n\treturn PageSummaries_rssToHtml($rss);\n}", "public function generate()\n {\n if (TL_MODE == 'BE')\n {\n $objTemplate = new BackendTemplate('be_wildcard');\n\n $objTemplate->wildcard = '### NEWS LIST ###';\n $objTemplate->title = $this->headline;\n $objTemplate->id = $this->id;\n $objTemplate->link = $this->name;\n $objTemplate->href = 'contao/main.php?do=modules&act=edit&id=' . $this->id;\n\n return $objTemplate->parse();\n }\n\n $this->news_archives = $this->sortOutProtected(deserialize($this->news_archives, true));\n\n // Return if there are no archives\n if (!is_array($this->news_archives) || count($this->news_archives) < 1)\n {\n return '';\n }\n\n return parent::generate();\n }", "public function getContent() {\n return $this->formatLinks($this->getTitle());\n }", "public function html(): string\n {\n $parser = new \\Parsedown();\n return $parser->text($this->data);\n }", "private function getHTMLItems()\n {\n $this->load->model('HtmlItems_Model', \"HtmlItems\");\n $this->HtmlItems->setControllerMethodName($this->_controllerName . '/' . $this->_currentMethod);\n return $this->HtmlItems->render();\n }", "function getHTML()\n\t{\t\t\t\t\n\t\t// getHTML() is called by ilRepositoryGUI::show()\n\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// there is no way to do a permissions check here, we have no wsp\n\t\t\n\t\t$this->filterInactivePostings();\n\t\t\n\t\t$list_items = $this->getListItems();\t\t\n\t\t\n\t\t$list = $nav = \"\";\n\t\tif($list_items)\n\t\t{\t\t\t\t\n\t\t\t$list = $this->renderList($list_items, \"previewEmbedded\");\n\t\t\t$nav = $this->renderNavigation($this->items, \"gethtml\", \"previewEmbedded\");\n\t\t}\t\t\n\t\t\n\t\treturn $this->buildEmbedded($list, $nav);\t\t\n\t}", "public function get_url() {\r\n\t\treturn $this->feed->get_url().\"/\".$this->id.\"/\".urlencode(strtolower($this->title));\r\n\t}", "public function getNewsItemByIndex($offset=0)\n\t{\n\t\tglobal\t$gMysql;\n\n\t\tif\t(($news_data\t=\t$gMysql->queryRow(\"select * from sm_post where status='A' order by published desc limit $offset,1\",__FILE__,__LINE__)) != NULL)\n\t\t{\n\t\t\t$html\t=\t$this->prepareHTMLSmall($news_data);\n\n\t\t\treturn $html;\n\t\t}\n\t}", "function frontpage_news_twitter($user) {\n\n $url = \"http://twitter.com/statuses/user_timeline.json?screen_name=\".$user.\"&count=10\";\n $stream = json_decode(file_get_contents($url));\n\n if(empty($stream)) return \"Error retrieving stream from Twitter\";\n\n $first = true;\n\n foreach($stream as $status) {\n if($first) {\n $status->text = \"<span style='font-size:16px;'>\".$status->text.\"</span>\";\n $first = false;\n }\n $news .= \"<p>\".$status->text.\"\n <a href='http://twitter.com/\".$status->user->screen_name.\"/status/\".$status->id.\"' style='font-size:10px;color:#A00;text-decoration:none;'>\n <span>\".date(\"h:i A; M jS\",strtotime($status->created_at)).\"</span>\n </a></p>\";\n }\n\n return $news;\n\n}", "function ticketbud_widget_output( $rss, $args = array() ) {\n\tif ( is_string( $rss ) ) {\n\t\t$rss = fetch_feed($rss);\n\t} elseif ( is_array($rss) && isset($rss['url']) ) {\n\t\t$args = $rss;\n\t\t$rss = fetch_feed($rss['url']);\n\t} elseif ( !is_object($rss) ) {\n\t\treturn;\n\t}\n\n\tif ( is_wp_error($rss) ) {\n\t\tif ( is_admin() || current_user_can('manage_options') )\n\t\t\techo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>';\n\t\treturn;\n\t}\n\n\t$default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0, 'show_poweredby' => 0 );\n\t$args = wp_parse_args( $args, $default_args );\n\textract( $args, EXTR_SKIP );\n\n\t$items = (int) $items;\n\tif ( $items < 1 || 20 < $items )\n\t\t$items = 10;\n\t$show_summary = (int) $show_summary;\n\t$show_author = (int) $show_author;\n\t$show_date = (int) $show_date;\n\t$show_poweredby = (int) $show_poweredby;\n\n\tif ( !$rss->get_item_quantity() ) {\n\t\techo '<ul><li>' . __( 'There are no current events.' ) . '</li></ul>';\n\t\t$rss->__destruct();\n\t\tunset($rss);\n\t\treturn;\n\t}\n\n\techo '<ul>';\n\tforeach ( $rss->get_items(0, $items) as $item ) {\n\t\t$link = $item->get_link();\n\t\twhile ( stristr($link, 'http') != $link )\n\t\t\t$link = substr($link, 1);\n\t\t$link = esc_url(strip_tags($link));\n\t\t$title = esc_attr(strip_tags($item->get_title()));\n\t\tif ( empty($title) )\n\t\t\t$title = __('Untitled');\n\n\t\t$desc = str_replace( array(\"\\n\", \"\\r\"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );\n\t\t$desc = wp_html_excerpt( $desc, 360 );\n\n\t\t// Append ellipsis. Change existing [...] to [&hellip;].\n\t\tif ( '[...]' == substr( $desc, -5 ) )\n\t\t\t$desc = substr( $desc, 0, -5 ) . '[&hellip;]';\n\t\telseif ( '[&hellip;]' != substr( $desc, -10 ) )\n\t\t\t$desc .= ' [&hellip;]';\n\n\t\t$desc = esc_html( $desc );\n\n\t\tif ( $show_summary ) {\n\t\t\t$summary = \"<div class='rssSummary'>$desc</div>\";\n\t\t} else {\n\t\t\t$summary = '';\n\t\t}\n\n\t\t$date = '';\n\t\tif ( $show_date ) {\n\t\t\t$date = $item->get_date();\n\t\t\t$myLocaltime = new DateTime($date);\n\t\t\tif ( get_option('timezone_string') ){\n\t\t\t $myTimezone = get_option('timezone_string');\n\t\t\t}else{\n\t\t\t $myTimezone = ticketbudGetTimeZoneStringFromOffset(get_option('gmt_offset'));\n\t\t\t}\n\t\t\t$myLocaltime->setTimezone(new DateTimeZone( $myTimezone ) );\n\t\t\t// error_log($myTimezone . \" \" . ($myLocaltime->getOffset()/ 3600) );\n\t\t\tif ( $date ) {\n\t\t\t if ( $date_stamp = strtotime( $myLocaltime->format( get_option( 'date_format' ) ) ) )\n\t\t\t\t $date = '<br /><span class=\"rss-date\">' . date_i18n( get_option( 'date_format' ), $date_stamp ) . '</span>';\n\t\t\t\telse\n\t\t\t\t\t$date = '';\n\t\t\t}\n\t\t}\n\n\t\t$author = '';\n\t\tif ( $show_author ) {\n\t\t\t$author = $item->get_author();\n\t\t\tif ( is_object($author) ) {\n\t\t\t\t$author = $author->get_name();\n\t\t\t\t$author = ' <cite>' . esc_html( strip_tags( $author ) ) . '</cite>';\n\t\t\t}\n\t\t}\n\n\t\tif ( $link == '' ) {\n\t\t\techo \"<li>$title{$date}{$summary}{$author}</li>\";\n\t\t} else {\n \t\t\techo \"<li><a class='rsswidget' href='$link' title='$desc'><b>$title</b>{$date}{$summary}{$author}</a></li>\";\n\t\t}\n\t}\n\techo '</ul>';\n\n\tif ( $show_poweredby ) {\n \t echo \"<a href='http://ticketbud.com' title='Sell Tickets Online'><img style='padding:0px 0px 10px 25px;' src='http://ticketbud.com/images/Ticketbud-sm.png' alt='Ticketbud' border='0'/></a>\";\n\t}\n\n\t$rss->__destruct();\n\tunset($rss);\n}", "public function render($params = null)\n {\n\n if ($this->html)\n return $this->html;\n\n $this->name = $this->getId();\n\n $codeEntries = '';\n\n foreach ($this->data as $entry) {\n $codeEntries .= $this->renderEntry($entry);\n }\n\n $html = <<<HTML\n<div class=\"wgt-news-box\" >\n <ul class=\"wgt-news-list thumbs\" id=\"{$this->id}\" >\n {$codeEntries}\n </ul>\n</div>\n\nHTML;\n\n $this->html = $html;\n\n return $html;\n\n }", "public function feedAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:Brick')->findPublished();\n\n $feed = $this->get('eko_feed.feed.manager')->get('brick');\n $feed->addFromArray($entities);\n\n return new Response($feed->render('rss')); // or 'atom'\n }", "public function formatFeed()\n\t{\n\t\tforeach ( $this->feed as $key=>$item )\n\t\t{\n\t\t\t$this->feed_formatted[$key]['id'] = $this->getPostId($item->id);\n\t\t\t$this->feed_formatted[$key]['date'] = $item->created_time;\n\t\t\t$this->feed_formatted[$key]['link'] = ( isset($item->link) ) ? $item->link : null;\n\t\t\t$this->feed_formatted[$key]['type'] = $item->type;\n\t\t\t$this->feed_formatted[$key]['message'] = ( isset($item->message) ) ? $item->message : null;\n\t\t\t$this->feed_formatted[$key]['story'] = ( isset($item->story) ) ? $item->story : null;\n\t\t\t$this->feed_formatted[$key]['user_id'] = $this->getUserId($item->id);\n\t\t\t$this->feed_formatted[$key]['screen_name'] = ( isset($item->from->name) ) ? $item->from->name : null;\n\t\t\t$this->feed_formatted[$key]['profile_image'] = $this->getProfileImage($this->getUserId($item->id));\n\t\t\t$this->feed_formatted[$key]['picture'] = ( $item->type == 'photo' ) ? $this->getPicture($item->object_id) : null;\n\t\t\t$this->feed_formatted[$key]['caption'] = ( isset($item->caption) ) ? $item->caption : null;\n\t\t\t$this->feed_formatted[$key]['caption_title'] = ( isset($item->name) ) ? $item->name : null;\n\t\t\t$this->feed_formatted[$key]['caption_picture'] = ( isset($item->picture) ) ? $item->picture : null;\n\t\t\t$this->feed_formatted[$key]['caption_description'] = ( isset($item->description) ) ? $item->description : null;\n\t\t}\n\t}", "function get_the_title_rss()\n {\n }", "function get_item_html($id, $item){\n $output = \"<li><a href='details.php?id=\" . $id . \"'><img src='\"\n .$item[\"img\"] . \"' alt='\"\n .$item[\"title\"] . \"' />\" \n . \"<p>View Details</p>\"\n .\"</a></li>\";\n return $output;\n}", "public function displayData()\r\n {\r\n $htmlContent = '';\r\n $htmlContent .= html_entity_decode($this->content);\r\n return $htmlContent;\r\n }", "public function goodNews() {\n return $this->randomItem(\n \"You'll be pleased to know\",\n 'Good news!',\n 'Ta-da.',\n 'Woohoo,',\n 'Here you go!',\n 'Yes!'\n );\n }", "public function feedAction()\n {\n return $this->render('EnglishHomeBundle:Default:feed.html.twig', array());\n\n }", "public function getRSSLink()\n {\n return $this->getLink($this->query, 'rss');\n }", "function custom_dashboard_widget() {\n\t\t$rss = new DOMDocument();\n\t\t$rss->load('http://wpfolio.visitsteve.com/wiki/feed');\n\t\t$feed = array();\n\t\tforeach ($rss->getElementsByTagName('item') as $node) {\n\t\t\t$item = array ( \n\t\t\t\t'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,\n\t\t\t\t// 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,\n\t\t\t\t'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,\n\t\t\t\t'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,\n\t\t\t\t);\n\t\t\tarray_push($feed, $item);\n\t\t}\n\t\t$limit = 5; // change how many posts to display here\n\t\techo '<ul>'; // wrap in a ul\n\t\tfor($x=0;$x<$limit;$x++) {\n\t\t\t$title = str_replace(' & ', ' &amp; ', $feed[$x]['title']);\n\t\t\t$link = $feed[$x]['link'];\n\t\t\t// $description = $feed[$x]['desc'];\n\t\t\t$date = date('l F d, Y', strtotime($feed[$x]['date']));\n\t\t\techo '<li><p><strong><a href=\"'.$link.'\" title=\"'.$title.'\">'.$title.'</a></strong>';\n\t\t\techo ' - '.$date.'</p></li>';\n\t\t\t// echo '<p>'.$description.'</p>';\n\t\t}\n\t\techo '</ul>';\n\t\techo '<p class=\"textright\"><a href=\"http://wpfolio.visitsteve.com/wiki/category/news\" class=\"button\">View all</a></p>'; // link to site\t\n\t}", "public function getblogContent(): string {\n\t\treturn ($this->blogContent);\n\t}", "public function getHTML($data);", "function make_rss($items, $user_id) {\n\t$now = date('r');\n\n\t$return =<<<HTML\n<?xml version=\"1.0\"?>\n<rss version=\"2.0\">\n <channel>\n <title>Public Facebook Status Feed for user ID $user_id</title>\n <link>http://vodex.net/publicfacebookfeed/rss.php?uid=$user_id</link>\n <description>Public Facebook Status Feed for http://www.facebook.com/profile.php?id=$user_id</description>\n <language>en-gb</language>\n\t <pubDate>$now</pubDate>\nHTML;\n\tforeach ($items as $item) {\n\t\t$return .=<<<HTML\n <item>\n <title>{$item['headline']}</title>\n <link>{$item['url']}</link>\n <pubDate>{$item['dateLong']}</pubDate>\n <guid>{$item['url']}</guid>\n <description> \n\t\t\t{$item['description']}\n </description>\n </item>\nHTML;\n\t}\n\t$return .=<<<HTML\n </channel>\n</rss>\nHTML;\n\n\treturn $return;\n}" ]
[ "0.72033525", "0.6772645", "0.6662648", "0.6517041", "0.6429796", "0.63244975", "0.6318481", "0.63144934", "0.628587", "0.6262031", "0.62610704", "0.625038", "0.6246855", "0.6226428", "0.6226085", "0.62226033", "0.6199488", "0.6185026", "0.6146968", "0.61182135", "0.61093074", "0.61073804", "0.60855734", "0.6082954", "0.607217", "0.60695016", "0.6062193", "0.6037636", "0.60076624", "0.6006812", "0.5990066", "0.5985392", "0.59512675", "0.5945", "0.5944583", "0.59383434", "0.5936946", "0.5931034", "0.59114665", "0.5911427", "0.5902183", "0.58979887", "0.58904564", "0.5890061", "0.58866704", "0.5872924", "0.5870054", "0.5861649", "0.5846492", "0.5841292", "0.58278424", "0.5820131", "0.5810981", "0.5810144", "0.58080614", "0.57955736", "0.5775604", "0.5773767", "0.5768688", "0.5765669", "0.5758836", "0.57532024", "0.57384133", "0.57352227", "0.57221067", "0.5716074", "0.57130355", "0.5702823", "0.56980836", "0.56977355", "0.56870204", "0.56770945", "0.56586206", "0.5656581", "0.5656343", "0.5651778", "0.56346464", "0.5628575", "0.56213176", "0.56185746", "0.5618288", "0.56118876", "0.56096965", "0.5607847", "0.55991495", "0.5598982", "0.55944574", "0.5580998", "0.5570362", "0.556956", "0.556702", "0.55667174", "0.55659914", "0.55602247", "0.5559714", "0.5558951", "0.5556633", "0.5551125", "0.55495507", "0.5545315" ]
0.6631589
3
Write a new entry
public static function entry(Model_User $user = null, Model_Blog_Entry $entry = null) { if ($user && $entry) { parent::add($user, 'blog', self::TYPE_ENTRY, array('entry_id' => (int)$entry->id)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEntry($newentry) {\n\t\t$this->data[] = $newentry;\n\t}", "public function add_entry($entry);", "public function add_entry($entry)\n {\n }", "public function save(Entry $entry)\n {\n // Construct the queryBuilder\n $queryBuilder = $this->getQueryBuilder()\n ->insert(\"entry\")\n ->values([\n \"date\" => \"?\",\n \"start\" => \"?\",\n \"end\" => \"?\",\n \"break\" => \"?\",\n \"exp\" => \"?\",\n \"note\" => \"?\",\n \"userid\" => \"?\",\n ])\n ->setParameter(0, $entry->getDate())\n ->setParameter(1, $entry->getStart())\n ->setParameter(2, $entry->getEnd())\n ->setParameter(3, $entry->getBreak())\n ->setParameter(4, $entry->getExp())\n ->setParameter(5, $entry->getNote())\n ->setParameter(6, $entry->getUserId());\n\n // Execute the query\n $queryBuilder->execute();\n }", "public function addEntry(DataStreamEntry $entry);", "public function save()\n {\n $DB = DB::singleton(dsn());\n\n if ( $this->update ) {\n $SQL = SQL::newUpdate('entry');\n foreach ( $this->columns as $column ) {\n $SQL->addUpdate('entry_' . $column, $this->{$column});\n }\n $SQL->addWhereOpr('entry_id', $this->id);\n $SQL->addWhereOpr('entry_blog_id', $this->blog_id);\n $DB->query($SQL->get(dsn()), 'exec');\n } else {\n $SQL = SQL::newInsert('entry');\n foreach ( $this->columns as $column ) {\n $SQL->addInsert('entry_' . $column, $this->{$column});\n }\n $DB->query($SQL->get(dsn()), 'exec');\n }\n\n EntryHelper::saveColumn($this->units, $this->id, $this->blog_id);\n Common::saveField('eid', $this->id, $this->fields);\n Common::saveFulltext('eid', $this->id, Common::loadEntryFulltext($this->id));\n }", "public function set(string $name, $entry): void;", "function writeTask($entry){\r\n // check if write worked\r\n $add = $this->exec(\"INSERT INTO `Task` (`task`) VALUES ('\".$entry.\"')\");\r\n if($add){ \r\n // Return the id it generated\r\n return $this->querySingle('select last_insert_rowid()');\r\n }\r\n return null; // Did not work\r\n }", "function createAtomEntry() {\n\t\t$this->create();\n\t}", "private function saveEntry(): void\n {\n if ($this->isHeader()) {\n $this->processHeader();\n\n return;\n }\n $this->translations->add($this->translation);\n }", "public function save_entry_to_log(Omnilog_entry $entry)\n {\n /**\n * This method could conceivably be called when the module is\n * not installed, but the Omnilogger class is present.\n */\n\n if ( ! $this->EE->db->table_exists('omnilog_entries'))\n {\n throw new Exception(\n $this->EE->lang->line('exception__save_entry__not_installed'));\n }\n\n if ( ! $entry->is_populated())\n {\n throw new Exception(\n $this->EE->lang->line('exception__save_entry__missing_data'));\n }\n\n $insert_data = array_merge(\n $entry->to_array(),\n array(\n 'notify_admin' => ($entry->get_notify_admin() === TRUE) ? 'y' : 'n',\n 'site_id' => $this->get_site_id()\n )\n );\n\n $insert_data['admin_emails'] = implode($insert_data['admin_emails'], '|');\n\n $this->EE->db->insert('omnilog_entries', $insert_data);\n\n if ( ! $insert_id = $this->EE->db->insert_id())\n {\n throw new Exception(\n $this->EE->lang->line('exception__save_entry__not_saved'));\n }\n\n $entry->set_log_entry_id($insert_id);\n return $entry;\n }", "public function setEntry($entry)\n {\n if ($this->validateEntry($entry)) {\n $this->entries[] = $entry;\n }\n }", "public function write($key, $value);", "private function save_entry_and_redirect( Entry $entry, bool $new = false ) {\n\t\t$db_result = $entry->save();\n\n\t\tif ( -1 === $db_result ) {\n\t\t\tAdmin_Page::redirect_and_show_message(\n\t\t\t\tnew Message( Message::ERROR, __( 'Database error.', 'glossary-by-arteeo' ) )\n\t\t\t);\n\t\t} elseif ( 0 === $db_result ) {\n\t\t\tAdmin_Page::redirect_and_show_message(\n\t\t\t\tnew Message( Message::SUCCESS, __( 'No changes have occured.', 'glossary-by-arteeo' ) )\n\t\t\t);\n\t\t} else {\n\t\t\tif ( ! $new ) {\n\t\t\t\tAdmin_Page::redirect_and_show_message(\n\t\t\t\t\tnew Message( Message::SUCCESS, __( 'Entry has been adjusted.', 'glossary-by-arteeo' ) )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tAdmin_Page::redirect_and_show_message(\n\t\t\t\t\tnew Message( Message::SUCCESS, __( 'Entry has been created.', 'glossary-by-arteeo' ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "private function write($key,$value) {\r\n}", "public function put();", "public function put();", "public function saveData( &$entry, $request = 'POST' )\r\n\t{\r\n\t\tif( !( $this->enabled ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$data = $this->verify( $entry, $request );\r\n\t\t$time = SPRequest::now();\r\n\t\t$IP = SPRequest::ip( 'REMOTE_ADDR', 0, 'SERVER' );\r\n\t\t$uid = Sobi::My( 'id' );\r\n\r\n\t\t/* if we are here, we can save these data */\r\n\t\t/* @var SPdb $db */\r\n\t\t$db =& SPFactory::db();\r\n\r\n\t\t/* collect the needed params */\r\n\t\t$params = array();\r\n\t\t$params[ 'publishUp' ] = $entry->get( 'publishUp' );\r\n\t\t$params[ 'publishDown' ] = $entry->get( 'publishDown' );\r\n\t\t$params[ 'fid' ] = $this->fid;\r\n\t\t$params[ 'sid' ] = $entry->get( 'id' );\r\n\t\t$params[ 'section' ] = Sobi::Reg( 'current_section' );\r\n\t\t$params[ 'lang' ] = Sobi::Lang();\r\n\t\t$params[ 'enabled' ] = $entry->get( 'state' );\r\n\t\t$params[ 'baseData' ] = strip_tags( $db->escape( $data ) );\r\n\t\t$params[ 'approved' ] = $entry->get( 'approved' );\r\n\t\t$params[ 'confirmed' ] = $entry->get( 'confirmed' );\r\n\t\t/* if it is the first version, it is new entry */\r\n\t\tif( $entry->get( 'version' ) == 1 ) {\r\n\t\t\t$params[ 'createdTime' ] = $time;\r\n\t\t\t$params[ 'createdBy' ] = $uid;\r\n\t\t\t$params[ 'createdIP' ] = $IP;\r\n\t\t}\r\n\t\t$params[ 'updatedTime' ] = $time;\r\n\t\t$params[ 'updatedBy' ] = $uid;\r\n\t\t$params[ 'updatedIP' ] = $IP;\r\n\t\t$params[ 'copy' ] = !( $entry->get( 'approved' ) );\r\n\r\n\t\t/* save it */\r\n\t\ttry {\r\n\t\t\t/* Notices:\r\n\t\t\t * If it was new entry - insert\r\n\t\t\t * If it was an edit and the field wasn't filled before - insert\r\n\t\t\t * If it was an edit and the field was filled before - update\r\n\t\t\t * \" ... \" and changes are not autopublish it should be insert of the copy .... but\r\n\t\t\t * \" ... \" if a copy already exist it is update again\r\n\t\t\t * */\r\n\t\t\t$db->insertUpdate( 'spdb_field_data', $params );\r\n\t\t}\r\n\t\tcatch ( SPException $x ) {\r\n\t\t\tSobi::Error( __CLASS__, SPLang::e( 'CANNOT_SAVE_DATA', $x->getMessage() ), SPC::WARNING, 0, __LINE__, __FILE__ );\r\n\t\t}\r\n\r\n\t\t/* if it wasn't edited in the default language, we have to try to insert it also for def lang */\r\n\t\tif( Sobi::Lang() != SOBI_DEFLANG ) {\r\n\t\t\t$params[ 'lang' ] = SOBI_DEFLANG;\r\n\t\t\ttry {\r\n\t\t\t\t$db->insert( 'spdb_field_data', $params, true );\r\n\t\t\t}\r\n\t\t\tcatch ( SPException $x ) {\r\n\t\t\t\tSobi::Error( __CLASS__, SPLang::e( 'CANNOT_SAVE_DATA', $x->getMessage() ), SPC::WARNING, 0, __LINE__, __FILE__ );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function createEntry(){\n\t\t\t$con = Connection();\n\t\n\t\t\tif(!$con)\n\t\t\t{\n\t\t\t\t$arr_res = array();\n\t\t\t\t$arr_res['error'] = array(\"msg\" => \"no DB Connection\");\n\t\t\t\t$arr_res['result'] = array('status' => \"Failed\");\n\t\t\t\t$this->response($this->json($arr_res), 503);\n\t\t \t}\n\t\t \t$entityBody = file_get_contents('php://input');\n\t\t \t$myfile = fopen(\"newfile.txt\", \"w\") or die(\"Unable to open file!\");\n\t\t\t$txt = $entityBody;\n\t\t\tfwrite($myfile, $txt);\n\t\t\tfclose($myfile);\n\n \t\t\t$data = $this->convert_json_to_array($entityBody);\n \t\t\t\n \t\t\t$myfile2 = fopen(\"newfile2.txt\", \"w\") or die(\"Unable to open file!\");\n\t\t\t$txt2 = $data;\n\t\t\tfwrite($myfile2, $txt2);\n\t\t\tfclose($myfile2);\n\t\t\t$timeStamp= date(\"Y-m-d H:i:s\");\n\t\t\t$uid = $data['clientID'];\n\t\t\t$base64Image= $data['base64Image'];\n \t\t\t$query = \"INSERT INTO ringings (timeStamp, base64Image, uid) VALUES ('$timeStamp','$base64Image', '$uid')\"; \n \n\t\t\tif(!mysqli_query($con,$query))\n\t\t\t{\n\t\t\t\t\t$arr_res = array();\n\t\t\t\t\t$arr_res['error'] = array(\"msg\" => \"failed Adding Entry\");\n\t\t\t\t\t$arr_res['result'] = array('status' => \"Failed\");\n\t\t\t\t\t$this->response($this->json($arr_res), 417);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$last_id = $con->insert_id;\n\t\t\t\t$str_array = array('status' => \"Success\" ,'id' => $last_id, 'reply' => Null, 'base64Image' => $base64Image, 'uid' => $uid);\n\t\t\t\t\n\t\t\t\t$arr_res = array();\n\t\t\t\t$arr_res['error'] = $error;\n\t\t\t\t$arr_res['result'] = $str_array;\n\t\t\t\t$this->response($this->json($arr_res), 200);\t\n\t\t\t\t\n\t\t\t\t\n\t\t \t\t}\n\t\t \t\t\n\t\t \t$con->close();\n\t\t}", "public function write();", "public function write();", "abstract public function write( $key, $value );", "public static function export_entry($entry)\n {\n }", "function write_entry ( $blog_subject, $blog_text, $tb_ping, $updateFile, $blog_categories, $blog_relatedlink, $blog_date=NULL) {\n\t\t//\n\t\t// $updateFile will either be NULL or the name of the file\n\t\t// which is being updated (i.e. entry040603-140634)\n\t\tglobal $blog_config, $sb_info;\n\n\t\t$filename=CONFIG_DIR.'~blog_entry_listing.tmp';\n\t\tsb_delete_file( $filename );\n\t\t\n\t\t$save_data = array();\n\t\t$save_data[ 'VERSION' ] = $sb_info[ 'version' ];\n\t\t$save_data[ 'SUBJECT' ] = clean_post_text( $blog_subject );\n\t\t$save_data[ 'CONTENT' ] = sb_parse_url( clean_post_text( $blog_text ) );\n\n\t\tif ( count( $blog_categories ) > 0 ) {\n\t\t\t$save_data[ 'CATEGORIES' ] = implode( ',', $blog_categories );\n\t\t}\n\t\tif ( $tb_ping !== '' ) {\n\t\t\t$save_data[ 'TB_PING' ] = clean_post_text( $tb_ping );\n\t\t}\n\n\t\t// Read more link\n\t\tif ( $blog_relatedlink !== '' ) {\n\t\t\t$save_data[ 'relatedlink' ] = clean_post_text( $blog_relatedlink );\n\t\t}\n\t\t\n\t\t$save_data[ 'IP-ADDRESS' ] = getIP(); // New 0.4.8\n\n\t\tif ( $updateFile == true ) {\n\t\t\t// Updating an entry\n\t\t\t//\n\t\t\t// We need to grab the date of the old entry.\n\t\t\tif ( file_exists( $updateFile . '.txt' ) ) {\n\t\t\t\t$oldEntryFile = $updateFile . '.txt';\n\t\t\t} elseif ( file_exists( $updateFile . '.txt.gz' ) ) {\n\t\t\t\t$oldEntryFile = $updateFile . '.txt.gz';\n\t\t\t}\n\t\t\t$oldEntryArray = blog_entry_to_array( $oldEntryFile );\n\n\t\t\t$save_data[ 'CREATEDBY' ] = $oldEntryArray[ 'CREATEDBY' ]; // New 0.5.0\n\t\t\t$save_data[ 'DATE' ] = $oldEntryArray[ 'DATE' ];\n\t\t\t$y = date('y', $save_data[ 'DATE' ] );\n\t\t\t$m = date('m', $save_data[ 'DATE' ] );\n\t\t\t//$permalink = 'index.php?y='.$y.'&amp;m='.$m.'&amp;entry='.substr($updateFile,strrpos($updateFile,'/')+1);\n\t\t\t$permalink = 'index.php?entry=' . str_replace(' ', '-', $save_data[ 'SUBJECT' ]);\n\t\t\t\n\t\t\t// Delete the old file\n\t\t\tsb_delete_file( $updateFile . '.txt' );\n\t\t\tsb_delete_file( $updateFile . '.txt.gz' );\n\t\t\t\n\t\t\t$entryFile = $updateFile . '.txt';\n\t\t} else {\n\t\t\t// Create an entry\n\t\t\t//\n\t\t\t// This is going to be a new entry.\n\t\t\t// We might need to create some directories.\n\t\t\t//\n\t\t\t// The directory and file structure is:\n\t\t\t// 'content/YY/MM/entryYYMMDD-HHMMSS.txt'\n\t\t\t// 'F j, Y, g:i a'\n\t\t\tif (!$blog_date) {\n\t\t\t\t$blog_date = time();\n\t\t\t}\n\t\t\t\n\t\t\t$save_data[ 'DATE' ] = $blog_date;\n\t\t\t$save_data[ 'CREATEDBY' ] = $_SESSION[ 'username' ]; // New 0.5.0\n\t\t\t\n\t\t\t$dir = CONTENT_DIR;\n\t\t\t$y = date('y', $blog_date);\n\t\t\t$m = date('m', $blog_date);\n\t\t\t\n\t\t\t$stamp = date('ymd-His', $blog_date);\n\t\t\t$entryFile = $dir.$y.'/'.$m.'/'.'entry'.$stamp.'.txt';\n\t\t\t\n\t\t\t//$permalink = 'index.php?y='.$y.'&amp;m='.$m.'&amp;entry=entry'.$stamp;\n\t\t\t$permalink = 'index.php?entry=' . str_replace(' ', '-', $save_data[ 'SUBJECT' ]);\n\t\t}\n\t\t\n\t\t// Implode the array\n\t\t$str = implode_with_keys( $save_data );\n\t\t\n\t\t// Save the file\t\t\n\t\t$result = sb_write_file( $entryFile, $str );\n\t\t\n\t\t// Result\n\t\tif ( $result ) {\n\t\t\t// Send Pings\n\t\t\t$url_array = explode( ',', $blog_config->getTag('BLOG_PING_URLS') );\n\t\t\tif ( is_array( $url_array ) ) {\n\t\t\t\tfor ( $i = 0; $i < count( $url_array ); $i++ ) {\n\t\t\t\t\tsb_ping( $url_array[ $i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn ( true );\n\t\t} else {\n\t\t\t// Error:\n\t\t\t// Probably couldn't create file...\n\t\t\treturn ( $entryFile );\n\t\t}\n\t}", "public function addEntry($entry) {\n\t\t$this->_initDbConnection();\n\t\t\n\t\t// TODO: convert author into authorid\n\t\t$authorId = 0;\n\t\t\n\t\tif ($entry->author) {\n\t\t\t$authorId = $this->_getAuthorId($entry->author);\n\t\t}\n\t\t\n\t\t$stm = $this->_prepareStatement('entry', 'add');\n\t\t$stm->execute(array(\n\t\t\t':url' => $entry->url,\n\t\t\t':title' => $entry->title,\n\t\t\t':id' => $entry->id,\n\t\t\t\n\t\t\t':author_id' => $authorId,\n\t\t\t':summary' => (!empty($entry->summary))?$entry->summary:'',\n\t\t\t':content' => (!empty($entry->content))?$entry->content:'',\n\t\t\t\n\t\t\t':published' => strtotime($entry->published),\n\t\t\t':updated' => (!empty($entry->updated))?strtotime($entry->updated):0\n\n\t\t));\n\n\t\tif ($this->_isPdoError($stm)) {\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\treturn true;\n\t}", "public function testAddNewEntry()\n {\n $actual = $this->diaryService->addNewEntry($this->entryData);\n $entry = Entry::latest('created_at')->first();\n $expected = [\n 'message' => 'Entry added successfully!',\n 'statusCode' => 201,\n 'data' => null\n ];\n $this->assertEquals($expected, $actual);\n $this->assertDatabaseHas('entries', $entry->toArray());\n }", "public function write(): void\n {\n $this->writeAndReturnAffectedNumber();\n }", "public function write($key, $data)\n {\n }", "public function add($entry)\n {\n $this->log[] = $entry;\n while (\\count($this->log) > $this->size) {\n array_shift($this->log);\n }\n }", "public function add(array $entry);", "function add_or_update_publication_entry(&$entry, $bibtex_file, $ID=NULL) {\n $post = array(\n 'ID' => $ID, //Are you updating an existing post?\n 'post_content' => $this->createContent($entry), //The full text of the post.\n 'post_name' => $entry->getKey(), // The name (slug) for your post\n 'post_status' => 'publish',\n 'post_title' => $entry->getTitle(), //The title of your post.\n 'post_type' => __WP_PLUGIN__, //You may want to insert a regular post, page, link, a menu item or some custom post type\n ); \n $post_id = wp_insert_post( $post ); \n update_post_meta($post_id, 'bibtex', $bibtex_file);\n }", "public function creating(EntryInterface $entry)\n {\n $this->dispatchNow(new SetStrId($entry));\n\n parent::creating($entry);\n }", "public function creating(EntryInterface $entry)\n {\n $this->dispatchNow(new SetStrId($entry));\n\n parent::creating($entry);\n }", "public function creating(EntryInterface $entry)\n {\n $this->dispatchNow(new SetStrId($entry));\n\n parent::creating($entry);\n }", "public function addEntry(Arrayable $entry);", "function _write($id, $data) {\n $access = time();\n\n $this->_destroy($id);\n return ee()->db->insert($this->table_name, array(\n 'id' => $id,\n 'data' => $data,\n 'access' => $access\n ));\n }", "protected function _write() {\n\n if ( !empty( $this->rid ) && $this->rid instanceof ID ) {\n $this->cluster_id = $this->rid->cluster;\n $this->cluster_position = $this->rid->position;\n }\n\n $this->record->setRid( new ID( $this->cluster_id, $this->cluster_position ) );\n\n $this->_writeShort( $this->cluster_id );\n $this->_writeLong( $this->cluster_position );\n\n if( $this->_transport->getProtocolVersion() >= 23 ){\n $this->_writeBoolean( $this->update_content );\n }\n\n $this->_writeBytes( CSV::serialize( $this->record ) );\n $this->_writeInt( $this->record_version );\n $this->_writeChar( $this->record_type );\n $this->_writeBoolean( $this->mode );\n\n }", "protected function _write() {}", "public function writeEntry($str, $spanSec)\r\n\t{\r\n\t\tif( ($self = self::current()) != $this )\r\n\t\t\treturn $self->writeEntry($str, $spanSec);\r\n\r\n\t\t$this->entries []= [ \"source\" => $str, \"time\" => $spanSec * 1000, \"metadata\" => null ];\r\n\t}", "function add2log($filename,$entry,$debug=true){\n $TimeStamp = date(\"Y-m-dTH:i:s+0000\");\n $entry .= \"\\n\";\n $FileHandle=fopen($filename, \"a\");\n\n if($FileHandle){\n fwrite($FileHandle, \"[ $TimeStamp ] \".$entry);\n fclose($FileHandle);\n\n //~ If debug is enable we also print some infos to the console\n if($debug){ echo($entry); }\n }\n}", "function addPOSEntry()\n{\n\n}", "abstract protected function write();", "function &addEntry($entry) {\n $reuslt = NULL;\n if (is_object($entry) && is_a($entry, 'papaya_atom_entry')) {\n $result = $this->add();\n $result->assign($entry);\n }\n return $result;\n }", "public function p_newentry($trip_id) {\n if (empty($_POST['title'])) {\n Router::redirect(\"/trips/newentry/blank\");\n }\n \n $here = Geolocate::locate();\n $_POST['state'] = $here['state'];\n $_POST['city'] = $here['city'];\n $_POST['ip'] = $here['ip'];\n\n # Associate this trip with this user\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this trip was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n $_POST['pic_id'] = \"\";\n $_POST['trip_id'] = $trip_id;\n $_POST['vid'] = \"\";\n $_POST['comment_id'] = \"\";\n\n DB::instance(DB_NAME)->insert(\"entries\", $_POST);\n\n Router::redirect(\"/trips/dashboard/\".$trip_id);\n }", "public function writeItem($item)\n {\n $this->data[] = $item;\n }", "public function write() {\n\t\t$database = Registry::get(\"database\");\n\t\t$v = \"value='\" . $this -> value . \"'\";\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE server.configs SET \" . $v . \" WHERE key_='\" . $this -> key . \"'\");\n\t}", "public function creating(EntryInterface $entry)\n {\n $entry->setAttribute('str_id', str_random(24));\n\n parent::creating($entry);\n }", "public function addOneEntry($id)\n {\n // Connect to db\n $user = new User();\n $user->setDb($this->di->get(\"db\"));\n // Get the user\n $user->find(\"id\", $id);\n // Add one to entry\n $user->entries += 1;\n // Save to database\n $user->save();\n }", "public static function createEntry(array $entry)\n {\n return DB::table(static::$schema)->insert($entry);\n }", "public function addEntry()\n\t{\n\t\t//Get all data\n\t\t$data = \\Input::all();\n\t\t//Get the user id of the currently logged in user\n\t\t$userId = Sentry::getUser()->id;\n\t\t//Add Data\n\t\t$result = $this->timesheet->addEntry($data,$userId);\n\n\n\t\t//代辦事項\n\t\t$userId = (int) \\Sentry::getUser()->id;\n\t\t$result_todo = $this->timesheet->postTodos($data, $userId);\n\n\t\t$result_calendar = $this->timesheet->addcalendar($data,$userId);\n\n\t\t//Redirect with appropriate message to the user\n\t\tif($result == 'success')\n\t\t{\n\t\t\treturn \\Redirect::to('dashboard/timesheet')->with('status','success')->with('message','Entry Added');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \\Redirect::to('dashboard/timesheet')->with('status','error')->with('message','Something Went Wrong. Please try again.');\n\t\t}\n\n\t}", "abstract protected function _write();", "public function store() {\n $logData = \"=========================================\\n\";\n $logData .= \"Date Time: \".$this->record_date.\"\\n\";\n $logData .= $this->title.\" (\".$this->type.\") \\n\";\n if(!empty($this->data)) {\n $logData .= var_export($this->data, true).\"\\n\";\n }\n \n file_put_contents($this->file, $logData, FILE_APPEND);\n \n }", "public function addOrUpdateEntry($db, $title, $body, $entry_id = NULL) {\n if ($entry_id) {\n $sql = 'UPDATE posts SET title = ?, body = ? WHERE id = ?';\n } else {\n $sql = 'INSERT INTO posts(title, body) VALUES(?, ?)';\n }\n\n try {\n $results = $db->prepare($sql);\n $results->bindValue(1, $title, PDO::PARAM_STR);\n $results->bindValue(2, $body, PDO::PARAM_STR);\n if ($entry_id) {\n $results->bindValue(3, $entry_id, PDO::PARAM_INT);\n }\n $results->execute();\n } catch (Exception $e) {\n echo $e->getMessage();\n return false;\n }\n return true;\n }", "public function write(string $key, $value, int $ttl = null);", "public function add_entry($entry)\r\n {\r\n if (is_array($entry)) {\r\n $entry = new Translation_Entry($entry);\r\n }\r\n $key = $entry->key();\r\n if (false === $key) {\r\n return false;\r\n }\r\n $this->entries[$key] = &$entry;\r\n return true;\r\n }", "protected function write()\n {\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->storage);\n }", "public function onWrite();", "private function _setEntry($alias, $entry) \n {\n $this->_entries[$alias] = $entry;\n return;\n }", "public function write()\n {\n }", "public function log(SihnonFramework_LogEntry $entry) {\n $fields = $entry->fields();\n $types = $entry->types();\n $values = $entry->values();\n \n $bindings = array();\n for ($i = 0, $l = count($fields); $i < $l; ++$i) {\n $type = '';\n switch ($types[$i]) {\n case 'int':\n $type = PDO::PARAM_INT;\n break;\n case 'bool':\n $type = PDO::PARAM_BOOL;\n break;\n default:\n $type = PDO::PARAM_STR;\n break;\n }\n \n $bindings[] = array(\n 'name' => $fields[$i],\n 'value' => $values[$i],\n 'type' => $type, \n );\n }\n \n $field_list = join(', ', $fields);\n $bindings_list = join(', ', array_map(function($value) { return \":{$value}\"; }, $fields));\n \n $this->database->insert(\"INSERT INTO {$this->table} ({$field_list}) VALUES({$bindings_list})\", $bindings);\n }", "public function write($name, $content);", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function Update($entry) {\n $sql_entries_helper = new VCFF_Reports_Helper_SQL_Entries();\n // Add the entry\n $sql_entries_helper\n ->Add_Entry($entry['store_entry']);\n // If there is meta to store\n if (isset($entry['store_fields']) && is_array($entry['store_fields'])) {\n // Loop through each field\n foreach ($entry['store_fields'] as $machine_code => $field_data) { \n // Add the entry\n $sql_entries_helper->Add_Field_Item($field_data);\n }\n }\n // If there is meta to store\n if (isset($entry['store_meta']) && is_array($entry['store_meta'])) {\n // Loop through each field\n foreach ($entry['store_meta'] as $meta_code => $meta_data) {\n // Add the entry\n $sql_entries_helper->Add_Meta_Item($meta_data);\n }\n }\n // Store the changes\n $sql_entries_helper->Store();\n }", "public function write($event)\n {\n $fields = array(\n $this->_options['fieldMessage'] => $event['message'],\n $this->_options['fieldLevel'] => $event['level'],\n );\n\n $this->_db->insert($this->_table, $fields);\n return true;\n }", "public function save() {\r\n /** probably we should add a timestamp, Item ID and stuff */\r\n $stored_data = json_encode(array($this->name, $this->status), JSON_UNESCAPED_UNICODE);\r\n $this->db_write(\"objects\", \"Item_s11n\", $stored_data);\r\n print ($stored_data);\r\n }", "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}", "protected function _write($event)\n {\n $this->logs[] = $event;\n }", "function insertEntry(&$request, $newRowId) {\n\n\t\t$application =& PKPApplication::getApplication();\n\t\t$request =& $application->getRequest();\n\n\t\t$categoryId = $newRowId['name'];\n\t\t$categoryDao =& DAORegistry::getDAO('CategoryDAO');\n\t\t$monographDao =& DAORegistry::getDAO('MonographDAO');\n\t\t$press =& $request->getPress();\n\t\t$monograph =& $this->getMonograph();\n\n\t\t$category =& $categoryDao->getById($categoryId, $press->getId());\n\t\tif (!$category) return true;\n\n\t\t// Associate the category with the monograph\n\t\t$monographDao->addCategory(\n\t\t\t$monograph->getId(),\n\t\t\t$categoryId\n\t\t);\n\t}", "function put() \n {\n \n }", "public function addEntry(EntryInterface $entry)\n {\n $this->entries[] = $entry;\n }", "function write()\n {\n\trequire(\"mysql.php\");\n\t$sql = \"INSERT INTO `team2GuestDB`.`GuestBook` (`id`, `name`, `msg`, `timestamp`) VALUES (NULL, :name, :msg, CURRENT_TIMESTAMP)\";\n\t$stm = $dbh->prepare($sql);\n\t$stm->execute(array(':name' => $_POST['name'],':msg' => $_POST['con']));\n }", "public function store(EntryRequest $request)\n {\n $input = $request->all();\n// dd($input);\n $entry = $this->entryRepository->create($input);\n\n Flash::success(__('cms.entries.saved_success'));\n\n return Input::get('_previous_') ? redirect(Input::get('_previous_')) : redirect(route('cms.entries.index'));\n\n }", "protected function write(array $record)\n {\n $data = $record['formatted'];\n $meta = $data['meta'];\n unset($data['meta']);\n\n $this->client->insert($meta['key'], $data, $meta['expireTime']);\n }", "abstract public function write($data);", "public function _write($data)\n {\n }", "function write_info_file($dir,$name){\n\t$info = json_decode(file_get_contents($dir.'_info.json'));\n\n\tdate_default_timezone_set('Europe/Minsk');\n\n\t$newObject = new stdClass;\n\t$newObject->name = $name;\n\t$newObject->created = date(\"d.m.Y / H:i:s\");\n\n\tarray_push($info,$newObject);\n\t$file = json_encode($info);\n\n\t$fp = fopen($dir.'_info.json', 'w');\n\tfwrite($fp,$file);\n\tfclose($fp);\n}", "public function onSaveEntry(SproutForms_OnSaveEntryEvent $event)\n\t{\n\t\t$this->raiseEvent('onSaveEntry', $event);\n\t}", "public function save_new_record() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$db_data = $this->get_db_data();\r\n\r\n\t\t$table_name = $wpdb->prefix . CTF_POSTS_TABLE;\r\n\t\t$data = array(\r\n\t\t\t'twitter_id' => $db_data['twitter_id'],\r\n\t\t\t'created_on' => $db_data['created_on'],\r\n\t\t\t'last_requested' => $db_data['last_requested'],\r\n\t\t\t'time_stamp' => $db_data['time_stamp'],\r\n\t\t\t'json_data' => $db_data['json_data'],\r\n\t\t\t'media_id' => $db_data['media_id'],\r\n\t\t\t'sizes' => $db_data['sizes'],\r\n\t\t\t'aspect_ratio' => $db_data['aspect_ratio'],\r\n\t\t\t'images_done' => $db_data['images_done']\r\n\t\t);\r\n\t\t$format = array(\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%d',\r\n\t\t\t'%d'\r\n\t\t);\r\n\t\t$error = $wpdb->insert( $table_name, $data, $format );\r\n\r\n\t\tif ( $error !== false ) {\r\n\t\t\t$insert_id = $wpdb->insert_id;\r\n\r\n\t\t\t$this->db_id = $insert_id;\r\n\t\t\t$this->insert_ctf_feeds_posts();\r\n\t\t} else {\r\n\t\t\t// log error\r\n\t\t}\r\n\t}", "public function write($debugLevel, $entryType, $message)\n {\n if (CoreConfig::DEBUG >= $debugLevel)\n {\n if (!$this->sthWritten)\n {\n $this->sthWritten = true;\n $this->fhandle = @fopen($this->filepath, $this->fmode);\n if ($this->fhandle === false)\n {\n throw new IOException('Could not open logfile \"' . $this->logname . '.log.txt\" for writing! Check file permissions!');\n }\n $this->write(0, 'info', '----------> Log opened <----------');\n }\n $timestamp = date('d.m. H:i:s');\n $message = str_replace(\"\\n\", ' ', $message);\n $message = str_replace(\"\\r\", ' ', $message);\n @fwrite($this->fhandle, \"[$timestamp][$entryType] $message\\n\");\n if ($this->backtrace)\n {\n ob_start();\n debug_print_backtrace();\n $trace = ob_get_clean();\n\n @fwrite($this->fhandle, $trace . \"\\n=================\\n\\n\");\n }\n }\n }", "function newEntry( $args = null, $entry = null)\n { \n\t\t// default duration of a new activity\n\t\t$duration = (int)($_SESSION[$this->appName]['preferences']['duration']?$_SESSION[$this->appName]['preferences']['duration']:'3600');\n\n \t// no predefined activity time\n if( is_numeric($args['activity_start']) == true )\n {\n\t\t\t// when a user clicks on the visual calendar\n\t\t\t// the format is number of seconds not string date/time\n\t\t \t$entry['activity_start'] = gmdate( 'Y-m-d H:i:s', $args['activity_start']);\n\t $entry['activity_end'] = gmdate( 'Y-m-d H:i:s', (int)$args['activity_start']+$duration);\n\t unset($args['activity_start']);\n\t }\n\t else if( isset($args['activity_start']) == false )\n\t {\n\t \t// when a new activity is created as a related record\n\t\t\t$start = round((int)(strtotime('+0 hour')/60),-1)*60;\n\t $entry['activity_start'] = gmdate( 'Y-m-d H:i', $start);\n\t $entry['activity_end'] = gmdate( 'Y-m-d H:i', $start+$duration);\n\t\t} \n\t\t\n\t\t$entry['type_id'] = $_SESSION[$this->appName]['preferences']['type_id']?$_SESSION[$this->appName]['preferences']['type_id']:'CA';\n\t\t$entry['status_id'] = $_SESSION[$this->appName]['preferences']['status_id']?$_SESSION[$this->appName]['preferences']['status_id']:'SC';\n $entry['priority_id'] = $_SESSION[$this->appName]['preferences']['priority_id']?$_SESSION[$this->appName]['preferences']['priority_id']:'NO'; \n $entry['reminder_email'] = $_SESSION[$this->appName]['preferences']['reminder_email']?$_SESSION[$this->appName]['preferences']['reminder_email']:''; \n $entry['reminder_popup'] = $_SESSION[$this->appName]['preferences']['reminder_popup']?$_SESSION[$this->appName]['preferences']['reminder_popup']:''; \n\t\t$entry['is_allday'] = 'N';\n\n\t\treturn parent::newEntry( $args, $entry);\n }", "private function insert_entry_qual()\n {\n global $DB;\n $params = $this->get_params();\n $this->id = $DB->insert_record('subject', $params);\n }", "protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }", "protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t\t//---------------------\n\t\tif (($handle = fopen($this->_origin, \"r\")) !== FALSE)\n\t\t{\n $tasksTag = new SimpleXMLElement(\"<tasks></tasks>\");\n foreach($this->_data as $key => $record){\n $taskTag = $tasksTag->addChild(\"task\");\n foreach($this -> _fields as $value){\n $taskTag->addAttribute($value, $record->$value);\n }\n }\n /*\n $newsXML->addAttribute('newsPagePrefix', 'value goes here');\n $newsIntro = $newsXML->addChild('content');\n $newsIntro->addAttribute('type', 'latest');\n Header('Content-type: text/xml');\n echo $newsXML->asXML();*/\n\n $tasksTag -> asXML ($this -> _origin);\n \n\t\t}\n\t\t// --------------------\n\t}", "abstract protected function write(array $record);", "function move_entry ( $oldTime, $newTime ) {\n\t\t//\n\t\t// oldTime = unix timestamp\n\t\t// newTime = unix timestamp\n\t\tglobal $blog_config, $sb_info;\n\t\t\n\t\t// Delete blog entry cache file.\n\t\tsb_delete_file( CONFIG_DIR.'~blog_entry_listing.tmp' );\n\t\t\n\t\t// Create directory structure for new entry:\n\t\t// content/YY/MM/entryYYMMDD-HHMMSS.txt\n\t\t\n\t\t$dir = CONTENT_DIR;\n\t\t\n\t\t$oldY = date('y', $oldTime);\n\t\t$oldM = date('m', $oldTime);\n\t\t$oldStamp = date('ymd-His', $oldTime);\n\t\t\n\t\t$newY = date('y', $newTime);\n\t\t$newM = date('m', $newTime);\n\t\t$newStamp = date('ymd-His', $newTime);\n\t\t\n\t\tif ( sb_create_folder($dir.$newY) == false ) {\n\t\t\treturn ( 'Couldn\\'t create directory: '.$dir.$newY );\n\t\t}\n\t\t\n\t\tif ( sb_create_folder($dir.$newY.'/'.$newM) == false ) {\n\t\t\treturn ( 'Couldn\\'t create directory: '.$dir.$newY.'/'.$newM );\n\t\t}\n\t\t\n\t\t// Comment, Rating, and View Counter Folder\n\t\tif ( file_exists($dir.$oldY.'/'.$oldM.'/'.'entry'.$oldStamp) ) {\n\t\t\tif ( sb_create_folder($dir.$newY.'/'.$newM.'/'.'entry'.$newStamp) == false ) {\n\t\t\t\treturn ( 'Couldn\\'t create directory: '.$dir.$newY.'/'.$newM.'/'.'entry'.$newStamp );\n\t\t\t}\n\t\t\t\n\t\t\tsb_copy($dir.$oldY.'/'.$oldM.'/'.'entry'.$oldStamp,$dir.$newY.'/'.$newM.'/'.'entry'.$newStamp);\n\t\t}\n\t}", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "private function write(Issue $issue)\n\t{\n\t\t$this->writePriority($issue);\n\t\t$this->writeStatus($issue);\n\t\t// update existing issue\n\t\tif ($existing_issue = Dao::searchOne(['number' => $issue->number], Issue::class)) {\n\t\t\t/** @var $existing_issue Issue */\n\t\t\tDao::replace($issue, $existing_issue);\n\t\t}\n\t\t// create new issue\n\t\telse {\n\t\t\tDao::write($issue);\n\t\t}\n\t}", "function write()\n {\n }", "public function postInsert(Model $model, $entry) {\n $logModel = $model->getOrmManager()->getModel(EntryLogModel::NAME);\n $logModel->logInsert($model, $entry);\n }", "public function saved(EntryInterface $entry)\n {\n parent::saved($entry);\n\n $this->dispatch(new DumpPages());\n }", "function insert ($tablename, $newRow) \n\t{\n\t\t$lockfp = $this->getLock($tablename);\t\t\t\n\t\t$this->tables[$tablename][] = $newRow;\n\t\t$this->writeTable($tablename);\n\t\t$this->releaseLock($lockfp);\n\t}", "function addEntry($title, $date, $time_spent, $learned, $resources)\n{\n //Including the access php file\n include(\"access.php\");\n\n //Writing query to add tags to database\n $sql = 'INSERT INTO entries (title, date, time_spent, learned, resources) VALUES (?, ?, ?, ?, ?)';\n\n //Using a try-catch block to add info\n try\n {\n $results = $db->prepare($sql);\n $results->bindValue(1,$title,PDO::PARAM_STR);\n $results->bindValue(2,$date,PDO::PARAM_STR);\n $results->bindValue(3,$time_spent,PDO::PARAM_STR);\n $results->bindValue(4,$learned,PDO::PARAM_STR);\n $results->bindValue(5,$resources,PDO::PARAM_STR);\n $results->execute();\n } \n catch (Exception $e)\n {\n //Creating a error message\n echo \"Sorry!, Can't add journal entry.\" . $e->getMessage();\n exit;\n }\n\n //Returning results\n return $results;\n}", "public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }", "abstract public function addEntry($long_url, $short_uri = null);", "public function set(string $entryIdentifier, $data, array $tags = [], int $lifetime = null);", "public function write($row, $column, $data, $format = null, $data_type = -1) {\n\t}", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validator = Validator::make($input,\n\t\t\tarray(\n\t\t\t\t'date' => 'required',\n\t\t\t\t'difference' => 'required',\n\t\t\t\t'invoice_id' => '',\n\t\t\t\t'description' => 'required',\n\t\t\t\t'notes' => ''\n\t\t\t\t)\n\t\t\t);\n\n\t\tif ($validator->fails()) {\n\t\t\techo 'Uh oh, you bad. Error: ' . var_dump($validator->messages()) . '.';\n\t\t} else {\n\t\t\t$entry = new Entry();\n\t\t\t$entry->date = Input::get('date');\n\t\t\t$entry->difference = Input::get('difference');\n\t\t\t$entry->invoice_id = Input::get('invoice_id');\n\t\t\t$entry->description = Input::get('description');\n\t\t\t$entry->notes = Input::get('notes');\n\n\t\t\t$entry->save();\n\n\t\t\treturn Redirect::to('/')->with('result', 'Entry created.');\n\t\t}\n\t}" ]
[ "0.7107508", "0.69756746", "0.6588481", "0.633708", "0.62820166", "0.6186649", "0.61229306", "0.6100941", "0.60085636", "0.598664", "0.59797263", "0.5969486", "0.5954676", "0.59406596", "0.59089935", "0.58997744", "0.58997744", "0.5881971", "0.58520186", "0.5849974", "0.5849974", "0.58467996", "0.5833445", "0.5823852", "0.57894087", "0.5776726", "0.5746921", "0.57318026", "0.57023114", "0.5614223", "0.5597826", "0.5588365", "0.5588365", "0.5588365", "0.5548943", "0.5543865", "0.5536389", "0.55358475", "0.55147094", "0.55125314", "0.5495258", "0.54793096", "0.5478559", "0.54721797", "0.5453623", "0.5432638", "0.5428939", "0.54152507", "0.5406661", "0.54033357", "0.53914034", "0.5387134", "0.53847414", "0.53745735", "0.53696585", "0.5357373", "0.53309685", "0.5283096", "0.52790767", "0.5270296", "0.52618617", "0.5258817", "0.5258817", "0.5258817", "0.5258817", "0.5257488", "0.52509344", "0.5241289", "0.52299213", "0.52293104", "0.522843", "0.52225775", "0.52216053", "0.5220246", "0.52019584", "0.51862854", "0.51784164", "0.5171568", "0.51659167", "0.5158787", "0.51574826", "0.5151977", "0.51500344", "0.51440156", "0.51352036", "0.5128154", "0.5124548", "0.5114858", "0.5114437", "0.5113161", "0.51070523", "0.51024896", "0.50992423", "0.5095802", "0.5093695", "0.5091325", "0.5085479", "0.50673324", "0.50621575", "0.5060328", "0.50547296" ]
0.0
-1
Must be accessible from outside, as this is a callback
public function enqueueEvent(& $event) { while (true) { try { $id = $this->redis()->lpush('icinga:events', $event); Logger::debug('(icingadb) Stored id %d', $id); return; } catch (Exception $e) { Logger::error( '(icingadb) Could not enqueue event to redis, will retry: %s', $e->getMessage() ); $this->redis = null; sleep(5); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function callback();", "function handle_callback() {\r\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "abstract protected function registerCallback();", "private function onCompletion()\n {\n }", "function completeCallback()\r\n { }", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "function handle() ;", "public function onloadCallback();", "public function after_run(){}", "function cb_init(){\n\t}", "protected function buildAccessCallback() {\n }", "public function run() {}", "public function after_run() {}", "public function run()\n\t{\n\t\t//\n\t}", "function feedTheLoader() {\n\t\n}", "function getCallback()\n {\n return $this->callback;\n }", "public function _get_update_callback()\n {\n }", "protected function _request() {}", "public function onDownloaded()\n {\n }", "public function onDownloaded()\n {\n }", "protected function _response() {}", "abstract protected function _run();", "abstract protected function _run();", "public function run()\r\n {\r\n\r\n }", "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() {}", "public function helper()\n\t{\n\t\n\t}", "public function onRun()\n {\n }", "public function getDefaultCallback();", "private function __() {\n }", "public function testEventCallBackGet()\n {\n }", "function callback_file(array $args)\n {\n }", "public function run(){}", "public function handle() {}", "public function run()\n {\n //\n \n }", "abstract public function handler() : void;", "abstract protected function handle();", "public function testEventCallBackGetItem()\n {\n }", "public function INTincScript_processCallback() {}", "protected function onInit() {}", "public function done();", "function after_update() {}", "protected function finish() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "public function __invoke()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "protected function after(){}", "protected function after(){}", "protected function after(){}", "public function after_update() {}", "public function afterLoad() { }", "public function waiting_requester(){\n\n }", "public function run()\n {\n }", "public function get_handler()\n {\n }", "private function init()\n\t{\n\t\treturn;\n\t}", "protected function __init__() { }", "public function take_action()\n {\n }", "public function take_action()\n {\n }", "protected abstract function onExecute();", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "protected function init() {return;}", "function get_handler() {\r\n }", "public function _on_initialize()\n {\n }", "protected function _exec()\n {\n }", "public function get_callback()\n\t{\n\t\treturn $this->callback;\n\t}", "public function isGetOneSourceCollectionCalledCallback() {}", "protected abstract function run();", "protected function process()\n {}", "public function run()\n {\n //leeg private\n\n }", "public function run() {\n }", "private function callCallback() {\n\t\tif ($this->callback !== null) {\n\t\t\t$response = $this->buildResponse();\n\t\t\tcall_user_func($this->callback, $response, $this->data);\n\t\t}\n\t}", "public function getCallback() {\n return $this->callback;\n }", "public function getCallbackAction() {}", "public function __init(){}" ]
[ "0.7388628", "0.630597", "0.62317413", "0.62317413", "0.62303215", "0.62303126", "0.62303126", "0.6175155", "0.61318266", "0.59952855", "0.59595156", "0.59595156", "0.59595156", "0.59595156", "0.5898733", "0.58762044", "0.58717173", "0.5867803", "0.58367974", "0.58121383", "0.5801451", "0.57662153", "0.57577664", "0.5746052", "0.5722937", "0.57216173", "0.57091385", "0.57091385", "0.5697993", "0.56923336", "0.56923336", "0.5676158", "0.5671813", "0.5671813", "0.5671813", "0.5671813", "0.56707835", "0.56707835", "0.56707835", "0.56707835", "0.56707835", "0.56707835", "0.56699514", "0.56699514", "0.5665499", "0.5658538", "0.56191385", "0.5610743", "0.55980814", "0.5597409", "0.5591483", "0.5577232", "0.55750763", "0.55747837", "0.55730283", "0.55726093", "0.55564284", "0.5551146", "0.5540467", "0.55395454", "0.55382836", "0.5536152", "0.5536152", "0.5536152", "0.5536152", "0.5531738", "0.5522092", "0.5522092", "0.5522092", "0.5519315", "0.5519315", "0.5519315", "0.5515523", "0.5515523", "0.5515523", "0.5512922", "0.5511953", "0.5511505", "0.5510759", "0.55089253", "0.5508576", "0.55046237", "0.55025256", "0.55025256", "0.5502264", "0.55013376", "0.55013376", "0.54990554", "0.54962426", "0.5493172", "0.5491056", "0.5483327", "0.5480229", "0.54786044", "0.5474034", "0.5471064", "0.5469883", "0.5466682", "0.54654074", "0.546518", "0.54651505" ]
0.0
-1
Gets the public 'routing.loader' shared service.
public static function do($container, $lazyLoad = true) { include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\config\\Loader\\LoaderInterface.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\config\\Loader\\Loader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\config\\Loader\\DelegatingLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\framework-bundle\\Routing\\DelegatingLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\config\\Loader\\LoaderResolverInterface.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\config\\Loader\\LoaderResolver.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\config\\Loader\\FileLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\Configurator\\Traits\\HostTrait.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\Configurator\\Traits\\LocalizedRouteTrait.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\Configurator\\Traits\\PrefixTrait.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\XmlFileLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\config\\FileLocatorInterface.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\config\\FileLocator.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\http-kernel\\Config\\FileLocator.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\YamlFileLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\PhpFileLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\GlobFileLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\DirectoryLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\ObjectLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\ContainerLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\AnnotationClassLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\framework-bundle\\Routing\\AnnotatedRouteControllerLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\AnnotationFileLoader.php'; include_once \dirname(__DIR__, 4).'\\vendor\\symfony\\routing\\Loader\\AnnotationDirectoryLoader.php'; $a = new \Symfony\Component\Config\Loader\LoaderResolver(); $b = new \Symfony\Component\HttpKernel\Config\FileLocator(($container->services['kernel'] ?? $container->get('kernel', 1))); $c = new \Symfony\Bundle\FrameworkBundle\Routing\AnnotatedRouteControllerLoader(($container->privates['annotations.cached_reader'] ?? $container->getAnnotations_CachedReaderService())); $a->addLoader(new \Symfony\Component\Routing\Loader\XmlFileLoader($b)); $a->addLoader(new \Symfony\Component\Routing\Loader\YamlFileLoader($b)); $a->addLoader(new \Symfony\Component\Routing\Loader\PhpFileLoader($b)); $a->addLoader(new \Symfony\Component\Routing\Loader\GlobFileLoader($b)); $a->addLoader(new \Symfony\Component\Routing\Loader\DirectoryLoader($b)); $a->addLoader(new \Symfony\Component\Routing\Loader\ContainerLoader(new \Symfony\Component\DependencyInjection\Argument\ServiceLocator($container->getService, [ 'kernel' => ['services', 'kernel', 'getKernelService', false], ], [ 'kernel' => 'App\\Kernel', ]))); $a->addLoader($c); $a->addLoader(new \Symfony\Component\Routing\Loader\AnnotationDirectoryLoader($b, $c)); $a->addLoader(new \Symfony\Component\Routing\Loader\AnnotationFileLoader($b, $c)); return $container->services['routing.loader'] = new \Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader($a, ['utf8' => true], []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 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 getVictoireCore_RoutingLoaderService()\n {\n return $this->services['victoire_core.routing_loader'] = new \\Victoire\\Bundle\\CoreBundle\\Route\\RouteLoader(array());\n }", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader() {\n\t\treturn $this->loader;\n\t}", "public function get_loader()\n {\n return $this->loader;\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 getRouting_Loader_YamlService()\n {\n return $this->services['routing.loader.yaml'] = new \\Symfony\\Component\\Routing\\Loader\\YamlFileLoader(${($_ = isset($this->services['file_locator']) ? $this->services['file_locator'] : $this->getFileLocatorService()) && false ?: '_'});\n }", "protected function getTemplating_LoaderService()\n {\n return $this->services['templating.loader'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader(${($_ = isset($this->services['templating.locator']) ? $this->services['templating.locator'] : $this->getTemplating_LocatorService()) && false ?: '_'});\n }", "public function getLoader()\n {\n return $this->loader;\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 }", "static private function _getLoader() {\n\t\tif(self::isNull(self::$_loader)) {\n\t\t\tself::$_loader = Loader::getImageLoader(self::webiny()->getConfig()->get('components.image'));\n\t\t}\n\n\t\treturn self::$_loader;\n\t}", "protected function 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 }", "protected function getLoader()\n {\n }", "protected function getRegistryLoader()\n {\n return $this->registryLoader;\n }", "private function getLoader(): FilesystemLoader\n {\n if (null == $this->loader) {\n $this->loader = new FilesystemLoader(\n $this->locations\n );\n }\n return $this->loader;\n }", "protected function initLoader()\n {\n $config = $this->di->getShared('config');\n $loader = new Loader;\n $loader->registerNamespaces(\n [\n 'Phosphorum\\Models' => $config->get('application')->modelsDir,\n 'Phosphorum\\Controllers' => $config->get('application')->controllersDir,\n 'Phosphorum\\Forms' => $config->get('application')->formsDir,\n 'Phosphorum' => $config->get('application')->libraryDir\n ]\n );\n\n $loader->register();\n $this->di->setShared('loader', $loader);\n\n return $loader;\n }", "protected function getStepsLoaderService()\n {\n if (isset($this->shared['steps_loader'])) return $this->shared['steps_loader'];\n\n $class = $this->getParameter('steps_loader.class');\n $instance = new $class($this->getParameter('steps.path'), $this);\n $this->shared['steps_loader'] = $instance;\n\n return $instance;\n }", "public static function getAppLoader() {\n return self::$appLoader;\n }", "public function getPageLoader() {\n return $this->pageLoader;\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 static function getInstance() : Loader{\n return self::$instance;\n }", "private function loader()\n {\n return new ServiceDescriptionLoader();\n }", "public static function get_loader() {\n if (self::$loader == null) {\n self::$loader = new Autoloader();\n }\n /**\n * Unlike our previous singleton, in order to have this class automatically load our classes it is necessary to use the spl_autoload_register function before returning the instance.\n * \n * This function takes an array as the first parameter which holds the class name of an autoloading method we want to call, followed by the method name.\n */\n spl_autoload_register(array('Autoloader', 'class_loader'), true, false);\n /**\n * The second and third parameters are boolean values. The first specifies whether the function should throw exceptions (errors) if the class_loader() method can not be registered and should be set to true.\n * \n * The second specifies that this autoloader method should be moved to the top of the queue if there are multiple autoloaders and should beset to false as we will want this autoloader to come after another autoloader we will be importing.\n */\n return self::$loader;\n }", "public static function loader()\r\n {\r\n if(is_null(self::$instance))\r\n self::$instance = new self();\r\n return self::$instance;\r\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 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 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 getClassLoaderService()\n {\n $this->services['class_loader'] = $instance = new \\phpbb\\class_loader('phpbb\\\\', './../includes/', 'php');\n\n $instance->register();\n $instance->set_cache(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n return $instance;\n }", "public function config() : LoaderInterface {\n return $this -> loader;\n }", "protected function getTemplate_Twig_LoaderService()\n {\n return $this->services['template.twig.loader'] = new \\phpbb\\template\\twig\\loader(${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'});\n }", "protected function getLoader() : FilteredLoaderInterface\n {\n return $this->loader;\n }", "public static function init(){\n if( self::$loader == null ){\n self::$loader = new self();\n }\n return self::$loader;\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 static function loader()\n\t{\n\t\treturn static::$_parser_loader;\n\t}", "protected function getFilesystemLoader() : PregMatchFilteredLoaderInterface\n {\n return $this->filesystemLoader;\n }", "public static function get_instance() {\n\n\t\tif ( ! isset( self::$instance ) || ! ( self::$instance instanceof self ) ) {\n\t\t\tself::$instance = new Loader();\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "protected function getUserLoaderService()\n {\n return $this->services['user_loader'] = new \\phpbb\\user_loader(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, './../', 'php', 'phpbb_users');\n }", "public function getLoader()\n {\n if (null === $this->loader) {\n throw new LogicException('You must set a loader first.');\n }\n\n return $this->loader;\n }", "protected function getTranslation_Loader_ResService()\n {\n return $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader();\n }", "public function getLoader()\n {\n if (null === $this->loader) {\n throw new LogicException('You must set a loader first.');\n }\n return $this->loader;\n }", "public function getLoader()\n {\n if ('file' === $this->source) {\n return new DefinitionManagerFileLoader($this->container, $this->definitionFile);\n } else {\n return new DefinitionManagerDoctrineLoader($this->container, $this->emName);\n }\n }", "protected function 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 get_loader($key)\n {\n }", "protected function getTwig_LoaderService()\n {\n $this->services['twig.loader'] = $instance = new \\Symfony\\Bundle\\TwigBundle\\Loader\\FilesystemLoader(${($_ = isset($this->services['templating.locator']) ? $this->services['templating.locator'] : $this->getTemplating_LocatorService()) && false ?: '_'}, $this->get('templating.name_parser'), $this->targetDirs[3]);\n\n $instance->addPath(($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views'), 'Framework');\n $instance->addPath(($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Resources/views'), 'Security');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TwigBundle/Resources/views'), 'Twig');\n $instance->addPath(($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views'), 'Twig');\n $instance->addPath(($this->targetDirs[3].'/vendor/symfony/swiftmailer-bundle/Resources/views'), 'Swiftmailer');\n $instance->addPath(($this->targetDirs[3].'/vendor/doctrine/doctrine-bundle/Resources/views'), 'Doctrine');\n $instance->addPath(($this->targetDirs[3].'/vendor/a2lix/translation-form-bundle/A2lix/TranslationFormBundle/Resources/views'), 'A2lixTranslationForm');\n $instance->addPath(($this->targetDirs[3].'/vendor/willdurand/js-translation-bundle/Resources/views'), 'BazingaJsTranslation');\n $instance->addPath(($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/views'), 'TroopersAlertify');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/views'), 'FOSUser');\n $instance->addPath(($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/views'), 'FOSUser');\n $instance->addPath(($this->targetDirs[3].'/vendor/liip/imagine-bundle/Resources/views'), 'LiipImagine');\n $instance->addPath(($this->targetDirs[3].'/vendor/knplabs/knp-menu-bundle/Resources/views'), 'KnpMenu');\n $instance->addPath(($this->targetDirs[3].'/vendor/snc/redis-bundle/Resources/views'), 'SncRedis');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/views'), 'VictoireBlog');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/views'), 'VictoireBusinessEntity');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/views'), 'VictoireBusinessPage');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/views'), 'VictoireCore');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/views'), 'VictoireForm');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/views'), 'VictoireMedia');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/views'), 'VictoirePage');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/views'), 'VictoireSeo');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/views'), 'VictoireSitemap');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/views'), 'VictoireTemplate');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TwigBundle/Resources/views'), 'VictoireTwig');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UIBundle/Resources/views'), 'VictoireUI');\n $instance->addPath(($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/views'), 'VictoireUser');\n $instance->addPath(($this->targetDirs[3].'/app/Resources/views'));\n $instance->addPath(($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form'));\n $instance->addPath(($this->targetDirs[3].'/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views'));\n\n return $instance;\n }", "public abstract function get_loader_name();", "protected function getTranslation_Loader_PoService()\n {\n return $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader();\n }", "protected function getFeaturesLoaderService()\n {\n $class = $this->getParameter('features_loader.class');\n $instance = new $class($this->getParameter('features.path'), $this);\n\n return $instance;\n }", "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 }", "public function newLoader()\n {\n $loader = substr(get_class($this), 0, -9) . 'Loader';\n\n return app()->make($loader, ['extension' => $this]);\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 }", "protected function getLiipImagine_Binary_Loader_DefaultService()\n {\n return $this->services['liip_imagine.binary.loader.default'] = new \\Liip\\ImagineBundle\\Binary\\Loader\\FileSystemLoader($this->get('liip_imagine.mime_type_guesser'), $this->get('liip_imagine.extension_guesser'), array(0 => ($this->targetDirs[3].'/app/../web')), new \\Liip\\ImagineBundle\\Binary\\Locator\\FileSystemLocator());\n }", "public function getClassLoader() {\n return $this->classLoader;\n }", "public function getLoader($locale);", "protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }", "public function getPlugin(): Plugin {\n\t\treturn $this->loader;\n\t}", "protected static function getClassLoader() {}", "public function getRouterService() {\n return $this->routerService;\n }", "public function getSharedManager();", "public function get_loader_name()\n {\n }", "public function get_loader_name()\n {\n }", "public function get_loader_name()\n {\n }", "public function get_loader_name()\n {\n }", "public function get_loader_name()\n {\n }", "public function get_loader_name()\n {\n }", "public function get_loader_name()\n {\n }", "public function getLoader(): TestSuiteLoader\n {\n if ($this->loader === null) {\n $this->loader = new StandardTestSuiteLoader;\n }\n\n return $this->loader;\n }", "public function getLoader(): TestSuiteLoader\n {\n if ($this->loader === null) {\n $this->loader = new StandardTestSuiteLoader;\n }\n\n return $this->loader;\n }", "public static function getClassLoader()\n {\n if (static::$loader === null) {\n\n spl_autoload_register(array('NamespaceClassLoader', 'loadClassLoader'), true, true);\n static::$loader = $loader = new \\Composer\\Autoload\\ClassLoader();\n spl_autoload_unregister(array('NamespaceClassLoader', 'loadClassLoader'));\n static::$loader->register();\n }\n\n return static::$loader;\n }", "public function getName()\n {\n return 'service_loader';\n }", "public function getTwigLoader(): FilesystemLoader\n {\n return $this->twigLoader;\n }", "protected function registerLoader()\n {\n $this->app->singleton( 'translation.loader', function ( $app ) {\n $defaultLocale = $app['config']->get( 'app.locale' );\n $loader = new DatabaseLoader( $defaultLocale, $app->make( TranslationRepository::class ) );\n\n if( $app['config']->get( 'translator.cache.enabled' ) )\n {\n $loader = new CacheLoader( $defaultLocale, $app['translation.cache.repository'], $loader, $app['config']->get( 'translator.cache.timeout' ) );\n }\n\n return $loader;\n } );\n }", "protected function getConfigLoader()\n\t{\n\t\treturn new FileLoader(new Filesystem, $this->defaultPath);\n\t}", "protected function loadServices()\n {\n $di = $this->getDI();\n\n // Register the dispatcher setting a Namespace for controllers\n $di->setShared('dispatcher', function () {\n\n\n $dispatcher = new Dispatcher();\n $dispatcher->setDefaultNamespace('Phalcana\\Controllers');\n\n $listener = new Dispatch;\n $events = new Manager();\n $events->attach('dispatch', $listener);\n $dispatcher->setEventsManager($events);\n\n return $dispatcher;\n });\n\n $di->setShared('router', $this->loadRoutes(new Router(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 getSnippetLoader()\n {\n if (! $this->snippetLoader) {\n $this->loadSnippetLoader();\n }\n\n return $this->snippetLoader;\n }", "protected function registerLoader()\n {\n $this->app->singleton('translation.loader', function ($app) {\n $class = config('translation-loader.translation_manager');\n\n return new $class($app['files'], $app['path.lang']);\n });\n }", "protected function registerLoader()\n {\n $this->app->singleton('translation.loader', function ($app) {\n return new TranslationLoader($app['files'], $app['path.lang']);\n });\n }", "protected function registerLoader()\n {\n $this->app->singleton('translation.loader', function (Application $app) {\n $defaultLocale = $app->getLocale();\n $cacheTimeout = config('translator.cache.timeout', 60);\n\n $laravelFileLoader = new LaravelFileLoader($app['files'], base_path('/lang'));\n $fileLoader = new FileLoader($defaultLocale, $laravelFileLoader);\n $databaseLoader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));\n $loader = new MixedLoader($defaultLocale, $databaseLoader, $fileLoader);\n\n return new CacheLoader($defaultLocale, $app['translation.cache.repository'], $loader, $cacheTimeout);\n });\n }", "protected function registerLoader()\n {\n $this->app->singleton('translation.loader', function ($app) {\n $class = $this->app['config']->get('laravel-multilingual.translation_manager');\n\n return new $class($app['files'], $app['path.lang']);\n });\n }", "protected function getTranslation_Loader_MoService()\n {\n return $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader();\n }", "protected function getTranslation_Loader_JsonService()\n {\n return $this->services['translation.loader.json'] = new \\Symfony\\Component\\Translation\\Loader\\JsonFileLoader();\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 getTemplating_LocatorService()\n {\n return $this->services['templating.locator'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator($this->get('file_locator'), __DIR__);\n }", "public function getConfigLoader(): ?ConfigLoader;", "protected function getRouteLoader($path)\n {\n return static function (Router $router) use ($path) {\n require $path;\n };\n }", "public static function getPluginLoader()\n {\n if (!isset(self::$_pluginLoader)) {\n require_once 'Zend/Loader/PluginLoader.php';\n self::$_pluginLoader = new Zend_Loader_PluginLoader([\n 'Zend_Feed_Reader_Extension_' => 'Zend/Feed/Reader/Extension/',\n ]);\n }\n return self::$_pluginLoader;\n }", "function someloader($filepath) {\n\treturn SomeLoader::import($filepath);\n}", "public function getDefaultConfigLoader(): ?ConfigLoader;", "public static function getInstance() {\n if (is_null(self::$_modelLoader)) {\n self::$_modelLoader = new self();\n //Zend_Debug::dump(self::$_instance);\n return self::$_modelLoader;\n } else {\n return self::$_modelLoader;\n }\n }", "protected function getTranslation_Loader_QtService()\n {\n return $this->services['translation.loader.qt'] = new \\Symfony\\Component\\Translation\\Loader\\QtFileLoader();\n }", "public function getLoader($key)\n {\n }", "protected function getFosJsRouting_ExtractorService()\n {\n return $this->services['fos_js_routing.extractor'] = new \\FOS\\JsRoutingBundle\\Extractor\\ExposedRoutesExtractor($this->get('router'), array(), __DIR__, array('FrameworkBundle' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\FrameworkBundle', 'SecurityBundle' => 'Symfony\\\\Bundle\\\\SecurityBundle\\\\SecurityBundle', 'TwigBundle' => 'Symfony\\\\Bundle\\\\TwigBundle\\\\TwigBundle', 'MonologBundle' => 'Symfony\\\\Bundle\\\\MonologBundle\\\\MonologBundle', 'SwiftmailerBundle' => 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\SwiftmailerBundle', 'DoctrineBundle' => 'Doctrine\\\\Bundle\\\\DoctrineBundle\\\\DoctrineBundle', 'SensioFrameworkExtraBundle' => 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\SensioFrameworkExtraBundle', 'AppBundle' => 'AppBundle\\\\AppBundle', 'A2lixTranslationFormBundle' => 'A2lix\\\\TranslationFormBundle\\\\A2lixTranslationFormBundle', 'BazingaJsTranslationBundle' => 'Bazinga\\\\Bundle\\\\JsTranslationBundle\\\\BazingaJsTranslationBundle', 'AsseticBundle' => 'Symfony\\\\Bundle\\\\AsseticBundle\\\\AsseticBundle', 'TroopersAsseticInjectorBundle' => 'Troopers\\\\AsseticInjectorBundle\\\\TroopersAsseticInjectorBundle', 'TroopersAlertifyBundle' => 'Troopers\\\\AlertifyBundle\\\\TroopersAlertifyBundle', 'FOSUserBundle' => 'FOS\\\\UserBundle\\\\FOSUserBundle', 'FOSJsRoutingBundle' => 'FOS\\\\JsRoutingBundle\\\\FOSJsRoutingBundle', 'JMSSerializerBundle' => 'JMS\\\\SerializerBundle\\\\JMSSerializerBundle', 'LiipImagineBundle' => 'Liip\\\\ImagineBundle\\\\LiipImagineBundle', 'KnpMenuBundle' => 'Knp\\\\Bundle\\\\MenuBundle\\\\KnpMenuBundle', 'DoctrineBehaviorsBundle' => 'Knp\\\\DoctrineBehaviors\\\\Bundle\\\\DoctrineBehaviorsBundle', 'SncRedisBundle' => 'Snc\\\\RedisBundle\\\\SncRedisBundle', 'StofDoctrineExtensionsBundle' => 'Stof\\\\DoctrineExtensionsBundle\\\\StofDoctrineExtensionsBundle', 'VictoireAnalyticsBundle' => 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\VictoireAnalyticsBundle', 'VictoireBlogBundle' => 'Victoire\\\\Bundle\\\\BlogBundle\\\\VictoireBlogBundle', 'VictoireBusinessEntityBundle' => 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\VictoireBusinessEntityBundle', 'VictoireBusinessPageBundle' => 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\VictoireBusinessPageBundle', 'VictoireCoreBundle' => 'Victoire\\\\Bundle\\\\CoreBundle\\\\VictoireCoreBundle', 'VictoireCriteriaBundle' => 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\VictoireCriteriaBundle', 'VictoireFilterBundle' => 'Victoire\\\\Bundle\\\\FilterBundle\\\\VictoireFilterBundle', 'VictoireFormBundle' => 'Victoire\\\\Bundle\\\\FormBundle\\\\VictoireFormBundle', 'VictoireI18nBundle' => 'Victoire\\\\Bundle\\\\I18nBundle\\\\VictoireI18nBundle', 'VictoireMediaBundle' => 'Victoire\\\\Bundle\\\\MediaBundle\\\\VictoireMediaBundle', 'VictoirePageBundle' => 'Victoire\\\\Bundle\\\\PageBundle\\\\VictoirePageBundle', 'VictoireQueryBundle' => 'Victoire\\\\Bundle\\\\QueryBundle\\\\VictoireQueryBundle', 'VictoireSeoBundle' => 'Victoire\\\\Bundle\\\\SeoBundle\\\\VictoireSeoBundle', 'VictoireSitemapBundle' => 'Victoire\\\\Bundle\\\\SitemapBundle\\\\VictoireSitemapBundle', 'VictoireTemplateBundle' => 'Victoire\\\\Bundle\\\\TemplateBundle\\\\VictoireTemplateBundle', 'VictoireTwigBundle' => 'Victoire\\\\Bundle\\\\TwigBundle\\\\VictoireTwigBundle', 'VictoireUIBundle' => 'Victoire\\\\Bundle\\\\UIBundle\\\\VictoireUIBundle', 'VictoireUserBundle' => 'Victoire\\\\Bundle\\\\UserBundle\\\\VictoireUserBundle', 'ViewReferenceBundle' => 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\ViewReferenceBundle', 'VictoireWidgetBundle' => 'Victoire\\\\Bundle\\\\WidgetBundle\\\\VictoireWidgetBundle', 'VictoireWidgetMapBundle' => 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\VictoireWidgetMapBundle'));\n }" ]
[ "0.79766345", "0.77697176", "0.766329", "0.7232639", "0.7232639", "0.7232639", "0.7232639", "0.7232639", "0.7232639", "0.7232639", "0.7232639", "0.7232639", "0.71947104", "0.71905535", "0.7035279", "0.6972992", "0.69441146", "0.69307727", "0.6894788", "0.688301", "0.67098516", "0.6704922", "0.6689704", "0.6526624", "0.6522365", "0.65008134", "0.6497843", "0.64888495", "0.6481892", "0.6455036", "0.63856333", "0.63757426", "0.6347295", "0.6315809", "0.63021594", "0.62855613", "0.62798053", "0.6275965", "0.6248308", "0.6208974", "0.6184913", "0.61502165", "0.6123962", "0.6064545", "0.60273033", "0.60103726", "0.60087276", "0.599131", "0.5972039", "0.5922867", "0.59214956", "0.59060955", "0.5896233", "0.58840543", "0.5871109", "0.58457065", "0.5845442", "0.582105", "0.5800096", "0.57973856", "0.5782685", "0.57627654", "0.5759259", "0.5740333", "0.57398784", "0.573738", "0.572721", "0.572721", "0.572721", "0.572721", "0.572721", "0.572721", "0.572721", "0.57236874", "0.57236874", "0.5703706", "0.5693635", "0.56858796", "0.56842244", "0.56810135", "0.5651415", "0.56421304", "0.5632597", "0.55987287", "0.55788916", "0.55681443", "0.55611306", "0.5556288", "0.55318916", "0.55252856", "0.5513281", "0.5512802", "0.5490727", "0.5490511", "0.54708225", "0.54634297", "0.5446426", "0.5443739", "0.5434648", "0.5427439", "0.54255295" ]
0.0
-1
Retrieve data from global $_FILES array
private function getData() { $data = []; $fileAttributes = $_FILES[$this->scope]; foreach ($fileAttributes as $attributeName => $attributeValue) { $data[$attributeName] = $attributeValue[$this->getAttributeCode()]; } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fileData($key)\n {\n \treturn isset($_FILES[$key]) ? $_FILES[$key] : null;\n }", "public function getWholeFile()\n {\n \treturn isset($_FILES) ? $_FILES : null;\n }", "public function getInputFromGlobals()\n {\n\n switch (strtoupper($this->getMethod())) {\n case 'POST':\n $finalData = $_POST + FileUpload::fromGlobalFilesVariable($_FILES, true);\n break;\n\n case 'GET':\n $finalData = $_GET;\n break;\n\n // TODO other methods\n\n default:\n $finalData = [];\n break;\n }\n\n return $finalData;\n }", "public static function file($key) {\n return $_FILES[$key];\n }", "public function GetFiles() {\n\n if ($this->Files === null) {\n $this->Files= array();\n foreach($this->GetRequestContext()->FILES as $Key=>$Value) {\n if (is_array($Value['tmp_name'])) {\n $this->Error('Request/File: multiple values for files are not supported for key \"'.$Key.'\".');\n continue;\n }\n $this->Files[$Key]= $this->BuildComponent('Accent\\\\Request\\\\File', array('OrigInfo'=> $Value));\n }\n }\n return $this->Files;\n }", "public function getUploadedFileInfo();", "private function _setFileObject() {\n try {\n $fileArry = $_FILES;\n $_FILES = array();\n\n $fName = $fType = $fTmpName = $fErr = $fSize = array();\n foreach ($fileArry as $key => $val) {\n $fArr = explode('_', $key);\n $fKey = $fArr[0];\n $fPos = $fArr[1];\n\n $fName[] = $val['name'];\n $fType[] = $val['type'];\n $fTmpName[] = $val['tmp_name'];\n $fErr[] = $val['error'];\n $fSize[] = $val['size'];\n\n $_FILES[$fKey] = array(\n 'name' => $fName,\n 'type' => $fType,\n 'tmp_name' => $fTmpName,\n 'error' => $fErr,\n 'size' => $fSize\n );\n }\n } catch (Exception $ex) {\n throw new Exception('Error in _setFileObject function - ' . $ex);\n }\n }", "function prf() \r\n{\r\n\tprintarr($_FILES, '$_FILES:');\r\n}", "public function getValue(){\r\n\t\tif(\r\n\t\t\tisset($_FILES[$this->name]['tmp_name'])\r\n\t\t\t&& (strlen($_FILES[$this->name]['tmp_name']) > 0)\r\n\t\t\t&& ($_FILES[$this->name]['size'] > 0)\r\n\t\t\t&& ($_FILES[$filedataName]['error'] == UPLOAD_ERR_OK)\r\n\t\t){\r\n\t\t\treturn $_FILES[$this->name]['name'];\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "public function get_uploaded_files(/* ... */)\n {\n return $this->_uploaded;\n }", "private function getUploadedFiles()\n {\n $list = array();\n \n if(isset($_REQUEST['files']))\n {\n $files = explode('::', $_REQUEST['files']);\n foreach($files as $index => $item)\n {\n list($name, $src, $size) = explode(':', $item);\n \n $list[] = array(\n 'name' => $name,\n 'src' => $src,\n 'size' => $size \n );\n }\n }\n \n return $list;\n }", "protected function _FILES()\n\t{\n\t\t\n\t}", "public function getFileInfo()\n\t{\n\t\treturn $this->data;\n\t}", "public function getUploadedFiles() {}", "public function file($name)\n {\n return isset($_FILES[$name]) ? (object)$_FILES[$name] : null;\n }", "function value_from_datadict($data, $name)\n\t{\n\t\tglobal $HTTP_REQUEST,$_FILES;\n\t\t$out = $HTTP_REQUEST->getUploadedFile($name); // HTTPUploadedFile\n\t\tif(!$out){\n\t\t\t$error = $HTTP_REQUEST->getUploadedFileError($name);\n\t\t\tif($error>0 && $error!=4){ // 4 means \"No file was uploaded\" which is OK for us\n\t\t\t\t$out = $error;\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "public function getFile() {\n\t\treturn $this->data['file'];\n\t}", "protected function loadFormData()\n {\n $data = JFactory::getApplication()->getUserState('com_tz_portfolio.config.data', array());\n\n if(empty($data) || count($data) == 0){\n\n $com = JComponentHelper::getComponent('com_tz_portfolio');\n $c_params = $com -> params;\n $data['tz_image_xsmall'] = $c_params -> get('tz_image_xsmall');\n $data['tz_image_small'] = $c_params -> get('tz_image_small');\n $data['tz_image_medium'] = $c_params -> get('tz_image_medium');\n $data['tz_image_large'] = $c_params -> get('tz_image_large');\n $data['tz_image_xlarge'] = $c_params -> get('tz_image_xlarge');\n $data['tz_image_gallery_xsmall']= $c_params -> get('tz_image_gallery_xsmall');\n $data['tz_image_gallery_small'] = $c_params -> get('tz_image_gallery_small');\n $data['tz_image_gallery_medium']= $c_params -> get('tz_image_gallery_medium');\n $data['tz_image_gallery_large'] = $c_params -> get('tz_image_gallery_large');\n $data['tz_image_gallery_xlarge']= $c_params -> get('tz_image_gallery_xlarge');\n }\n return $data;\n }", "public function files()\n {\n return $this->_array[\"files\"];\n }", "public function keys()\n {\n parent::keys();\n return array_keys($_FILES);\n }", "public function file() { return $this->input_file; }", "public function data($index = NULL)\n {\n if($this->finished === TRUE)\n {\n return $this->uploadedFiles;\n }\n // if the files were not uploaded, then we update the data\n $data = array(\n 'file_name'\t\t=> $this->file_name,\n 'file_type'\t\t=> $this->file_type,\n 'file_path'\t\t=> $this->upload_path,\n 'full_path'\t\t=> $this->upload_path.$this->file_name,\n 'raw_name'\t\t=> str_replace($this->file_ext, '', $this->file_name),\n 'orig_name'\t\t=> $this->orig_name,\n 'client_name'\t\t=> $this->client_name,\n 'file_ext'\t\t=> $this->file_ext,\n 'file_size'\t\t=> $this->file_size,\n 'is_image'\t\t=> $this->is_image(),\n 'image_width'\t\t=> $this->image_width,\n 'image_height'\t\t=> $this->image_height,\n 'image_type'\t\t=> $this->image_type,\n 'image_size_str'\t=> $this->image_size_str,\n );\n\n if ( ! empty($index))\n {\n return isset($data[$index]) ? $data[$index] : NULL;\n }\n\n return $data;\n }", "public function getUploadedFiles()\n {\n return $this->uploadedFiles;\n }", "public function getUploadedFiles()\n {\n return $this->uploadedFiles;\n }", "public function getFileRequest(): FileBag { return $this->files; }", "public function data() {\n return $this->uploadedData;\n }", "public function fileInfo()\n {\n return R::findAll('uploaddetail');\n }", "function loadFileData() {\n if (isset($this->params['file_id'])) {\n if (isset($this->params['version_id']) && $this->params['version_id'] > 0) {\n $this->currentFile = $this->getFile($this->params['file_id'], $this->params['version_id']);\n } else {\n $this->currentFile = $this->getFile($this->params['file_id']);\n }\n $fileData = $this->getFileTrans(\n $this->params['file_id'], $this->lngSelect->currentLanguageId\n );\n if (isset($fileData[$this->params['file_id']])) {\n $this->currentFileData = $fileData[$this->params['file_id']];\n } else {\n unset($this->currentFileData);\n }\n }\n }", "private function getFileVal($fieldNamePattern, $field){\r\n\t\t\r\n\t\t$data = array('name' => null, 'path' => null, 'size' => 0);\r\n\t\t\r\n\t\tif(\r\n\t\t\tarray_key_exists('field-'.$fieldNamePattern.'-'.$this->securityHash, $_FILES) && sizeof($_FILES)!=0 \r\n\t\t)\r\n\t\t{\r\n\t\t\t$file = $_FILES['field-'.$fieldNamePattern.'-'.$this->securityHash];\r\n\t\t\tif(file_exists($file['tmp_name']) && (int)$file['size']>0 && (int)$file['error'] == 0){\r\n\t\t\t\t//System::dump($file);\r\n\t\t\t\t$newPath = System::root().'/'.$this->config['mailer_cache'].'/'.$file['name'];\r\n\t\t\t\tmove_uploaded_file($file['tmp_name'], $newPath);\r\n\t\t\t\t$data['name'] = $file['name'];\r\n\t\t\t\t//$data['data'] = file_get_contents($file['tmp_name']);\r\n\t\t\t\t$data['path'] = $newPath;\r\n\t\t\t\t$data['size'] = $file['size'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "public function getFields(): array\n {\n $fileFields = $this->getFileFields($this->path);\n\n if ($this->filename !== null) {\n $fileFields['name'] = basename($this->filename);\n }\n\n $return = [\n 'file' => $fileFields,\n ];\n\n return $return;\n }", "function LoadUploadedFiles()\n {\n\t\t$upld_folder = $this->EnsureTmpUploadFolder();\n\t\t\n foreach($this->upload_fields as $filefield)\n {\n $tmp_filepath = $this->globaldata->files[$filefield]['tmp_name'];\n if(is_uploaded_file($tmp_filepath))\n {\n $filename = $this->globaldata->files[$filefield]['name'];\n\t\t\t\t$filename = $this->trim_file_name($filename,$this->globaldata->files[$filefield][\"type\"]);\n \n if(!$this->config->allow_nonsecure_file_attachments && \n $this->IsNonSecureFile($filename))\n {\n $this->error_handler->NotifyError(\n \"File Upload handler: skipping nonsecure file attachment: $filename\");\n continue;\n }\n\n $upld_path = $upld_folder.\"/\".$filename;\n \n $upld_path = \n $this->CopyFile_Prevent_Overwrite($tmp_filepath, $upld_path);\n\n $this->logger->LogInfo(\"File Upload handler: loaded file from $tmp_filepath to $upld_path.\");\n\n $mimetype = $this->globaldata->files[$filefield][\"type\"];\n\n //NOTE: LoadUploadedFiles is for native file uploads where the file is submitted along with the\n //form submission. In this case, more than one files is not supported per field.\n $existing_file = $this->find_file_uploaded($filefield);\n if($existing_file >= 0)\n {\n unlink($this->loaded_files[$existing_file]['loaded_file']);\n $this->loaded_files[$existing_file] = array(\"input_name\"=>$filefield,\n \"loaded_file\"=>$upld_path,\n \"mime_type\"=>$mimetype); \n }\n else\n {\n $this->loaded_files[] = array(\"input_name\"=>$filefield,\n \"loaded_file\"=>$upld_path,\n \"mime_type\"=>$mimetype);\n }\n }//if\n }//foreach\n \n \n \n return true;\n }", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_solidres.edit.tariff.data', array());\n\n\t\tif (empty($data))\n {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "public static function uploadInfo($file = null): array\n\t{\n\t\treturn $file ? self::$uploadInfo[$file] : self::$uploadInfo;\n\t}", "private function _getFiles($input)\n {\n return isset($_FILES[$input]) ?\n PostHelper::toArrayOfFiles($_FILES[$input]) :\n [];\n }", "function getFiles()\r\n\t{\r\n\t\treturn $this->files;\r\n\t}", "protected function loadFormData()\n\t{\n\t\t$data = $this->getData(); \n \n return $data;\n\t}", "function cn_get_files($name) {\r\n $result = array();\r\n if(!isset($_FILES[$name])) return $result;\r\n\r\n $files = $_FILES[$name];\r\n \r\n if(isset($files['name']) and $files['name']) {\r\n if(is_array($files['name'])) {\r\n $l = count($files['name']);\r\n for($n = 0; $n < $l; $n ++) {\r\n if(isset($files['name'][$n]) and $files['name'][$n]) {\r\n $result[] = array(\r\n 'name' => $files['name'][$n],\r\n 'type' => $files['type'][$n],\r\n 'tmp_name' => $files['tmp_name'][$n],\r\n 'error' => $files['error'][$n],\r\n 'size' => $files['size'][$n]\r\n );\r\n }\r\n }\r\n } else {\r\n $result[] = $files;\r\n }\r\n }\r\n\r\n return $result;\r\n}", "public function getFiles(): array\n {\n return [$this->file];\n }", "function getFileData( $name ) {\r\n\treturn addslashes( @fread( fopen( $_FILES[$name][tmp_name], \"rb\" ), @filesize( $_FILES[$name][tmp_name] ) ) );\r\n}", "public function getUploadedFiles()\n {\n }", "function get_file()\n\t{\n\t\treturn $this->file;\n\t}", "public function getFiles()\n {\n $files = [];\n if($attachmentData = $this->setAttachmentData()){\n $files['attachment'] = $this->setAttachmentData();\n }\n return $files;\n }", "function get_uploaded_file($form_name, &$file_name = null, $only_path = false) {\n if (isset($_FILES[$form_name]) && is_uploaded_file(@$_FILES[$form_name]['tmp_name'])) {\n $file_name = @$_FILES[$form_name]['name'];\n return $only_path? $_FILES[$form_name]['tmp_name']: \\file_get_contents($_FILES[$form_name]['tmp_name']);\n }\n return null;\n}", "public function getFileData()\n {\n return $this->items;\n }", "public static function parseUploads() : array {\n\t\t$files = [];\n\t\t\n\t\tforeach ( $_FILES as $name => $file ) {\n\t\t\tif ( \\is_array($file['name']) ) {\n\t\t\t\tforeach ( $file['name'] as $n => $f ) {\n\t\t\t\t\t$files[$name][$n] = [];\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $file as $k => $v ) {\n\t\t\t\t\t\t$files[$name][$n][$k] = \n\t\t\t\t\t\t\t$file[$k][$n];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n \t\t$files[$name][] = $file;\n\t\t}\n\t\treturn $files;\n\t}", "private function setAttachmentData()\n {\n $attachments = [];\n if($this->attachments){\n foreach($this->attachments as $attachment){\n $attachments[] = $attachment['file']->getRealPath();\n }\n }\n return $attachments;\n }", "public function getFiles()\n {\n $request = $this->getRequest();\n return (array)$request->getFiles();\n }", "function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState(\"$this->option.edit.\".$this->getName().\".data\", array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\t\n\t\t$this->preprocessData('com_<#= StrConv(Value(\"Extension.name\"), VbStrConv.Lowercase) #>.<#= StrConv(Value(\"Task.nameObject\"), VbStrConv.Lowercase) #>', $data);\n\t\treturn $data;\n\t}", "private function fileFields()\n {\n $disk = 'public';\n\n if ($this->jsonData['disk']) {\n $disk = $this->jsonData['disk'];\n }\n\n $newData = [\n 'type' => $this->jsonData['type'],\n 'component' => 'file-field',\n 'vue' => $this->getCorrectVueComponent('form-file-field'),\n 'deletable' => true,\n 'downloadable' => false,\n 'deletable' => false,\n 'previewUrl' => null,\n 'thumbnailUrl' => null,\n 'disk' => $disk,\n 'textAlign' => 'center',\n ];\n\n $this->data = array_merge($this->data, $newData);\n }", "public function getFiles(): array\n {\n return $this->files;\n }", "private function getRequestImages(): array\n\t{\n\t\t$result = [];\n\n\t\t$files = Context::getCurrent()->getRequest()->getFileList();\n\t\t$requestFiles = $files['fields'] ?? null;\n\t\tif (is_array($requestFiles))\n\t\t{\n\t\t\tCFile::ConvertFilesToPost($requestFiles, $result);\n\n\t\t\t// remove UF_FILE key\n\t\t\t$result = $result['DIRECTORY_ITEMS'] ?? [];\n\t\t\tforeach ($result as $rowId => $data)\n\t\t\t{\n\t\t\t\t$result[$rowId] = $data['UF_FILE'];\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function get_main_file_data() {\n\t\treturn $this->main_file_data;\n\t}", "function get_file_objs() {\n return $this->file_objs;\n }", "protected function loadFormData()\n {\n $app = JFactory::getApplication();\n $data = $app->getUserState('com_jvisualcontent.edit.extrafield.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n }\n\n $this->preprocessData('com_jvisualcontent.extrafield', $data);\n\n return $data;\n }", "protected function loadFormData() {\n $data = $this->getData();\n\n return $data;\n }", "public function getFiles() : array\n {\n return $this->files;\n }", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_extporter.edit.extension.data', array());\n\t\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\n\t\treturn $data;\n\t}", "public function get_file_params()\n {\n }", "public static function rpc_uploadFile()\r\n\t{\r\n\t\tSERIA_RPCHost::requireAuthentication();\r\n\t\t$results = array();\r\n\t\tforeach ($_FILES as $nam => $fileinfo) {\r\n\t\t\tswitch ($fileinfo['error']) {\r\n\t\t\t\tcase UPLOAD_ERR_OK:\r\n\t\t\t\t\t$error = false;\r\n\t\t\t\t\t$file = new SERIA_File($fileinfo['tmp_name'], $fileinfo['name']);\r\n\t\t\t\t\t$sha1 = sha1_file($file->get('localPath'));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase UPLOAD_ERR_INI_SIZE:\r\n\t\t\t\t\t$error = _t('Upload was denied because of size. (php.ini)');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase UPLOAD_ERR_FORM_SIZE:\r\n\t\t\t\t\t$error = _t('Upload was denied because of size. (form specified max)');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase UPLOAD_ERR_PARTIAL:\r\n\t\t\t\t\t$error = _t('Upload was truncated.');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase UPLOAD_ERR_NO_FILE:\r\n\t\t\t\t\t$error = _t('No file received.');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase UPLOAD_ERR_NO_TMP_DIR:\r\n\t\t\t\t\t$error = _t('Can\\'t find a tmp directory.');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase UPLOAD_ERR_CANT_WRITE:\r\n\t\t\t\t\t$error = _t('Can\\'t write files to tmp.');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase UPLOAD_ERR_EXTENSION:\r\n\t\t\t\t\t$error = _t('An extension has denied upload.');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$error = _t('Unknown upload error.');\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$results[$nam] = array(\r\n\t\t\t\t'id' => ($error === false ? $file->get('id') : false),\r\n\t\t\t\t'error' => $error,\r\n\t\t\t\t'sha1' => ($error === false ? $sha1 : false)\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn $results;\r\n\t}", "function getFormData(){\n\n}", "public function files()\r\n {\r\n return $this->files;\r\n }", "public function getSavedValue(Request $request){\n dd($request->fields);\n $files = $request->fields;\n foreach($files as $key => $file) {\n if (isset($file[\"images\"])) {\n # code...\n }\n }\n }", "protected function processFiles(): array\n {\n $allFields = $this->request->getPostData();\n\n $validator = $this->validation();\n\n $files = [];\n foreach ($this->request->getUploadedFiles() as $file) {\n //validate this current file\n $errors = $validator->validate([\n 'file' => [\n 'name' => $file->getName(),\n 'type' => $file->getType(),\n 'tmp_name' => $file->getTempName(),\n 'error' => $file->getError(),\n 'size' => $file->getSize(),\n ]\n ]);\n\n /**\n * @todo figure out why this failes\n */\n if (!defined('API_TESTS')) {\n if (count($errors)) {\n foreach ($errors as $error) {\n throw new UnprocessableEntityException((string) $error);\n }\n }\n }\n\n $fileSystem = Helper::upload($file);\n\n //add settings\n foreach ($allFields as $key => $settings) {\n $fileSystem->set($key, $settings);\n }\n\n $files[] = $fileSystem;\n }\n\n return $files;\n }", "public function getFileParams()\n {\n return [];\n }", "public function fileInfo() {\n $this->file = file_load($this->fid);\n\n // Creating an array of stream wrappers that will be removed.\n $streams = array();\n foreach (stream_get_wrappers() as $stream) {\n $streams[] = $stream . '://';\n }\n\n // Generate the folder name by the unique URI of the file.\n $file_name = str_replace($streams, '', $this->file->uri);\n $folder_name = str_replace(array('.', '_'), '-', $file_name);\n\n $files_folder = variable_get('file_public_path', conf_path() . '/files');\n\n $this->filePath = $files_folder . '/' . $file_name;\n $this->extractPath = $files_folder . '/' . $folder_name;\n }", "public function getUpload()\n {\n return $this->upload;\n }", "private function normalizeFiles(): array\n {\n $files = $_FILES;\n $normalized = [];\n foreach ($files as $key => $value) {\n if ($value instanceof UploadedFileInterface) {\n $normalized[$key] = $value;\n } elseif (\\is_array($value) && isset($value['tmp_name'])) {\n $normalized[$key] = $this->createUploadedFileFromSpec($value);\n } elseif (\\is_array($value)) {\n $normalized[$key] = $this->normalizeFiles($value);\n } else {\n throw new \\InvalidArgumentException('Invalid value in files specification');\n }\n }\n return $normalized;\n }", "public function getData() {\n\t\t$this->validate();\n\n\t\t// add file header record\n\t\t$data = $this->header->getData();\n\n\t\t// add file batch records\n\t\tforeach ($this->batches as $batch) {\n\t\t\t$data .= $batch->getData();\n\t\t}\n\t\t// add file control record.\n\t\t$data .= $this->control->getData();\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_hwdmediashare.edit.album.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "public function formData()\n {\n return array(\n 'id' => $this->_id,\n 'name' => $this->_name,\n 'content' => $this->_content,\n 'categoryId' => $this->_category_id,\n 'userId' => $this->_user_id\n );\n }", "protected function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_squadmanagement.edit.war.data', array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\treturn $data;\n\t}", "function getImageFile() \n { \n return $this->_imageFile; \n }", "protected function loadFormData() {\r\n\t\t// Check the session for previously entered form data.\r\n\t\t$data = JFactory::getApplication()->getUserState('com_flexicontent.edit.'.$this->getName().'.data', array());\r\n\r\n\t\tif (empty($data)) {\r\n\t\t\t$data = $this->getItem();\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "function edde_selected_files_to_array( $post_data ) {\n\t\t$files_name = [];\n\t\tif (!empty($post_data) ){\n\t\t\tforeach ($post_data as $item){\n\t\t\t\tarray_push($files_name, $item['value']);\n\t\t\t}\n\t\t}\n\n\t\treturn $files_name;\n\t}", "public function get_file() {\n\t\treturn $this->file;\n\t}", "public function files($key = null)\n {\n $files = filter_var_array($_FILES);\n array_walk_recursive($files, function(&$value) {\n $value = JORequest::setAntiInjection($value);\n });\n\n if (isset($files[$key])) {\n return $files[$key];\n } else {\n return $files;\n }\n }", "function get_list_file_uploaded($params) {\n $sql = \"SELECT * FROM fa_files WHERE data_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function getCaminhoUpload()\n {\n return $this->caminhoUpload;\n }", "public function getRawValue ()\n {\n return $this->files->getFile( $this->getName() );\n }", "protected function loadFormData(){\n\t\t\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_egoi.edit.egoi.data', array());\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getDataFile() \n\t{\n\t\treturn $this->_dataFile;\n\t}", "public function testGetFilesParams()\n {\n $files = $this->_req->getFilesParams();\n $picture = $files['picture'];\n $this->assertInstanceOf('Mad_Controller_FileUpload', $picture);\n\n $icon = $files['document']['icon'];\n $this->assertInstanceOf('Mad_Controller_FileUpload', $icon);\n\n $photo = $files['document']['photo'];\n $this->assertInstanceOf('Mad_Controller_FileUpload', $photo);\n }", "public function getf() {\n return $this->file;\n }", "public function getFileInfo()\n {\n $info = $this->getProduct()->getPreconfiguredValues()->getData('options/' . $this->getOption()->getId());\n if (empty($info)) {\n $info = new Varien_Object();\n } else if (is_array($info)) {\n $info = new Varien_Object($info);\n }\n return $info;\n }", "function acf_get_file_input($attrs = array())\n{\n}", "private function getArhive() {\n return $this->request->file('filePortlet');\n }", "function file($name) {\n $this->loadStructure();\n return @$this->files[$name];\n }", "public function getFileUploads()\n {\n return $this->file_uploads;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function getFiles()\n {\n return $this->files;\n }", "public function get_data($post, $file = null)\n\t{\t\t \n\t\t foreach(Worker::$fields as $allowable_fields)\n\t\t {\n\t\t\t//if a field is found in file, do not assign the post value of it.\n\t\t\t//this means that if the image is not changed in the admin form,\n\t\t\t//do not replace it. \n\t\t\t//$file[$allowable_fields] is always set even though it has no value.\n\t\t\tif ($file && !$file[$allowable_fields])\n\t\t\t{\n\t\t\t\t$this->values[$allowable_fields] = $post[$allowable_fields];\n\t\t\t}\n\t\t }\n\t\t \n\t\t if ($file != null)\n\t\t {\n\n\t\t\t //look for a value that accepts a file input\n\t\t\t foreach(Worker::$fields as $allowable_field)\n\t\t\t {\n\t\t\t\tif($file[$allowable_field]['name'])\n\t\t\t\t{\n\t\t\t\t\t$upload_dir = wp_upload_dir();\n\t\t\t\t\t$upload_dir = $upload_dir['basedir'];\n\t\t\t\t\t$filename = date('YmdHis') . $file[$allowable_field]['name'];\n\t\t\t\t\tif (!move_uploaded_file($file[$allowable_field]['tmp_name'], \"$upload_dir/$filename\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception(\"Fatal Error: Cannot upload file. Please check your server configuration\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->values[$allowable_field] = $filename;\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 }\t\t \n\t\t }\n\t\t else\n\t\t {\n\t\t\t//wp_die(\"can't escape, sorry\");\n\t\t \n\t\t }\n\t\t\n\t}", "public function getFiles()\n {\n return isset($this->source['files']) && is_array($this->source['files']) ? $this->source['files'] : [];\n }" ]
[ "0.7409352", "0.71192217", "0.68042666", "0.66955113", "0.6695511", "0.66906446", "0.66141003", "0.6453829", "0.6404425", "0.63992006", "0.6300311", "0.62892073", "0.6231492", "0.62135065", "0.62123406", "0.61871403", "0.6178696", "0.61727417", "0.6160589", "0.612657", "0.61088526", "0.60924745", "0.6087695", "0.6087695", "0.6086631", "0.6069549", "0.6066152", "0.6031751", "0.60229844", "0.6012556", "0.6004685", "0.5965931", "0.5965502", "0.5956502", "0.59507805", "0.5950429", "0.59322315", "0.5931914", "0.5927411", "0.5926743", "0.5905083", "0.5903121", "0.58931226", "0.58893853", "0.58778065", "0.58727604", "0.58674884", "0.5854531", "0.58470684", "0.58461744", "0.58384186", "0.582929", "0.5828426", "0.5822601", "0.5820431", "0.58164746", "0.58101076", "0.5804583", "0.5794868", "0.57947975", "0.57908535", "0.5781324", "0.5773997", "0.57714444", "0.5758686", "0.5748114", "0.57453126", "0.574074", "0.57384855", "0.572344", "0.5695335", "0.56808424", "0.56727695", "0.56644", "0.56606364", "0.56567377", "0.5648286", "0.5646646", "0.56461084", "0.5642853", "0.5641773", "0.5636531", "0.56357807", "0.5632938", "0.56314796", "0.5629723", "0.56295145", "0.5627828", "0.5626829", "0.5626829", "0.5626829", "0.5626829", "0.5626829", "0.5626829", "0.5626829", "0.5626829", "0.5626829", "0.5626829", "0.5620332", "0.5616861" ]
0.66998976
3
Set the default text mode
function ifx_textasvarchar($mode) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setMode() {\r\n\t\t$this->mode = substr($this->mode, -1);\r\n\t}", "public function setTextMode($value)\n\t{\n\t\tthrow new TNotSupportedException('juidatepicker_settextmode_unsupported');\n\t}", "public function setDefaultText($value)\n\t{\n\t\t$this->setViewState('DefaultText',$value,'');\n\t}", "public function getTextMode()\n\t{\n\t\treturn 'MultiLine';\n\t}", "public function setTextMode($value)\n\t{\n\t\tthrow new TInvalidOperationException(\"htmlarea_textmode_readonly\");\n\t}", "function setMode($mode) {\n\t\t$this->_mode = $mode;\n\t}", "function setMode($mode) {\n\t\t$this->_mode = $mode;\n\t}", "function set_mode($mode){\r\n\r\n\t\tswitch($mode){\r\n\t\t\tcase self::OUTPUT_MODE_NORMAL:\r\n\t\t\tcase self::OUTPUT_MODE_TEMPLATE:\r\n\t\t\t$this->_mode = $mode;\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\tthrow new Exception(get_instance()->lang->line(\"Unknown output mode.\"));\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t}", "function SimpleText($text, $style=\"\") {\n\t\tif (false) {\n\t\t\t/*\n\t\t\t * FIXME: this is fundamentally broken, because\n\t\t\t * it creates a new CCE connection for every\n\t\t\t * SimpleText object created\n\t\t\t */\n\t\t\tinclude(\"uifc/Stylist.php\");\n\t\t\tinclude(\"ServerScriptHelper.php\");\n\t\t\t$crackaddict = new ServerScriptHelper();\n\t\t\t$stylist = $crackaddict->getStylist();\n\t\t\t$this->style = $stylist->getStyle(\"SimpleText\"); // try this\n\t\t\t\n\t\t\tif($this->style->getPropertyNumber()) { \n\t\t\t\t$this->style = $stylist->getStyle(\"Page\"); // default\n\t\t\t}\n\t\t\t\t\n\t\t} else {\n\t\t\t$this->style = $style;\n\t\t}\t\t\n\t\t$this->text = $text;\n\t}", "public function setMode($mode) {\n $this->mode = $mode;\n }", "public function SetMode($mode)\n\t{\n\t\t$this->mode = $mode;\n\t}", "public function setMode($mode)\n {\n $this->mode = $mode;\n }", "private function setMode($mode)\n {\n $this->mode = $mode;\n }", "public static function force_text_editor( $default ) {\n\t\t$post = get_post();\n\t\tif ( $post && get_post_type( $post ) === Registrations::get_post_type() ) {\n\t\t\t$default = 'html';\n\t\t}\n\n\t\treturn $default;\n\t}", "public function setPlainText($text)\n {\n $this->_plainText = $text . \"\"; //force it to be a string\n }", "function setMode($value) {\r\n\t\t$this->mode = $value;\r\n\t}", "public function setText($text)\n {\n $this->_text = $text;\n }", "protected function getDefaultMode() : int {\n return 0644;\n }", "function setMode($mode){\n\t\t//Switches the operating mode of\n\t\t//'ScaleTool'.\n\n\t\tif($mode == 'fit' || $mode == 'fill')\n\t\t\t$this->mode = $mode;\n\t}", "abstract public function getTextSettings();", "public function setText($text) {\n $this->TEXT = $text;\n }", "public function setText($text)\r\n {\r\n $this->text = $text;\r\n }", "public function setMode($mode) {\n\t\t$editMode = ($mode==\"on\")?true:false;\n\t\t//SessionUtils::setMessageEditionMode($editMode);\n\t\tif ($editMode) {\n\t\t\t$_SESSION[\"FINE_MESSAGE_EDITION_MODE\"] = true;\n\t\t\t$this->isMessageEditionMode = true;\n\t\t} else {\n\t\t\tunset($_SESSION[\"FINE_MESSAGE_EDITION_MODE\"]);\n\t\t}\n\n\t\t$this->content->addFile('../utils.i18n.fine/src/views/enableDisableEdition.php', $this);\n\t\t$this->template->toHtml();\n\t}", "public function testSetBarcodeTextPositionDefault()\n {\n $this -> printer -> setBarcodeTextPosition();\n $this -> checkOutput(\"\\x1b@\\x1dH\\x00\");\n }", "public function setText($text)\n {\n $this->_text = (string)$text;\n }", "public function setMode($mode = 'create')\n {\n $this->mode = $mode;\n }", "public function setText($text) {\n\t\t$this->text = htmlentities($text);\n\t}", "function connectTo($mode) {\n $this->Lexer->addEntryPattern('<TEXT>(?=.*?</TEXT>)',$mode,'plugin_plaintext_block');\n }", "public function getDefaultTextStyle() {\n return $this->stdout()->getDefaultTextStyle();\n }", "public static function mode($mode) {\n static::$mode = $mode;\n }", "public function setText($text)\n {\n $this->text = $text;\n }", "public function setText($text)\n {\n $this->text = $text;\n }", "public function setText($text)\n {\n $this->text = $text;\n }", "public function set_text($padid, $text) {\n return true;\n }", "public function setModeCurrent() {\n\t\t$this->mode = 'current';\n\t}", "public function renderText($text = null){\n\t\tif ($text != null){ echo $text; }\n\t\t$this->text_only = true;\n\t}", "public function setDefaultSettings() {\n $defaultSettings = array(\n \"media_buttons\" => false,\n \"textarea_name\" => $this->getNameAttribute(),\n \"textarea_rows\" => 10,\n \"teeny\" => false,\n \"quicktags\" => false\n );\n $this->setWpEditorSettings($defaultSettings);\n }", "public function setDefaultTextStyle($style) {\n $this->stdout()->setDefaultTextStyle($style);\n return $this;\n }", "function setNoteText(){\n $html = \"\";\n \n $this->aFields[\"note\"]->editable = true;\n $this->aFields[\"note\"]->value = $html;\n }", "public function getDefaultText()\n\t{\n\t\treturn $this->getViewState('DefaultText','');\n\t}", "public static function setEditMode(bool $mode = true): void\n\t{\n\t\tself::$editMode = $mode;\n\t}", "public function getTYPE_TEXT()\n {\n return self::TYPE_TEXT;\n }", "public function setText($text) {\n\t\t$this->data[\"text\"] = $text;\n\t}", "protected function _showText($text) {}", "public function setText($value)\n\t{\n\t\t$this->setViewState('Text',$value,'');\n\t}", "function SetLyricsFont() {\r\n $this->SetFont(\"Arial\", \"\", 14);\r\n $this->SetTextColor(0, 0, 0);\r\n }", "protected function setPlainContent() {}", "public function isText()\n {\n return $this->getName() === 'text';\n }", "public function setText($text)\n\t{\n\t\tif (is_string($text)) {\n\t\t\t$this->setValue('text', $text);\n\t\t}\n\t}", "public function initialize() {\n // default values\n $this->setText('__notext__');\n $this->setTextFont(array(\n 'family' => 'monospace',\n 'style' => 0,\n 'name' => 'Courier'\n ));\n $this->setHeight(0.8);\n $this->setPosition(array(0, 0));\n $this->setTextColor('#000000');\n\n // default flags\n $this->setAlignment(0);\n }", "protected function forceFont()\r\n {\r\n echo \"$this->_canvas.setFont(\\\"\" . $this->_font->Family . \"\\\", \\\"\" . $this->_font->Size . \"\\\", \\\"\" . $this->_font->Style . \"\\\");\\n\";\r\n if ($this->_font->Color != '') echo \"$this->_canvas.setColor(\\\"\" . $this->_font->Color . \"\\\");\\n\";\r\n }", "public function setUtf8Mode($isUtf8Mode = true)\n {\n $this->_isUtf8Mode = (bool)$isUtf8Mode;\n }", "public function setBaseConsoleMode($set = false)\n {\n $this->baseConsole = $set;\n }", "function setAuto($auto_mode=true)\n {\n $this->auto_mode = $auto_mode;\n }", "function setFeedback($mode){\n\n\t\tif( @in_array($mode, array(\"line\",\"box\",\"both\")) ){\n\t\t\t$this->feedback = $mode;\n\t\t\treturn true;\n\t\t} else return false;\n\n\t}", "function setMode($mode)\n {\n $this->_mcryptMode = $mode;\n }", "public function setAutoText($auto_text)\n {\n $this->auto_text = $this->message['auto_text'] = $auto_text;\n }", "public function setAlternativeText($txt='') {\n\t\tif(!empty($txt)) {\n\t\t\t$this->_mailAlternativeText = (string)$txt;\n\t\t}\n\t}", "public function setText(string $text): void {\n\t\t$this->text = $text;\n\t}", "public function setFallbackText($text) {\n\t\t$this->speech = $text;\n }", "public function setArticle_text($t)\n {\n if(is_string($t))\n $this->_article_text = $t;\n }", "public function isTextType()\n {\n return $this->getModel()->isPlain();\n }", "public function init(){ // функция инициализации - ВЫПОЛНЯЕТСЯ ПЕРВОЙ!. Если данные не будут переданы в компонент, то он выведет текст \"Текст по умолчанию\"\n\t\tparent::init(); //...ОБЯЗАТЕЛЬНО В НАЧАЛЕ...\n\t\t$this->content= 'Текст по умолчанию';\n\t}", "public function setLogText($str , $default = false) {\n $str = ( $default ==true ) ? $this->logText . \" \" . $str : $str ;\n $this->logText=$str;\n\n }", "public function set_theme_mode($mode)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->_set_parameter('theme_mode', $mode);\n }", "public function setTexto($txt) {\n $this->texto = Funciones::gCodificar($txt);\n }", "function setTokenMode($value)\n {\n $this->_props['TokenMode'] = $value;\n }", "public function setPlaceholderText($text);", "public static function setClipboardText(string $text) : void {}", "public function setText(string $text) : void\n {\n $this->text = $text;\n }", "public function setText(string $text) : void\n {\n $this->text = $text;\n }", "public function setText(string $input) {\n $this->inputText = $input;\n }", "public function setTestMode()\n {\n $this->isTestMode = true;\n }", "public static function text() {}", "public function text() {}", "public function text() {}", "public function text() {}", "function setEncryptionMode($mode)\n {\n $this->encryptionMode = $mode;\n }", "public function text($text) {\n\t\t$this->text = $text;\n\t\treturn $this;\n\t}", "function setMode($mode)\n {\n $this->mode = $mode;\n $this->determineRequiredPermission();\n }", "public function setText(string $text): void\n {\n $this->text = $text;\n }", "public function setText(string $text): void\n {\n $this->text = $text;\n }", "public function setString($text)\n {\n $this->text = (string) $text;\n }", "public function set_edittext($param)\n\t{\n\t\t$this->edittext = (string)$param;\n\t\treturn $this;\n\t}", "function setText($text)\r\n {\r\n $this->text = nl2br($text);\r\n $this->wordCount = str_word_count($text);\r\n }", "function text()\n {\n ?>\n <input type=\"text\" <?php $this->name_tag(); ?> value=\"<?php echo esc_attr( $this->setting_value ); ?>\" class=\"inferno-setting\" <?php $this->id_tag(\"inferno-concrete-setting-\"); ?> />\n <?php \n if($this->setting['type'] == 'range') {\n $this->range();\n }\n }", "abstract public function mode($mode = NULL);", "public function setStartText($a_txt)\n\t{\n\t\t$this->start_text = $a_txt;\n\t}", "public function testSetMode($name) {\n\t\t$this->markTestSkipped(\"mode detection is mostly broken with newer libsmbclient versions\");\n\t\treturn;\n\t\t$txtFile = $this->getTextFile();\n\n\t\t$this->share->put($txtFile, $this->root . '/' . $name);\n\n\t\t$this->share->setMode($this->root . '/' . $name, IFileInfo::MODE_NORMAL);\n\t\t$info = $this->share->stat($this->root . '/' . $name);\n\t\t$this->assertFalse($info->isReadOnly());\n\t\t$this->assertFalse($info->isArchived());\n\t\t$this->assertFalse($info->isSystem());\n\t\t$this->assertFalse($info->isHidden());\n\n\t\t$this->share->setMode($this->root . '/' . $name, IFileInfo::MODE_READONLY);\n\t\t$info = $this->share->stat($this->root . '/' . $name);\n\t\t$this->assertTrue($info->isReadOnly());\n\t\t$this->assertFalse($info->isArchived());\n\t\t$this->assertFalse($info->isSystem());\n\t\t$this->assertFalse($info->isHidden());\n\n\t\t$this->share->setMode($this->root . '/' . $name, IFileInfo::MODE_ARCHIVE);\n\t\t$info = $this->share->stat($this->root . '/' . $name);\n\t\t$this->assertFalse($info->isReadOnly());\n\t\t$this->assertTrue($info->isArchived());\n\t\t$this->assertFalse($info->isSystem());\n\t\t$this->assertFalse($info->isHidden());\n\n\t\t$this->share->setMode($this->root . '/' . $name, IFileInfo::MODE_READONLY | IFileInfo::MODE_ARCHIVE);\n\t\t$info = $this->share->stat($this->root . '/' . $name);\n\t\t$this->assertTrue($info->isReadOnly());\n\t\t$this->assertTrue($info->isArchived());\n\t\t$this->assertFalse($info->isSystem());\n\t\t$this->assertFalse($info->isHidden());\n\n\t\t$this->share->setMode($this->root . '/' . $name, IFileInfo::MODE_HIDDEN);\n\t\t$info = $this->share->stat($this->root . '/' . $name);\n\t\t$this->assertFalse($info->isReadOnly());\n\t\t$this->assertFalse($info->isArchived());\n\t\t$this->assertFalse($info->isSystem());\n\t\t$this->assertTrue($info->isHidden());\n\n\t\t$this->share->setMode($this->root . '/' . $name, IFileInfo::MODE_SYSTEM);\n\t\t$info = $this->share->stat($this->root . '/' . $name);\n\t\t$this->assertFalse($info->isReadOnly());\n\t\t$this->assertFalse($info->isArchived());\n\t\t$this->assertTrue($info->isSystem());\n\t\t$this->assertFalse($info->isHidden());\n\n\t\t$this->share->setMode($this->root . '/' . $name, IFileInfo::MODE_NORMAL);\n\t\t$info = $this->share->stat($this->root . '/' . $name);\n\t\t$this->assertFalse($info->isReadOnly());\n\t\t$this->assertFalse($info->isArchived());\n\t\t$this->assertFalse($info->isSystem());\n\t\t$this->assertFalse($info->isHidden());\n\t}", "function setSyncCategoryText()\n {\n }", "public function showText($text) {}", "public function setText($text)\n {\n $this->text = $this->message['text'] = $text;\n }", "public function output_text( $text = '' ){\n\t\t echo $text;\n\t }", "function setDefaultFont($font)\n {\n $this->default_font = $font;\n }", "function setDefaultFont($font)\n {\n $this->default_font = $font;\n }", "public function setTitle(string $text = \"untitled\");", "final public function getModeString(): string {}", "public function setMailTextType($mailType='text') {\n\t\t$this->_mailTextType = ($mailType == 'text') ? 'text' : 'html';\n\t}", "private function defaults_text($defaultVal)\r\n\t{\r\n\t\treturn $defaultVal;\r\n\t}", "public function setMode(string $mode)\n {\n $this->mode = $mode;\n return $this;\n }" ]
[ "0.666055", "0.6570868", "0.63068795", "0.6296061", "0.61789215", "0.58969945", "0.58969945", "0.58156985", "0.5795762", "0.5744497", "0.57157534", "0.56388986", "0.5615761", "0.5579108", "0.55651313", "0.5556246", "0.5523778", "0.55198234", "0.5509408", "0.5492045", "0.5490686", "0.5485494", "0.5481641", "0.54799086", "0.5462253", "0.5443442", "0.54431915", "0.5438795", "0.5433294", "0.54310685", "0.5428242", "0.5428242", "0.5428242", "0.5420438", "0.54118615", "0.54017055", "0.53601885", "0.53588545", "0.53585786", "0.53181344", "0.531078", "0.5295625", "0.5279709", "0.5278498", "0.52708304", "0.5246897", "0.52411", "0.5226226", "0.5225081", "0.52248126", "0.52033377", "0.5201987", "0.51987493", "0.5182827", "0.51742977", "0.51673305", "0.5167176", "0.5161986", "0.5150303", "0.51388514", "0.51367486", "0.5133761", "0.5133101", "0.5127871", "0.5114375", "0.5104676", "0.5092164", "0.5067722", "0.50416714", "0.50369817", "0.50369817", "0.5030741", "0.50287735", "0.5023545", "0.5020693", "0.5020693", "0.5020693", "0.5009101", "0.50078017", "0.50069267", "0.50037223", "0.50037223", "0.49997616", "0.49995676", "0.49995443", "0.49893412", "0.49839756", "0.49748367", "0.49591616", "0.49468705", "0.4926009", "0.4914744", "0.4911788", "0.4911461", "0.4911461", "0.49071485", "0.48980147", "0.48950648", "0.4882834", "0.48717356" ]
0.5098805
66
Display a listing of the resource.
public function indexprod() { $product = Product::all(); return view('front.prod',compact('product')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function 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
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ // 'razon_social'=>'required', 'domicilio'=>'required', 'telefono'=>'required|min:10|max:15', 'correo'=>'required|email', 'estado'=>'required', 'municipio'=>'required', 'rfc'=>'required|min:9', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('idempleo',$this->idempleo); $criteria->compare('administrativo',$this->administrativo,true); $criteria->compare('comercial',$this->comercial,true); $criteria->compare('artes',$this->artes,true); $criteria->compare('informatica',$this->informatica,true); $criteria->compare('salud',$this->salud,true); $criteria->compare('marketing',$this->marketing,true); $criteria->compare('servicio_domestico',$this->servicio_domestico,true); $criteria->compare('construccion',$this->construccion,true); $criteria->compare('agricultura',$this->agricultura,true); $criteria->compare('ganaderia',$this->ganaderia,true); $criteria->compare('telecomunicaciones',$this->telecomunicaciones,true); $criteria->compare('atencion_cliente',$this->atencion_cliente,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('model_id',$this->model_id,true);\n $criteria->compare('color',$this->color,true);\n $criteria->compare('is_in_pare',$this->is_in_pare);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('generator_id',$this->generator_id,true);\n\t\t$criteria->compare('serial_number',$this->serial_number,true);\n\t\t$criteria->compare('model_number',$this->model_number,true);\n\t\t$criteria->compare('manufacturer_name',$this->manufacturer_name,true);\n\t\t$criteria->compare('manufacture_date',$this->manufacture_date,true);\n\t\t$criteria->compare('supplier_name',$this->supplier_name,true);\n\t\t$criteria->compare('date_of_purchase',$this->date_of_purchase,true);\n\t\t$criteria->compare('date_of_first_use',$this->date_of_first_use,true);\n\t\t$criteria->compare('kva_capacity',$this->kva_capacity);\n\t\t$criteria->compare('current_run_hours',$this->current_run_hours);\n\t\t$criteria->compare('last_serviced_date',$this->last_serviced_date,true);\n\t\t$criteria->compare('engine_make',$this->engine_make,true);\n\t\t$criteria->compare('engine_model',$this->engine_model,true);\n\t\t$criteria->compare('fuel_tank_capacity',$this->fuel_tank_capacity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('idmodel',$this->idmodel);\n\t\t$criteria->compare('usuario_anterior',$this->usuario_anterior);\n\t\t$criteria->compare('usuario_nuevo',$this->usuario_nuevo);\n\t\t$criteria->compare('estado_anterior',$this->estado_anterior,true);\n\t\t$criteria->compare('estado_nuevo',$this->estado_nuevo,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('car',$this->car,true);\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('client_type_id',$this->client_type_id,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('other',$this->other,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t// $criteria->compare('text',$this->text,true);\n\t\t// $criteria->compare('record',$this->record,true);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('createdBy',$this->createdBy,true);\n\t\t$criteria->compare('viewed',$this->viewed);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('comparison',$this->comparison,true);\n\t\t// $criteria->compare('value',$this->value,true);\n\t\t$criteria->compare('modelType',$this->modelType,true);\n\t\t$criteria->compare('modelId',$this->modelId,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('ExchangeVND',$this->ExchangeVND,true);\n\t\t$criteria->compare('AppliedDate',$this->AppliedDate,true);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('firm',$this->firm,true);\n\t\t$criteria->compare('change_date',$this->change_date,true);\n\t\t$criteria->compare('item_id',$this->item_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('availability',$this->availability,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('bonus',$this->bonus,true);\n\t\t$criteria->compare('shipping_cost',$this->shipping_cost,true);\n\t\t$criteria->compare('product_page',$this->product_page,true);\n\t\t$criteria->compare('sourse_page',$this->sourse_page,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('column_id',$this->column_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('condition',$this->condition,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('industry',$this->industry,true);\n\t\t$criteria->compare('industry_sub',$this->industry_sub,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('province',$this->province,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('contact_name',$this->contact_name,true);\n\t\t$criteria->compare('contact_tel',$this->contact_tel,true);\n\t\t$criteria->compare('ip',$this->ip,true);\n\t\t$criteria->compare('source',$this->source,true);\n $criteria->compare('status',$this->status);\n\t\t$criteria->compare('update_time',$this->update_time);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('notes',$this->notes);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('university',$this->university,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('gpa',$this->gpa,true);\n\t\t$criteria->compare('appl_term',$this->appl_term);\n\t\t$criteria->compare('toefl',$this->toefl);\n\t\t$criteria->compare('gre',$this->gre);\n\t\t$criteria->compare('appl_major',$this->appl_major,true);\n\t\t$criteria->compare('appl_degree',$this->appl_degree,true);\n\t\t$criteria->compare('appl_country',$this->appl_country,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('goods_code',$this->goods_code,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('brand_id',$this->brand_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('size',$this->size,true);\n\t\t$criteria->compare('material',$this->material,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('purchase_price',$this->purchase_price,true);\n\t\t$criteria->compare('selling_price',$this->selling_price,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('meta_title',$this->meta_title,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ContractsDetailID',$this->ContractsDetailID,true);\n\t\t$criteria->compare('ContractID',$this->ContractID,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\t\t$criteria->compare('CustomerID',$this->CustomerID,true);\n\t\t$criteria->compare('Share',$this->Share);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = $this->criteriaSearch();\r\n\t\t$criteria->limit = 10;\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('organizationName',$this->organizationName,true);\n\t\t$criteria->compare('contactNo',$this->contactNo,true);\n\t\t$criteria->compare('partnerType',$this->partnerType);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('emailId',$this->emailId,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('firstName',$this->firstName,true);\n\t\t$criteria->compare('lastName',$this->lastName,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_ID,$this->{Globals::FLD_NAME_ACTIVITY_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_TASK_ID,$this->{Globals::FLD_NAME_TASK_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_BY_USER_ID,$this->{Globals::FLD_NAME_BY_USER_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_TYPE,$this->{Globals::FLD_NAME_ACTIVITY_TYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_SUBTYPE,$this->{Globals::FLD_NAME_ACTIVITY_SUBTYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_COMMENTS,$this->{Globals::FLD_NAME_COMMENTS},true);\n\t\t$criteria->compare(Globals::FLD_NAME_CREATED_AT,$this->{Globals::FLD_NAME_CREATED_AT},true);\n\t\t$criteria->compare(Globals::FLD_NAME_SOURCE_APP,$this->{Globals::FLD_NAME_SOURCE_APP},true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('manufacturers_image',$this->manufacturers_image,true);\n\t\t$criteria->compare('date_added',$this->date_added);\n\t\t$criteria->compare('last_modified',$this->last_modified);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_clicked',$this->url_clicked);\n\t\t$criteria->compare('date_last_click',$this->date_last_click);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('date',$this->date);\n\t\t$criteria->compare('del',$this->del);\n\t\t$criteria->compare('action_id',$this->action_id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('catalog',$this->catalog,true);\n\t\t$criteria->compare('is_new',$this->is_new);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('case',$this->case);\n\t\t$criteria->compare('basis_doc',$this->basis_doc);\n\t\t$criteria->compare('calc_group',$this->calc_group);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('competition',$this->competition);\n\t\t$criteria->compare('partner',$this->partner);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('website',$this->website,true);\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('data_attributes_fields',$this->data_attributes_fields,true);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('created',$this->created,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('skill_id',$this->skill_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('field_name',$this->field_name);\n\t\t$criteria->compare('content',$this->content);\n\t\t$criteria->compare('old_data',$this->old_data,true);\n\t\t$criteria->compare('new_data',$this->new_data,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n $criteria->compare('actionPrice',$this->actionPrice);\n\t\t$criteria->compare('translit',$this->translit,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('display_description',$this->display_description,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\t\t$criteria->compare('editing',$this->editing);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('BrandID', $this->BrandID);\n $criteria->compare('BrandName', $this->BrandName, true);\n $criteria->compare('Pinyin', $this->Pinyin, true);\n $criteria->compare('Remarks', $this->Remarks, true);\n $criteria->compare('OrganID', $this->OrganID);\n $criteria->compare('UserID', $this->UserID);\n $criteria->compare('CreateTime', $this->CreateTime);\n $criteria->compare('UpdateTime', $this->UpdateTime);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('componente_id',$this->componente_id);\n\t\t$criteria->compare('tipo_dato',$this->tipo_dato,true);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('cruce_automatico',$this->cruce_automatico,true);\n\t\t$criteria->compare('sw_obligatorio',$this->sw_obligatorio,true);\n\t\t$criteria->compare('orden',$this->orden);\n\t\t$criteria->compare('sw_puntaje',$this->sw_puntaje,true);\n\t\t$criteria->compare('sw_estado',$this->sw_estado,true);\n\t\t$criteria->compare('todos_obligatorios',$this->todos_obligatorios,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('real_name',$this->real_name,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('zip_code',$this->zip_code,true);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('district_id',$this->district_id);\n\t\t$criteria->compare('district_address',$this->district_address,true);\n\t\t$criteria->compare('street_address',$this->street_address,true);\n\t\t$criteria->compare('is_default',$this->is_default);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_time',$this->update_time);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('EMCE_ID',$this->EMCE_ID);\n\t\t$criteria->compare('MOOR_ID',$this->MOOR_ID);\n\t\t$criteria->compare('EVCR_ID',$this->EVCR_ID);\n\t\t$criteria->compare('EVES_ID',$this->EVES_ID);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('customerName',$this->customerName,true);\n\t\t$criteria->compare('agencyHead',$this->agencyHead,true);\n\t\t$criteria->compare('region_id',$this->region_id);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('municipalityCity_id',$this->municipalityCity_id);\n\t\t$criteria->compare('barangay_id',$this->barangay_id);\n\t\t$criteria->compare('houseNumber',$this->houseNumber,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('nature_id',$this->nature_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->name,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('state',$this->address,true);\n\t\t$criteria->compare('country',$this->address,true);\n\t\t$criteria->compare('contact_number',$this->contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('deleted_by',$this->deleted_by,true);\n\t\t$criteria->compare('created_at',$this->created_at,true);\n\t\t$criteria->compare('updated_at',$this->updated_at,true);\n\t\tif(YII::app()->user->getState(\"role\") == \"admin\") {\n\t\t\t$criteria->condition = 'is_deleted = 0';\n\t\t}\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('professional_status_id',$this->professional_status);\n\t\t$criteria->compare('birthday',$this->birthday);\n\t\t$criteria->compare('location',$this->location);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\r\n\t{\r\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\r\r\n\t\t$criteria->compare('id',$this->id);\r\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\r\n\t\t$criteria->compare('adds',$this->adds);\r\r\n\t\t$criteria->compare('edits',$this->edits);\r\r\n\t\t$criteria->compare('deletes',$this->deletes);\r\r\n\t\t$criteria->compare('view',$this->view);\r\r\n\t\t$criteria->compare('lists',$this->lists);\r\r\n\t\t$criteria->compare('searches',$this->searches);\r\r\n\t\t$criteria->compare('prints',$this->prints);\r\r\n\r\r\n\t\treturn new CActiveDataProvider($this, array(\r\r\n\t\t\t'criteria'=>$criteria,\r\r\n\t\t));\r\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('applyId',$this->applyId);\n\t\t$criteria->compare('stuId',$this->stuId);\n\t\t$criteria->compare('stuName',$this->stuName,true);\n\t\t$criteria->compare('specification',$this->specification,true);\n\t\t$criteria->compare('assetName',$this->assetName,true);\n\t\t$criteria->compare('applyTime',$this->applyTime,true);\n\t\t$criteria->compare('loanTime',$this->loanTime,true);\n\t\t$criteria->compare('returnTime',$this->returnTime,true);\n\t\t$criteria->compare('RFID',$this->RFID,true);\n\t\t$criteria->compare('stuTelNum',$this->stuTelNum,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('verid',$this->verid);\n\t\t$criteria->compare('appversion',$this->appversion,true);\n\t\t$criteria->compare('appfeatures',$this->appfeatures,true);\n\t\t$criteria->compare('createtime',$this->createtime,true);\n\t\t$criteria->compare('baseNum',$this->baseNum);\n\t\t$criteria->compare('slave1Num',$this->slave1Num);\n\t\t$criteria->compare('packagename',$this->packagename,true);\n\t\t$criteria->compare('ostype',$this->ostype);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('itemcode', $this->itemcode, true);\n $criteria->compare('product_id', $this->product_id, true);\n $criteria->compare('delete_flag', $this->delete_flag);\n $criteria->compare('status', $this->status);\n $criteria->compare('expire', $this->expire, true);\n $criteria->compare('date_input', $this->date_input, true);\n $criteria->compare('d_update', $this->d_update, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('client_id',$this->client_id,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('rel_type',$this->rel_type,true);\n\t\t$criteria->compare('rel_id',$this->rel_id,true);\n\t\t$criteria->compare('meta_key',$this->meta_key,true);\n\t\t$criteria->compare('meta_value',$this->meta_value,true);\n\t\t$criteria->compare('date_entry',$this->date_entry,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('column_id',$this->column_id,true);\n\t\t$criteria->compare('research_title',$this->research_title,true);\n\t\t$criteria->compare('research_url',$this->research_url,true);\n\t\t$criteria->compare('column_type',$this->column_type);\n\t\t$criteria->compare('filiale_id',$this->filiale_id,true);\n\t\t$criteria->compare('area_name',$this->area_name,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('trigger_config',$this->trigger_config);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('terminal_type',$this->terminal_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('explain',$this->explain,true);\n\t\t$criteria->compare('_delete',$this->_delete);\n\t\t$criteria->compare('_create_time',$this->_create_time,true);\n\t\t$criteria->compare('_update_time',$this->_update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('birthday',$this->birthday,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('is_get_news',$this->is_get_news);\n\t\t$criteria->compare('user_id',$this->user_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('order_id',$this->order_id);\n\t\t$criteria->compare('device_id',$this->device_id,true);\n\t\t$criteria->compare('money',$this->money,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('recharge_type',$this->recharge_type);\n\t\t$criteria->compare('channel',$this->channel,true);\n\t\t$criteria->compare('version_name',$this->version_name,true);\n\t\t$criteria->compare('pay_channel',$this->pay_channel);\n\t\t$criteria->compare('chanel_bid',$this->chanel_bid);\n\t\t$criteria->compare('chanel_sid',$this->chanel_sid);\n\t\t$criteria->compare('versionid',$this->versionid);\n\t\t$criteria->compare('chanel_web',$this->chanel_web);\n\t\t$criteria->compare('dem_num',$this->dem_num);\n\t\t$criteria->compare('last_watching',$this->last_watching,true);\n\t\t$criteria->compare('pay_type',$this->pay_type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('country_id', $this->country_id);\r\n $criteria->compare('user_id', $this->user_id);\r\n $criteria->compare('vat', $this->vat);\r\n $criteria->compare('manager_coef', $this->manager_coef);\r\n $criteria->compare('curator_coef', $this->curator_coef);\r\n $criteria->compare('admin_coef', $this->admin_coef);\r\n $criteria->compare('status', $this->status);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('purchase_price',$this->purchase_price);\n\t\t$criteria->compare('sell_price',$this->sell_price);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('measurement',$this->measurement,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\t\t$criteria->compare('date_out',$this->date_out,true);\n\t\t$criteria->compare('date_in',$this->date_in,true);\n\t\t$criteria->compare('firma_id',$this->firma_id,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('instock',$this->instock);\n\t\t$criteria->compare('user_id',$this->user_id);\n $criteria->compare('warning_amount',$this->warning_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('mname',$this->mname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('landline',$this->landline,true);\n\t\t$criteria->compare('em_contact_name',$this->em_contact_name,true);\n\t\t$criteria->compare('em_contact_relation',$this->em_contact_relation,true);\n\t\t$criteria->compare('em_contact_number',$this->em_contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\n return new CActiveDataProvider( $this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState( 'pageSize', Yii::app()->params[ 'defaultPageSize' ] ),\n ),\n ) );\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sys_name',$this->sys_name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('CustomerId',$this->CustomerId,true);\n\t\t$criteria->compare('AddressId',$this->AddressId,true);\n\t\t$criteria->compare('CustomerStatusId',$this->CustomerStatusId,true);\n\t\t$criteria->compare('DateMasterId',$this->DateMasterId,true);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('CustomerPhoto',$this->CustomerPhoto,true);\n\t\t$criteria->compare('CustomerCode',$this->CustomerCode);\n\t\t$criteria->compare('Telephone',$this->Telephone,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('EmailId',$this->EmailId,true);\n\t\t$criteria->compare('Status',$this->Status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$parameters = array('limit'=>ceil(Profile::getResultsPerPage()));\n\t\t$criteria->scopes = array('findAll'=>array($parameters));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('itemId',$this->itemId);\n\t\t$criteria->compare('changedBy',$this->changedBy,true);\n\t\t$criteria->compare('recordName',$this->recordName,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\t\t$criteria->compare('oldValue',$this->oldValue,true);\n\t\t$criteria->compare('newValue',$this->newValue,true);\n\t\t$criteria->compare('diff',$this->diff,true);\n\t\t$criteria->compare('timestamp',$this->timestamp);\n\n\t\treturn new SmartActiveDataProvider(get_class($this), array(\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'timestamp DESC',\n\t\t\t),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Profile::getResultsPerPage(),\n\t\t\t),\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\n\t\t$criteria->compare('mem_type',$this->mem_type);\r\n\t\t$criteria->compare('business_type',$this->business_type);\r\n\t\t$criteria->compare('product_name',$this->product_name,true);\r\n\t\t$criteria->compare('panit',$this->panit,true);\r\n\t\t$criteria->compare('sex',$this->sex);\r\n\t\t$criteria->compare('tname',$this->tname);\r\n\t\t$criteria->compare('ftname',$this->ftname,true);\r\n\t\t$criteria->compare('ltname',$this->ltname,true);\r\n\t\t$criteria->compare('etname',$this->etname);\r\n\t\t$criteria->compare('fename',$this->fename,true);\r\n\t\t$criteria->compare('lename',$this->lename,true);\r\n\t\t$criteria->compare('birth',$this->birth,true);\r\n\t\t$criteria->compare('email',$this->email,true);\r\n\t\t$criteria->compare('facebook',$this->facebook,true);\r\n\t\t$criteria->compare('twitter',$this->twitter,true);\r\n\t\t$criteria->compare('address',$this->address,true);\r\n\t\t$criteria->compare('province',$this->province);\r\n\t\t$criteria->compare('prefecture',$this->prefecture);\r\n\t\t$criteria->compare('district',$this->district);\r\n\t\t$criteria->compare('postcode',$this->postcode,true);\r\n\t\t$criteria->compare('tel',$this->tel,true);\r\n\t\t$criteria->compare('mobile',$this->mobile,true);\r\n\t\t$criteria->compare('fax',$this->fax,true);\r\n\t\t$criteria->compare('high_education',$this->high_education);\r\n\t\t$criteria->compare('career',$this->career);\r\n\t\t$criteria->compare('skill_com',$this->skill_com);\r\n\t\t$criteria->compare('receive_news',$this->receive_news,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('locality',$this->locality,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('table_id',$this->table_id);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cou_id',$this->cou_id);\n\t\t$criteria->compare('thm_id',$this->thm_id);\n\t\t$criteria->compare('cou_nom',$this->cou_nom,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID_VALOR',$this->ID_VALOR);\n\t\t$criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('ID_VISITA',$this->ID_VISITA);\n\t\t$criteria->compare('VALOR',$this->VALOR);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t\n\t\t$criteria->compare('id_aspecto',$this->id_aspecto,true);\n\t\t$criteria->compare('tbl_Programa_id_programa',$this->tbl_Programa_id_programa,true);\n\t\t$criteria->compare('tbl_Factor_id_factor',$this->tbl_Factor_id_factor);\n\t\t$criteria->compare('tbl_caracteristica_id_caracteristica',$this->tbl_caracteristica_id_caracteristica,true);\n\t\t$criteria->compare('num_aspecto',$this->num_aspecto,true);\n\t\t$criteria->compare('aspecto',$this->aspecto,true);\n\t\t$criteria->compare('instrumento',$this->instrumento,true);\n\t\t$criteria->compare('fuente',$this->fuente,true);\n\t\t$criteria->compare('documento',$this->documento,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('Observaciones',$this->Observaciones,true);\n\t\t$criteria->compare('cumple',$this->cumple,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('website_url',$this->website_url,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('user_name',$this->user_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('created_datetime',$this->created_datetime,true);\n\t\t$criteria->compare('icon_src',$this->icon_src,true);\n\t\t$criteria->compare('show_r18',$this->show_r18);\n\t\t$criteria->compare('show_bl',$this->show_bl);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('creationDate',$this->creationDate,true);\n\t\t$criteria->compare('year',$this->year);\n\t\t$criteria->compare('term',$this->term,true);\n\t\t$criteria->compare('activated',$this->activated);\n\t\t$criteria->compare('startingDate',$this->startingDate,true);\n\t\t$criteria->compare('activation_userId',$this->activation_userId);\n\t\t$criteria->compare('parent_catalogId',$this->parent_catalogId);\n $criteria->compare('isProspective', $this->isProspective);\n $criteria->compare('creatorId', $this->creatorId);\n $criteria->compare('isProposed', $this->isProposed);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('location',$this->location);\n\t\t$criteria->compare('theripiest',$this->theripiest);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('dob',$this->dob,true);\n\t\t$criteria->compare('inurancecompany',$this->inurancecompany,true);\n\t\t$criteria->compare('injurydate',$this->injurydate,true);\n\t\t$criteria->compare('therapy_start_date',$this->therapy_start_date,true);\n\t\t$criteria->compare('ASIA',$this->ASIA,true);\n\t\t$criteria->compare('injury',$this->injury,true);\n\t\t$criteria->compare('medication',$this->medication,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search () {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('formId', $this->formId, true);\n\t\t$criteria->compare('data', $this->data, true);\n\t\t$criteria->compare('ctime', $this->ctime);\n\t\t$criteria->compare('mtime', $this->mtime);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('imputetype_id',$this->imputetype_id);\n\t\t$criteria->compare('project_id',$this->project_id);\n\n\t\treturn new ActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('category_id',$this->category_id);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('price_z',$this->price_z);\n\t\t$criteria->compare('price_s',$this->price_s);\n\t\t$criteria->compare('price_m',$this->price_m);\n\t\t$criteria->compare('dependence',$this->dependence,true);\n\t\t$criteria->compare('barcode',$this->barcode,true);\n\t\t$criteria->compare('unit',$this->unit,true);\n\t\t$criteria->compare('minimal_amount',$this->minimal_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 100),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('image',$this->image,true);\n\t\t$criteria->compare('manager',$this->manager);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('realname',$this->realname,true);\n\t\t$criteria->compare('identity',$this->identity,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('bussiness_license',$this->bussiness_license,true);\n\t\t$criteria->compare('bankcode',$this->bankcode,true);\n\t\t$criteria->compare('banktype',$this->banktype,true);\n\t\t$criteria->compare('is_open',$this->is_open,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('images_str',$this->images_str,true);\n\t\t$criteria->compare('gmt_created',$this->gmt_created,true);\n\t\t$criteria->compare('gmt_modified',$this->gmt_modified,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email_admin',$this->email_admin,true);\n\t\t$criteria->compare('password_api',$this->password_api,true);\n\t\t$criteria->compare('url_result_api',$this->url_result_api,true);\n\t\t$criteria->compare('id_currency_2',$this->id_currency_2);\n\t\t$criteria->compare('id_currency_1',$this->id_currency_1,true);\n\t\t$criteria->compare('is_test_mode',$this->is_test_mode);\n\t\t$criteria->compare('is_commission_shop',$this->is_commission_shop);\n\t\t$criteria->compare('commission',$this->commission);\n\t\t$criteria->compare('is_enable',$this->is_enable);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('mod_date',$this->mod_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID,true);\n\t\t$criteria->compare('userID',$this->userID,true);\n\t\t$criteria->compare('mtID',$this->mtID,true);\n\t\t$criteria->compare('fxType',$this->fxType);\n\t\t$criteria->compare('leverage',$this->leverage);\n\t\t$criteria->compare('amount',$this->amount,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('surname',$this->surname,true);\n\t\t$criteria->compare('comany_name',$this->comany_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('is_admin',$this->is_admin);\n\t\t$criteria->compare('paid_period_start',$this->paid_period_start,true);\n\t\t$criteria->compare('ftp_pass',$this->ftp_pass,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('HISTORY',$this->HISTORY,true);\n\t\t$criteria->compare('WELCOME_MESSAGE',$this->WELCOME_MESSAGE,true);\n\t\t$criteria->compare('LOCATION',$this->LOCATION,true);\n\t\t$criteria->compare('PHONES',$this->PHONES,true);\n\t\t$criteria->compare('FAX',$this->FAX,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('MISSION',$this->MISSION,true);\n\t\t$criteria->compare('VISION',$this->VISION,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('price',$this->price,true);\n\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('breed',$this->breed,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_birthday',$this->date_birthday,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('tattoo',$this->tattoo,true);\n\t\t$criteria->compare('sire',$this->sire,true);\n\t\t$criteria->compare('dame',$this->dame,true);\n\t\t$criteria->compare('owner_type',$this->owner_type,true);\n\t\t$criteria->compare('honors',$this->honors,true);\n\t\t$criteria->compare('photo_preview',$this->photo_preview,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('pet_status',$this->pet_status,true);\n\t\t$criteria->compare('about',$this->about,true);\n\t\t$criteria->compare('uid',$this->uid);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('veterinary',$this->veterinary,true);\n\t\t$criteria->compare('vaccinations',$this->vaccinations,true);\n\t\t$criteria->compare('show_class',$this->show_class,true);\n\t\t$criteria->compare('certificate',$this->certificate,true);\n $criteria->compare('neutered_spayed',$this->certificate,true);\n \n\n $criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('city',$this->city,true);\n\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('orgName',$this->orgName,true);\n\t\t$criteria->compare('noEmp',$this->noEmp);\n\t\t$criteria->compare('phone',$this->phone);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('addr1',$this->addr1,true);\n\t\t$criteria->compare('addr2',$this->addr2,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('orgType',$this->orgType,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('fax',$this->fax);\n\t\t$criteria->compare('orgId',$this->orgId,true);\n\t\t$criteria->compare('validity',$this->validity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('sortorder',$this->sortorder,true);\n\t\t$criteria->compare('fullname',$this->fullname,true);\n\t\t$criteria->compare('shortname',$this->shortname,true);\n\t\t$criteria->compare('idnumber',$this->idnumber,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('summaryformat',$this->summaryformat);\n\t\t$criteria->compare('format',$this->format,true);\n\t\t$criteria->compare('showgrades',$this->showgrades);\n\t\t$criteria->compare('sectioncache',$this->sectioncache,true);\n\t\t$criteria->compare('modinfo',$this->modinfo,true);\n\t\t$criteria->compare('newsitems',$this->newsitems);\n\t\t$criteria->compare('startdate',$this->startdate,true);\n\t\t$criteria->compare('marker',$this->marker,true);\n\t\t$criteria->compare('maxbytes',$this->maxbytes,true);\n\t\t$criteria->compare('legacyfiles',$this->legacyfiles);\n\t\t$criteria->compare('showreports',$this->showreports);\n\t\t$criteria->compare('visible',$this->visible);\n\t\t$criteria->compare('visibleold',$this->visibleold);\n\t\t$criteria->compare('groupmode',$this->groupmode);\n\t\t$criteria->compare('groupmodeforce',$this->groupmodeforce);\n\t\t$criteria->compare('defaultgroupingid',$this->defaultgroupingid,true);\n\t\t$criteria->compare('lang',$this->lang,true);\n\t\t$criteria->compare('theme',$this->theme,true);\n\t\t$criteria->compare('timecreated',$this->timecreated,true);\n\t\t$criteria->compare('timemodified',$this->timemodified,true);\n\t\t$criteria->compare('requested',$this->requested);\n\t\t$criteria->compare('enablecompletion',$this->enablecompletion);\n\t\t$criteria->compare('completionnotify',$this->completionnotify);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('zipcode',$this->zipcode,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('role',$this->role,true);\n\t\t$criteria->compare('active',$this->active);\n\t\t$criteria->compare('camaras',$this->camaras);\n\t\t$criteria->compare('freidoras',$this->freidoras);\n\t\t$criteria->compare('cebos',$this->cebos);\n\t\t$criteria->compare('trampas',$this->trampas);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cod_venda',$this->cod_venda,true);\n\t\t$criteria->compare('filial_cod_filial',$this->filial_cod_filial,true);\n\t\t$criteria->compare('funcionario_cod_funcionario',$this->funcionario_cod_funcionario,true);\n\t\t$criteria->compare('cliente_cod_cliente',$this->cliente_cod_cliente,true);\n\t\t$criteria->compare('data_2',$this->data_2,true);\n\t\t$criteria->compare('valor_total',$this->valor_total);\n\t\t$criteria->compare('forma_pagamento',$this->forma_pagamento,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('attribute',$this->attribute,true);\n\t\t$criteria->compare('displayName',$this->displayName,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('value_type',$this->value_type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->buscar,'OR');\n\t\t$criteria->compare('fecha',$this->buscar,true,'OR');\n\t\t$criteria->compare('fechaUpdate',$this->buscar,true,'OR');\n\t\t$criteria->compare('idProfesional',$this->buscar,'OR');\n\t\t$criteria->compare('importe',$this->buscar,'OR');\n\t\t$criteria->compare('idObraSocial',$this->buscar,'OR');\n\t\t$criteria->compare('estado',$this->buscar,true,'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('codop',$this->codop,true);\n\t\t$criteria->compare('codcatval',$this->codcatval,true);\n\t\t$criteria->compare('cuentadebe',$this->cuentadebe,true);\n\t\t$criteria->compare('cuentahaber',$this->cuentahaber,true);\n\t\t$criteria->compare('desop',$this->desop,true);\n\t\t$criteria->compare('descat',$this->descat,true);\n\t\t$criteria->compare('debe',$this->debe,true);\n\t\t$criteria->compare('haber',$this->haber,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pagesize'=>100),\n\t\t));\n\t}" ]
[ "0.72127825", "0.7136067", "0.7093868", "0.7092793", "0.69851667", "0.69601536", "0.69477975", "0.6940818", "0.69330317", "0.6923378", "0.690978", "0.69027317", "0.68979496", "0.68971545", "0.6892498", "0.688223", "0.68793845", "0.6873633", "0.6848405", "0.68481565", "0.68344474", "0.68248796", "0.6815281", "0.68071365", "0.68030006", "0.67969006", "0.67962015", "0.6795326", "0.6794667", "0.67936474", "0.67895097", "0.67850757", "0.6784554", "0.6783576", "0.6780559", "0.678039", "0.6778287", "0.67775595", "0.6776229", "0.67755276", "0.6774439", "0.6774439", "0.6774439", "0.6774439", "0.6774439", "0.6774439", "0.6774439", "0.6774439", "0.6772257", "0.67681736", "0.6766741", "0.6765388", "0.67620844", "0.6761996", "0.67607635", "0.67605174", "0.6758544", "0.675808", "0.67532384", "0.67531157", "0.6751695", "0.67481714", "0.6747892", "0.67464304", "0.67446625", "0.67444783", "0.67441547", "0.6743848", "0.67436653", "0.674305", "0.67413104", "0.6740276", "0.67395735", "0.67384887", "0.67367435", "0.6734255", "0.6731825", "0.67306423", "0.672503", "0.6722928", "0.6722267", "0.67212665", "0.6712663", "0.6712623", "0.6710047", "0.6708465", "0.6706299", "0.670594", "0.67055833", "0.67035687", "0.6702478", "0.6700182", "0.6698587", "0.6696019", "0.66949546", "0.66945523", "0.66928726", "0.6692768", "0.6692374", "0.6690821" ]
0.6737069
74
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.75750446", "0.7528519", "0.7271581", "0.72703993", "0.72617143", "0.7213263", "0.72127366", "0.7131883", "0.71287453", "0.71287453", "0.7102495", "0.7102467", "0.7102467", "0.7074701", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163", "0.7064163" ]
0.0
-1
check return auth code
public function isSuccessful() { $status = $this->checkReturnHashPayment(); if ($status !== true) { $this->message = $status; } return $status === true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkingApiCanAuthenticateCode($auth_code)\n {\n return $this->api_request->get(\"user\",\"validate_user_code\",$params=array('code'=>$auth_code)); \n }", "function check_auth_response_code($status) {\n\n if ($status != 'S000') {\n $message = get_ticket_error_message($status);\n return result_error($status,$message);\n }\n return result_success();\n}", "public function checkAuth();", "public function checkAuth();", "public function check_authorization_response(){\n if(!isset($_SESSION))\n session_start();\n\n // no LINE_CRSF is set in session\n if(!isset($_SESSION['LINE_CRSF']))\n throw new Exception('Fail to check CRSF token');\n\n // CRSF token not match\n $state = isset($_GET['state']) ? $_GET['state'] : null;\n // equalty check can be rewrite with hash_equals()\n if($_SESSION['LINE_CRSF'] !== $state)\n throw new Exception('CRSF token not match');\n\n unset($_SESSION['LINE_CRSF']);\n\n // user denies the premissions requested\n // NOTICE:\n // LINE server redirect user who does not have\n // developer role with following error (in GET data)\n // error=access_denied\n // error_description=The+authorization+server+denied+the+request.+This+channel+is+now+developing+status.+User+need+to+have+developer+role\n // To solve this, go to your LINE Login channel then\n // click the Developing label on the top right to proceed\n // publish your channel\n if(isset($_GET['error'])){\n throw new Exception(json_encode(array(\n 'error' => $_GET['error'],\n 'error_description' => $_GET['error_description'],\n )));\n }\n\n $this->authorization_code = $_GET['code'];\n return $this->authorization_code;\n }", "public function isAuthenticatedSuccessfully(): bool;", "function checkAuthorized() {\n\t if (AUTHORIZED === true) {\n\t \t// authorized\n\t } else {\n\t \theader('HTTP/1.0 401 Unauthorized');\n\t \techo 'failed authorization';\n\t \texit(401);\n\t } \n }", "public function checkAuthentication() {}", "function aCAuth($r)\t{\n\t\tif ($this->authCode && !strcmp($this->authCode,$this->authCode($r)))\t{\n\t\t\treturn true;\n\t\t}\n\t}", "function wp_auth_check($response)\n {\n }", "public static function verifyAuth($auth) {\n\t\t$GLOBALS[\"logger\"]->debug(\"in verifyAuth, code \" . $auth);\n\t\t$resultSet = ORM::for_table(self::AUTHCODE_TABLE)->\n\t\t\tselect('code_hash')->\n\t\t\tfind_many();\n\t\t$GLOBALS[\"logger\"]->debug(\"completed query\");\n\t\tforeach ($resultSet as $result) {\n\t\t\t$hash = $result->code_hash;\n\t\t\t$GLOBALS[\"logger\"]->debug(\"Checking hash \" . $hash);\n\t\t\tif (password_verify($auth, $hash)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t$GLOBALS[\"logger\"]->debug(\"No hash matched\");\n\t\treturn false;\n\t\t//$selstmt = \"SELECT CODE_HASH FROM AUTHCODES\";\n\t}", "public function testLoginPageResponseCode()\n {\n $response = $this->call('GET', '/auth/login');\n $this->assertEquals(200, $response->status());\n }", "public function authorize_result()\n\t{\t\n\t\tif(isset($_GET['code']))\n\t\t{\n\t\t\tif($this->oauth->ci->session->userdata('state') !== $_GET['state'])\n\t\t\t{\n\t\t\t\treturn $this->oauth->response('failure', array(\n 'error' => $this->oauth->ci->lang->line('error_xsfr_victim')\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $this->oauth->response('success', array(\n\t\t\t\t\t\t'token' => $_GET['code'],\n\t\t\t\t\t\t'state' => $_GET['state']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($_GET['error']))\n\t\t{\n\t\t\treturn $this->oauth->response('failure', array(\n\t\t\t\t\t'error' => $_GET['error_description']\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public function checkAuth()\n\t{\t\t\n\t\t$url = \"http://{$this->wnServer}/webnative/portalDI\";\n\t\t$authinfo = json_decode($this->curlObj->fetch_url($url),true);\n\t\treturn $authinfo;\n\t}", "public function checkAuth()\n {\n try{\n //get the token from the authorization header\n $token = JWTAuth::getToken();\n \n //get the payload from the token\n $payload = JWTAuth::getPayload($token);\n \n //get User id from the token\n $p_user_id = AuthenticateController::getUserIdFromToken();\n\n //check if the user is an admin and activated\n if(AuthenticateController::isUserAdminAndActive($p_user_id)){\n return $token;\n }else{\n return response()->json(['error' => 'you are not an activated user or you dont had administrator rights']);\n }\n } \n catch(\\Exception $e){\n return response()->json(['error' => 'login failed. no or wrong token was founded.']);\n }\n }", "private function _getAuth()\n {\n if (!isset($_SERVER['PHP_AUTH_USER'])) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Sorry this action is not allowed for you';\n return false;\n } else {\n \n if ($_SERVER['PHP_AUTH_USER'] == 'testUser' && $_SERVER['PHP_AUTH_PW'] == 'testPassword') {\n return true;\n }\n \n return false;\n \n }\n }", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n return true;\n }\n }", "protected function check_auth( )\n\t{\n\t\t$page = $this->uri->segment( 2);\n\t\t$section = $this->uri->segment(1);\t\t\n\t\t$function = $this->uri->segment(3);\n\t\t\n\t\tif( $section == 'api' and $page == 'users' and $function == 'login' )\n\t\t\treturn;\n\n\t\t$logged_in = $this->is_logged_in();\n\t\t$excused_uri = array('login' , 'recover_password' , 'auth_help' , 'token_login');\n\t\tif( ! $logged_in )\n\t\t{\n\t\t\t//if in app mode\n\t\t\tif( $this->_app_mode == 'json' and $section != 'admin' )\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$this->output->set_status_header('401');\n\t\t\t\texit;\n\t\t\t}\n\t\t\t//check if is login page\n\t\t\tif( $section == 'admin' and ( ! in_array($page, $excused_uri) ) )\n\t\t\t{\n\t\t\t\theader('Location: /admin/login');\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t\n\n\t\treturn;\n\t}", "private function _checkAuth()\n { if(!(isset($_SERVER['HTTP_X_USERNAME']) and isset($_SERVER['HTTP_X_PASSWORD']))) {\n // Error: Unauthorized\n $this->_sendResponse(401);\n }\n $username = $_SERVER['HTTP_X_USERNAME'];\n $password = $_SERVER['HTTP_X_PASSWORD'];\n // Find the user\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\n if($user===null) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Name is invalid');\n } else if(!$user->validatePassword($password)) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Password is invalid');\n }\n }", "public function getCode()\n {\n return $this->isSuccessful() ? $this->data[\"AuthCode\"] : parent::getCode();\n }", "function auth(){\n\t\t//TODO auth implementieren\n\t\treturn true;\n\t}", "public function authenticate()\n\t{\n\t if($this->pop_authenticate($this->username, $this->password,\"192.168.121.26\"))\n {\n\t\t\t$this->errorCode=self::ERROR_NONE;\n }\n else\n {\n\t\t\t$this->errorCode=self::ERROR_PASSWORD_INVALID;\n }\n\t\treturn !$this->errorCode;\n\t}", "public function authenticate()\n\t{\n\t\t$this->errorCode==self::ERROR_NONE;\n\t}", "function rest_authorization_required_code()\n {\n }", "public function authenticate($code){\n\t\t$this->client->authenticate($_GET['code']);\n\t\t$_SESSION['token'] = $this->_token = $this->client->getAccessToken();\n\n\t\tif (isset($_SESSION['token'])) {\n\t\t\t$this->client->setAccessToken($_SESSION['token']);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\n\t}", "private function verify_request()\n {\n try{\n $headers = $this->input->request_headers();\n $token = $headers['X-API-KEY'];\n if(!$token) {\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n return;\n }\n\n $data = AUTHORIZATION::validateToken($token);\n if($data === false){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized accesss'];\n $this->response($res, $status);\n exit();\n }else{\n return $data;\n }\n\n }catch(Exception $e){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n }\n }", "private function verify_request()\n {\n try{\n $headers = $this->input->request_headers();\n $token = $headers['X-API-KEY'];\n if(!$token) {\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n return;\n }\n\n $data = AUTHORIZATION::validateToken($token);\n if($data === false){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized accesss'];\n $this->response($res, $status);\n exit();\n }else{\n return $data;\n }\n\n }catch(Exception $e){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n }\n }", "public function authIsOk() {\n return $this->userID !== 0;\n }", "public function checkAuth(){\n if( isset($_COOKIE['Auth']) ) {\n $result = $this->select(array(\"hash\"=>$_COOKIE['Auth']));\n if(!empty($result)){\n return $result[0];\n } else {\n return false;\n }\n \n } else {\n return false;\n }\n }", "public function isSuccessful(){\r\n return $this->code>=200&& $this->code <300;\r\n }", "public function verify()\n {\n switch ($this->type) {\n default:\n case self::AUTH_BASIC:\n\n if ($authorization = input()->server('HTTP_AUTHORIZATION')) {\n $authentication = unserialize(base64_decode($authorization));\n if ($this->login($authentication[ 'username' ], $authentication[ 'password' ])) {\n return true;\n }\n } else {\n $authentication = $this->parseBasic();\n }\n\n if ($this->login($authentication[ 'username' ], $authentication[ 'password' ])) {\n\n header('Authorization: Basic ' . base64_encode(serialize($authentication)));\n\n return true;\n } else {\n unset($_SERVER[ 'PHP_AUTH_USER' ], $_SERVER[ 'PHP_AUTH_PW' ]);\n $this->protect();\n }\n\n break;\n case self::AUTH_DIGEST:\n if ($authorization = input()->server('HTTP_AUTHORIZATION')) {\n $authentication = $this->parseDigest($authorization);\n } elseif ($authorization = input()->server('PHP_AUTH_DIGEST')) {\n $authentication = $this->parseDigest($authorization);\n }\n\n if (isset($authentication) AND\n false !== ($password = $this->login($authentication[ 'username' ]))\n ) {\n $A1 = md5($authentication[ 'username' ] . ':' . $this->realm . ':' . $password);\n $A2 = md5($_SERVER[ 'REQUEST_METHOD' ] . ':' . $authentication[ 'uri' ]);\n $response = md5(\n $A1\n . ':'\n . $authentication[ 'nonce' ]\n . ':'\n . $authentication[ 'nc' ]\n . ':'\n . $authentication[ 'cnonce' ]\n . ':'\n . $authentication[ 'qop' ]\n . ':'\n . $A2\n );\n\n if ($authentication[ 'response' ] === $response) {\n header(\n sprintf(\n 'Authorization: Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", qop=%s, nc=%s, cnonce=\"%s\", response=\"%s\", opaque=\"%s\"',\n $authentication[ 'username' ],\n $this->realm,\n $authentication[ 'nonce' ],\n $authentication[ 'uri' ],\n $authentication[ 'qop' ],\n $authentication[ 'nc' ],\n $authentication[ 'cnonce' ],\n $response,\n $authentication[ 'opaque' ]\n )\n );\n\n return true;\n }\n }\n\n unset($_SERVER[ 'PHP_AUTH_DIGEST' ], $_SERVER[ 'HTTP_AUTHORIZATION' ]);\n $this->protect();\n\n break;\n }\n\n return false;\n }", "public function returnAuthenticationRequired()\n {\n return $this->returnData(['message' => 'Authentication required', 'code' => 0], 401);\n }", "public function getResponseCode();", "public function getResponseCode();", "public function authorizationCodeResponse()\n {\n $state_orig = $this->session->read('MSGraph.state');\n $state = $this->controller->getRequest()->getQuery('state');\n $code = $this->controller->getRequest()->getQuery('code');\n\n if (empty($code) || $state_orig === false || $state_orig !== $state) {\n return false;\n } // does not match this component\n\n // success! use the authorization code to request a new token\n $this->accessToken($code);\n\n $redirect = $this->session->read('MSGraph.redirect');\n $this->session->delete('MSGraph.state');\n $this->session->delete('MSGraph.redirect');\n if ($redirect) {\n return $this->controller->redirect($redirect);\n }\n\n return false;\n }", "protected function statusCodeFail(): int\n {\n return 401;\n }", "public function auth()\n\t{\n\t\t$r = $this->do_auth();\n\t\t$x['status'] = $r;\n\t\techo json_encode($x);die;\n\t}", "public function authenticationFailure()\n {\n return $this->sendFailed(\"not authenticated\");\n }", "function doSecureAuthValidate(){\n\t\n\t\tif(\t@$this->loginKey == \"\" || @$this->identification == \"\"){\n\t\t\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"You need to login to access this service \", \"localStorage.clear(); window.location='index.html'; \");\n\t\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->doSecureAuth(@$this->loginKey, @$this->obsfucate->makeKey($this->sanitize( $this->identification )) );\n\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public function isSuccessful();", "function authenticateUser($authCode)\n {\n\n // define all global variables\n global $user, $database, $message, $translator, $googleAuth;\n\n // secure the string\n $authCode = $database->secureInput($authCode);\n\n // check if empty string\n if ($authCode == \"\") {\n $message->setError($translator->translateText(\"allFieldsRequired\"), Message::Error);\n return false;\n }\n\n // check if string length is 6\n if (strlen($authCode) != 6) {\n $message->setError($translator->translateText(\"authCodeLength\"), Message::Error);\n return false;\n }\n\n // check if codes match\n if (!$googleAuth->checkCode($user->get2FactorCode(), $authCode)) {\n $message->setError($translator->translateText(\"wrongAuthCode\"), Message::Error);\n return false;\n }\n\n // if no errors then authenticate the session and return true\n $_SESSION[\"authenticated\"] = 1;\n return true;\n }", "function browserCredentials() {\n if(isset($_GET['code'])) return true;\n\n return false;\n}", "public function check_auth()\n {\n if (isset($_SESSION['atk_email'])) {\n redirect(base_url().\"permintaan/\");\n }\n }", "public static function sendUnauthorizedResponse(){\n http_response_code(401);\n die();\n }", "public function auth($data)\n {\n // login\n if($data->status === \"login\")\n {\n $credentials = [\n \"email\" => $data->email,\n \"password\" => $data->password\n ];\n Sentry::authenticateAndRemember($credentials);\n return 1;\n }\n\n // logout\n else if(Sentry::check() && $data->status === \"inactive\")\n {\n Sentry::logout();\n }\n\n // register\n else if($data->status === \"register\")\n {\n $credentials = [\n \"email\" => $data->email,\n \"password\" => $data->password,\n \"first_name\" => $data->username,\n \"last_name\" => false,\n \"activated\" => true,\n \"permissions\" => [\n \"user.create\" => 0,\n \"user.view\" => 1\n ]\n ];\n\n if($user = Sentry::createUser($credentials))\n {\n $users = Sentry::findGroupByName(\"Users\");\n $user->addGroup($users);\n Sentry::loginAndRemember($user);\n return $this->app->json($credentials);\n }\n }\n return 0;\n }", "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 check_auth() {\n global $conf;\n if ($_SERVER['PHP_AUTH_USER'] !== $conf['username'] && $_SERVER['PHP_AUTH_PW'] !== $conf['password']) {\n header('WWW-Authenticate: Basic realm=\"CMS\"');\n header('HTTP/1.0 401 Unauthorized');\n print 'Could not authorise.';\n die();\n }\n}", "public function isAuth();", "public function authenticate() {\n\t\treturn FALSE;\n\t}", "public function isAuthenticated()\n {\n //get headers from postMan\n $this->headers = getallheaders();\n //cut the first word from the header, ex:Bearer, the space before and after the token\n $token = !empty($this->headers['Authorization']) ? trim(substr($this->headers['Authorization'], 6)) : null;\n\n //request in the database to take the token\n $tokenDataBase = $this->authToken->getToken();\n\n //the token in the header must exist and be the same as in the base date in order to make the request\n if (!$token || $token !== $tokenDataBase) {\n http_response_code(401);\n echo json_encode(array(\"message\" => \"Unauthorized\"));\n exit;\n }\n }", "public function isOk();", "public function checkAuth()\n {\n return $this->api->check('GP', session('nxs_gp.username'));\n }", "public function isAuth() {}", "protected function verifyAuthorizationCode($authCode){\n $requestParams = [\n 'grant_type' => 'authorization_code',\n 'code' => $authCode\n ];\n\n return $this->requestAccessData($requestParams);\n }", "public function authenticationReqd(){\n\t\theader('HTTP/1.0 401 Unauthorized');\n\t\t$this['app']['hologram']->setModule(\"WWW\")->log(\\Bakery\\Utilities\\Hologram::NORMAL, \"Response: Page requires authentication\");\r\n\t\t\n\t\t$_SESSION['redirect_to'] = $this['request']['uri'];\n\t\t\n\t\tif($this->isJson()){\n\n\t\t\treturn array(\"response\" => \"authentication required\");\n\t\t\t\n\t\t}\n\t\t\n\t\theader(\"Location: {$this['app']['security.login']['handler']}\");\n\t\t\n\t}", "public function validateToken() \n {\n return API::response()->array(['status' => 'success'])->statusCode(200);\n }", "function getAuthUserId() {\r\n global $app, $log;\r\n $email = $app->request->headers(\"PHP_AUTH_USER\");\r\n $password = $app->request->headers(\"PHP_AUTH_PW\");\r\n\r\n if ($email && $password) {\r\n $row = DB::queryFirstRow(\"SELECT * FROM users WHERE email=%s\", $email);\r\n if ($row && $row['password'] == $password) {\r\n return $row['ID'];\r\n }\r\n }\r\n\r\n $log->debug(\"BASIC authentication failed for user \" . $email . \" from \" . $_SERVER['REMOTE_ADDR']);\r\n $app->response->status(401);\r\n return FALSE;\r\n}", "public function isSuccessful()\n {\n return isset($this->data['response_code']) \n && \n ( substr($this->data['response_code'], 2) == '000' );\n }", "function authenticate_user($email_a, $passcode){\r\n\t//QUERY DATABASE/ACTIVE DIRECTORY TO SEE IF USER IS VALID\r\nif ($email == \"insert valid email b4 testing\") {\r\n\t/*** set a form token ***/\r\n\t$form_token = md5( uniqid('auth', true) );\r\n\t/*** set the session form token ***/\r\n\t$_SESSION['form_token'] = $form_token;\r\n\t$_SESSION['email_a'] = $email_a;\r\n\t$_SESSION['start_timestamp'] = date('Y-m-d HH:mm:s');\r\n\t$code = \"valid\";\r\n}else{\r\n\t$code = \"invalid\";\r\n\t}\r\necho return $code \"We were unable to validate your information, Please try again\";\r\n /*RETURNED TO CALLING CODE */\r\n\t}", "public function isSuccessful() {}", "public function validAuthenticationResponse($request, $result)\n {\n\t\treturn ['success' => true];\n }", "public function getResponseCode()\n {\n }", "function isSuccessful() ;", "public function authenticate()\n\t{\n\t\tif ($data['code'] = $this->input->get('code', false, 'raw'))\n\t\t{\n\t\t\t$data['grant_type'] = 'authorization_code';\n\t\t\t$data['redirect_uri'] = $this->getOption('redirecturi');\n\t\t\t$data['client_id'] = $this->getOption('clientid');\n\t\t\t$data['client_secret'] = $this->getOption('clientsecret');\n\t\t\t$response = $this->http->post($this->getOption('tokenurl'), $data);\n\n\t\t\tif ($response->code >= 200 && $response->code < 400)\n\t\t\t{\n\n\t\t\t\tif ($response->headers['Content-Type'] == 'application/json')\n\t\t\t\t{\n\t\t\t\t\t$token = array_merge(json_decode($response->body, true), array('created' => time()));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tparse_str($response->body, $token);\n\t\t\t\t\t$token = array_merge($token, array('created' => time()));\n\t\t\t\t}\n\n\t\t\t\t$this->setToken($token);\n\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Error code ' . $response->code . ' received requesting access token: ' . $response->body . '.');\n\t\t\t}\n\t\t}\n\n\t\tif ($this->getOption('sendheaders'))\n\t\t{\n\t\t\t$this->application->redirect($this->createUrl());\n\t\t}\n\t\treturn false;\n\t}", "function auth(){\n\tif(@!$_SESSION['auth']){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t}\n}", "function auth_fail() {\n header('HTTP/1.1 401 Unauthorized');\n header('WWW-Authenticate: Digest realm=\"'.$realm.\n\t '\",qop=\"auth\",nonce=\"'.uniqid().'\",opaque=\"'.md5($realm).'\"');\n}", "private function authenticate() {\n\t\t//we do not need a session, so we don't need to have unnused db-entries in session db\n\t\tsession_destroy();\n\n\t\t$token = FormUtil::getPassedValue('token', null, 'GETPOST');\n\t\t$addr = $_SERVER['REMOTE_ADDR'];\n\n\t\tif($token == $this->getVar('Authtoken') && $this->getVar('Authtoken') != null && ($addr == $this->getVar('AllowedHost') || $this->getVar('AllowedHost') == '*')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\techo 'You are a hacker, right?';\n\t\t\texit();\n\t\t}\n\t}", "public function authorize()\n {\n // By default it returns false, change it to something like\n // this if ure using auth\n //return Auth::check();\n return 'true';\n }", "function checkAuthorization($authCode) {\n\t\tglobal $_zp_current_admin_obj;\n\t\tif (DEBUG_LOGIN) { debugLogBacktrace(\"checkAuthorization($authCode)\");\t}\n\t\t$admins = $this->getAdministrators();\n\n\t\t/** uncomment to auto-login for backend HTML validation\n\t\t $user = array_shift($admins);\n\t\t $_zp_current_admin_obj = $this->newAdministrator($user['user']);\n\t\t return $user['rights'] | ADMIN_RIGHTS;\n\t\t */\n\n\t\tforeach ($admins as $key=>$user) {\n\t\t\tif (!$user['valid']) {\t// no groups!\n\t\t\t\tunset($admins[$key]);\n\t\t\t}\n\t\t}\n\t\tif (DEBUG_LOGIN) { debugLogArray(\"checkAuthorization: admins\",$admins);\t}\n\t\t$reset_date = getOption('admin_reset_date');\n\t\tif ((count($admins) == 0) || empty($reset_date)) {\n\t\t\t$_zp_current_admin_obj = NULL;\n\t\t\tif (DEBUG_LOGIN) { debugLog(\"checkAuthorization: no admin or reset request\"); }\n\t\t\treturn ADMIN_RIGHTS; //no admins or reset request\n\t\t}\n\t\tif (empty($authCode)) return 0; // so we don't \"match\" with an empty password\n\t\t$i = 0;\n\t\tforeach($admins as $key=>$user) {\n\t\t\tif (DEBUG_LOGIN) { debugLog(\"checkAuthorization: checking: $key\");\t}\n\t\t\tif ($user['pass'] == $authCode) {\n\t\t\t\t$_zp_current_admin_obj = $this->newAdministrator($user['user']);\n\t\t\t\t$result = $user['rights'];\n\t\t\t\tif ($i == 0) { // the first admin is the master.\n\t\t\t\t\t$result = $result | ADMIN_RIGHTS;\n\t\t\t\t}\n\t\t\t\tif (DEBUG_LOGIN) { debugLog(\"checkAuthorization: match\");\t}\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$_zp_current_admin_obj = null;\n\t\tif (DEBUG_LOGIN) { debugLog(\"checkAuthorization: no match\");\t}\n\t\treturn 0; // no rights\n\t}", "public function getAuthCode()\n {\n return $this->authCode;\n }", "private function checkCode(Int $code) {\n if ($code === 200) :\n return true;\n endif;\n\n return false;\n }", "public function checkAccess()\n {\n if (!$this->isAuthenticated()) {\n header('HTTP/1.1 401 Unauthorized');\n exit();\n }\n }", "public function errorcode();", "abstract public function isSuccessful();", "public function authenticate()\n {\n if (!isset($_SERVER['PHP_AUTH_DIGEST']) || empty($_SERVER['PHP_AUTH_DIGEST'])) {\n\t\t\t//error_log(\"...\".$_SERVER['PHP_AUTH_DIGEST'].\"...\");\n\t\t\terror_log(\"Not Authorized\");\n\t\t\t$e = new Exception('Authentication required.', self::ERROR_DIGEST_MISSING, null);\n $this->handleError($e);\n }\n \n $data = $this->_parseDigest();\n\t\t\n\t\tif (!$data) {\n\t\t\t$e = new Exception('Invalid authorization digest.', self::ERROR_DIGEST_INVALID, null);\n $this->handleError($e); \n }\n\t\tif ($data['username']==\"anonymous\" || $data['username']==\"\") {\n\t\t\tZend_Registry::set('userID', -1);\n\t\t\treturn true;\n\t\t} else if (strpos($data['username'],\"uuid_\")===0) {\n\t\t\tZend_Registry::set('userID', $data['username']);\n\t\t\treturn true;\n\t\t}\n // Make sure the user exists.\n \n $knownUserData = mysql_query(\"SELECT * FROM `accounts` WHERE `username`='\".mysql_real_escape_string($data['username']).\"' OR `email`='\".mysql_real_escape_string($data['username']).\"'\") or die(mysql_error());\n //if (!isset($this->_users[$data['username']])) {\n if (mysql_num_rows($knownUserData)!==1) { \n\t\t\t$e = new Exception('Invalid credentials', self::ERROR_CREDENTIALS_INVALID, null);\n throw $e;\n }\n\t\t\n\t\t$knownUserData = mysql_fetch_assoc($knownUserData);\n\t\t// Save the username so we can use it for access control checks\n // in other scripts.\n Zend_Registry::set('username', $data['username']);\n \n // Generate the server response.\n $password = $knownUserData['lastKnownPassword']; //$this->_users[$data['username']];\n\t\tZend_Registry::set('userID', $knownUserData['userID']);\n\t\tZend_Registry::set('userIDEncrypted', $knownUserData['userIDEncrypted']);\n\t\t//check password & username against thinklg.com data\n\t\t\n\t\t\n $HA1 = md5($data['username'] . ':' . self::AUTH_REALM . ':' . $password);\n\t\t$HA2 = md5($_SERVER['REQUEST_METHOD'] . ':' . $data['uri']);\n\t\t$valid_response = md5(\n $HA1 // hash 1\n . ':' // separator\n . $data['nonce'] // nonce\n . ':' // separator\n . $data['nc'] // nonce count \n . ':' // separator\n . $data['cnonce'] // client nonce\n . ':' // separator\n . $data['qop'] // quality of protection\n . ':' // separator\n . $HA2 // hash 2\n );\n // Compare the server response to the client response.\n if ( $data['response'] != $valid_response ) {\n // The username is ok, but the password is wrong.\n $e = new Exception('Invalid credentials.', self::ERROR_CREDENTIALS_INVALID, null);\n throw $e;\n }\n }", "private function _checkAuth()\n {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }", "abstract public function is_authorized_response($response);", "abstract protected function auth();", "public function checkAuthorizationData() {\n \n $config = Mage::getModel('storesms/config');\n \n if ($config->isApiEnabled()==0) return;\n \n try {\n $creditsXML = Mage::getModel('storesms/apiClient')->getCredits();\n $ExceptionMessage = $creditsXML->requestError->serviceException->messageId;\n\n if ($ExceptionMessage=='UNAUTHORIZED') {\n throw new Exception(Mage::helper('storesms')->__($config::WRONG_AUTH_DATA));\n }\n else {\n Mage::getSingleton('core/session')->addSuccess(Mage::helper('storesms')->__('Success. Logged into Storesms API.'));\n }\n\n }\n catch (Exception $e) {\n Mage::getSingleton('core/session')->addError($e->getMessage());\n }\n \n }", "function verifyAuth(){\n // on the config values. In this case we just check for user 0.\n $query = \"SELECT name FROM users WHERE user_id = 0\";\n try {\n $sth = $this->spdo->prepare($query);\n $sth->execute();\n }\n catch(PDOException $e) {\n endProcess(0,\"Could not get user information because \".pdoError($e));\n }\n if($this->spdo->query(\"SELECT FOUND_ROWS()\")->fetchColumn() != 1)\n return false;\n return true;\n }", "public function authenticate()\n {\n /* authenticate if the login credentials are correct */\n $db = Sweia::getInstance()->getDB();\n $args = array(\n \":email\" => $this->getEmail(),\n \":password\" => $this->password\n );\n $sql = \"SELECT email,uid FROM \" . SystemTables::DB_TBL_USER . \" WHERE email = ':email' AND password = ':password' AND status != 4 LIMIT 1\";\n $res = $db->query($sql, $args);\n if ($res && $db->resultNumRows($res) == 1)\n {\n $data = $db->fetchObject($res);\n $this->uid = 1;\n return true;\n }\n\n return false;\n }", "public function authenticate() { return false; }", "function checkAuth() {\n\tglobal $conf;\n\t\n}", "private function verifyAccount()\n {\n $check = $this->db->query('SELECT users.password, users.id FROM users WHERE username = ?', $this->username)->fetchArray();\n //Check of de user in de database staat.\n if (isset($check['password'])) {\n //Check of de password matched\n if (password_verify($this->password, $check['password'])) {\n echo \"AUTH verify complete\";\n $this->setLoggedinUser($check['id']);\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "function b2c_verify_token( $return_uri = '' ) {\n\ttry {\n\t\tif ( isset( $_POST['error'] ) ) {\n\t\t\t// If user requests the Password Reset flow from a Sign-in/Sign-up flow, the following is returned:\n\t\t\t// Error: access_denied\n\t\t\t// Description: AADB2C90118: The user has forgotten their password.\n\t\t\tif ( preg_match( '/.*AADB2C90118.*/i', $_POST['error_description'] ) ) {\n\t\t\t\t// user forgot password so redirect to the password reset flow\n\t\t\t\tb2c_password_reset();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t// If user cancels the Sign-up portion of the Sign-in/Sign-up flow or\n\t\t\t// if user cancels the Profile Edit flow, the following is returned:\n\t\t\t// Error: access_denied\n\t\t\t// Description: AADB2C90091: The user has cancelled entering self-asserted information.\n\t\t\tif ( preg_match( '/.*AADB2C90091.*/i', $_POST['error_description'] ) ) {\n\t\t\t\t// user cancelled profile editing or cancelled signing up\n\t\t\t\t// so redirect to the home page instead of showing an error\n\t\t\t\twp_safe_redirect( site_url() . '/' );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\techo 'Authentication error on ' . get_bloginfo( 'name' ) . '.';\n\t\t\techo '<br>Error: ' . $_POST['error'];\n\t\t\techo '<br>Description: ' . $_POST['error_description'];\n\t\t\techo '<br><br><a href=\"' . site_url() . '\">Go to ' . site_url() . '</a>';\n\t\t\texit;\n\t\t}\n\n\t\tif ( isset( $_POST[ B2C_RESPONSE_MODE ] ) ) {\n\t\t\t// Check which authorization policy was used\n\t\t\tswitch ( $_POST['state'] ) {\n\t\t\t\tcase 'subscriber':\n\t\t\t\t\t$policy = B2C_Settings::$subscriber_policy;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'admin':\n\t\t\t\t\t$policy = B2C_Settings::$admin_policy;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'edit_profile':\n\t\t\t\t\t$policy = B2C_Settings::$edit_profile_policy;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'signup':\n\t\t\t\t\t$policy = B2C_Settings::$signup_policy;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// Not a B2C request, ignore.\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Verifies token only if the checkbox \"Verify tokens\" is checked on the settings page\n\t\t\t$token_checker = new B2C_Token_Checker( $_POST[ B2C_RESPONSE_MODE ], B2C_Settings::$clientID, $policy );\n\t\t\tif ( B2C_Settings::$verify_tokens ) {\n\t\t\t\t$verified = $token_checker->authenticate();\n\t\t\t\tif ( $verified == false ) {\n\t\t\t\t\twp_die( 'Token validation error' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Use the email claim to fetch the user object from the WP database\n\t\t\t$email = $token_checker->get_claim( 'emails' );\n\t\t\t$email = $email[0];\n\t\t\t$user_b2c_id = $token_checker->get_claim( 'oid' );\n\t\t\t$user = b2c_get_user( $user_b2c_id, $email );\n\t\t\t// $user = WP_User::get_data_by('email', $email);\n\n\t\t\t// Get the userID for the user\n\t\t\tif ( $user == false ) { // User doesn't exist yet, create new userID\n\n\t\t\t\t// if we are not allowing the automatic creation of new users and we are not coming from the signup policy then throw an error\n\t\t\t\tif ( ! B2C_Settings::$create_users && $policy != B2C_Settings::$signup_policy ) {\n\t\t\t\t\t// user could not be found in WP so logout to clear the b2c cookies\n\t\t\t\t\tb2c_logout();\n\t\t\t\t};\n\n\t\t\t\t$name = $token_checker->get_claim( 'name' );\n\t\t\t\t$first_name = $token_checker->get_claim( 'given_name' );\n\t\t\t\t$last_name = $token_checker->get_claim( 'family_name' );\n\t\t\t\t$username = b2c_generate_username( $email );\n\n\t\t\t\t$our_userdata = array(\n\t\t\t\t\t'ID' => 0,\n\t\t\t\t\t'user_login' => $username,\n\t\t\t\t\t'user_pass' => null,\n\t\t\t\t\t'user_registered' => true,\n\t\t\t\t\t'user_status' => 0,\n\t\t\t\t\t'user_email' => $email,\n\t\t\t\t\t'nickname' => $name,\n\t\t\t\t\t'display_name' => $name,\n\t\t\t\t\t'first_name' => $first_name,\n\t\t\t\t\t'last_name' => $last_name,\n\t\t\t\t);\n\n\t\t\t\t$filtered_user_data = apply_filters( 'b2c_insert_user', $our_userdata, $token_checker->get_payload() );\n\n\t\t\t\t// Filter returned false which means we do not want to insert this specific user\n\t\t\t\tif ( $filtered_user_data === false ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$userID = wp_insert_user( $filtered_user_data );\n\n\t\t\t\t// Allows custom fields sent over the payload to be saved in WordPress\n\t\t\t\tdo_action( 'b2c_new_userdata', $userID, $token_checker->get_payload() );\n\t\t\t} elseif ( $policy == B2C_Settings::$edit_profile_policy ) { // Update the existing user w/ new attritubtes\n\n\t\t\t\t$name = $token_checker->get_claim( 'name' );\n\t\t\t\t$first_name = $token_checker->get_claim( 'given_name' );\n\t\t\t\t$last_name = $token_checker->get_claim( 'family_name' );\n\t\t\t\t$user_b2c_id = $token_checker->get_claim( 'object_id' );\n\n\t\t\t\t$our_userdata = array(\n\t\t\t\t\t'ID' => $user->ID,\n\t\t\t\t\t'display_name' => $name,\n\t\t\t\t\t'nickname' => $name,\n\t\t\t\t\t'first_name' => $first_name,\n\t\t\t\t\t'last_name' => $last_name,\n\t\t\t\t\t'user_email' => $email,\n\t\t\t\t);\n\n\t\t\t\t$filtered_user_data = apply_filters( 'b2c_update_user', $our_userdata, $token_checker->get_payload() );\n\n\t\t\t\t// Filter returned false which means we do not want to update this specific user\n\t\t\t\tif ( $filtered_user_data === false ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$userID = wp_update_user( $filtered_user_data );\n\n\t\t\t\t// Allows custom fields sent over the payload to be updated in WordPress\n\t\t\t\tdo_action( 'b2c_update_userdata', $userID, $token_checker->get_payload() );\n\t\t\t} else {\n\t\t\t\t$userID = $user->ID;\n\t\t\t}\n\n\t\t\t// update the provider used by the user\n\t\t\tupdate_user_meta( $userID, 'b2c_auth_provider', $token_checker->get_claim( 'idp', '' ) );\n\n\t\t\t// Check if the user is an admin and needs MFA\n\t\t\t$wp_user = new WP_User( $userID );\n\t\t\tif ( in_array( 'administrator', $wp_user->roles ) ) {\n\n\t\t\t\t// If user did not authenticate with admin_policy, redirect to admin policy\n\t\t\t\tif ( mb_strtolower( $token_checker->get_claim( 'tfp' ) ) != mb_strtolower( B2C_Settings::$admin_policy ) ) {\n\t\t\t\t\t$b2c_endpoint_handler = new B2C_Endpoint_Handler( B2C_Settings::$admin_policy );\n\t\t\t\t\t$authorization_endpoint = $b2c_endpoint_handler->get_authorization_endpoint( $return_uri ) . '&state=admin';\n\t\t\t\t\tif ( $authorization_endpoint ) {\n\t\t\t\t\t\twp_redirect( $authorization_endpoint );\n\t\t\t\t\t}\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set cookies to authenticate on WP side\n\t\t\twp_set_auth_cookie( $userID );\n\n\t\t\t// Redirect to home page\n\t\t\twp_safe_redirect( site_url() . '/' );\n\t\t\texit;\n\t\t}\n\t} catch ( Exception $e ) {\n\t\techo $e->getMessage();\n\t\texit;\n\t}\n}", "private function verify_request()\n{\n $headers = $this->input->request_headers();\n // Extract the token\n $token = $headers['Authorization'];\n // Use try-catch\n // JWT library throws exception if the token is not valid\n try {\n // Validate the token\n // Successfull validation will return the decoded user data else returns false\n $data = AUTHORIZATION::validateToken($token);\n if ($data === false) {\n $status = parent::HTTP_UNAUTHORIZED;\n $response = ['status' => $status, 'msg' => 'Unauthorized Access!'];\n $this->response($response, $status);\n exit();\n } else {\n return $data;\n }\n } catch (Exception $e) {\n // Token is invalid\n // Send the unathorized access message\n $status = parent::HTTP_UNAUTHORIZED;\n $response = ['status' => $status, 'msg' => 'Unauthorized Access! '];\n $this->response($response, $status);\n }\n}", "function statusCode()\n {\n }", "public function _check_login()\n {\n\n }", "public static function checkAuthentication() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::checkAuthentication();\t\t\n\t}", "public function getCallback()\n\t{\n\t\t$this->client->authenticate($_GET['code']);\n\t\t$token = $this->client->getAccessToken();\n\t\t\n\t\tif( ! empty($token) )\n\t\t{\n\t\t\t$this->putSessionToken($token);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function auth()\n {\n $email = $this->loginEntry->input('email');\n $password = $this->commonFunction->generateHash($this->loginEntry->input('pass'));\n \n $info = $this->userDetail->getDetail($email, $password);\n if (count($info) == 1) \n {\n $this->commonFunction->setSession($info->id, $info->user_name);\n return redirect('/dashboard'); \n } \n echo '<script language=\"javascript\">';\n echo 'alert(\"Username/Password does not match.\")';\n echo '</script>';\n return redirect('/login');\n }", "function _verify_details($auth_type, $username, $password)\n\t{\n\t\t$query = $this->CI->db->query(\"SELECT * FROM `users` WHERE `$auth_type` = '$username' AND `password` = '$password'\");\n\t\t\n\t\tif($query->num_rows != 1)\n\t\t{\n\t\t\t$attempts = $_COOKIE['login_attempts'] + 1;\n\t\t\tsetcookie(\"login_attempts\", $attempts, time()+900, '/');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "private function verify_request($data_active)\r\n\t\t{\r\n\t\t\t$headers = $this->input->request_headers();\r\n\r\n\t\t\t// Extract the token\r\n\t\t\t$token = $headers['Authorization'];\r\n\r\n\t\t\t// Use try-catch\r\n\t\t\t// JWT library throws exception if the token is not valid\r\n\t\t\ttry {\r\n\t\t\t\t// Validate the token\r\n\t\t\t\t// Successfull validation will return the decoded user data else returns false\r\n $data = AUTHORIZATION::validateToken(str_replace(\"Bearer \",\"\",$token));\r\n\t\t\t\tif ($data === false) {\r\n\t\t\t\t\t$status = parent::HTTP_UNAUTHORIZED;\r\n\t\t\t\t\t$response = ['status' => $status, 'msg' => 'Unauthorized Access!'];\r\n\t\t\t\t\t$this->response($response, $status);\r\n\r\n\t\t\t\t\texit();\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn $data_active;\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception $e) {\r\n\t\t\t\t// Token is invalid\r\n\t\t\t\t// Send the unathorized access message\r\n\t\t\t\t$status = parent::HTTP_UNAUTHORIZED;\r\n\t\t\t\t$response = ['status' => $status, 'msg' => 'Unauthorized Access! '];\r\n\t\t\t\t$this->response($response, $status);\r\n\t\t\t}\r\n }", "function authorize($args)\n{\n global $_zp_authority;\n $args = decode64($args);\n //debugLog('after decode: '.var_export($args, true));\n logger('authorize', ($args['loglevel']));\n if (!preg_match('#^1.4#', ($version = getVersion()))) {\n return new ZEN_Error(-2, 'Zenphoto version '.$version.' but v1.4.x required!');\n }\n $_zp_authority = new Zenphoto_Authority();\n $hash = $_zp_authority->passwordHash($args['loginUsername'], $args['loginPassword']);\n debugLog('hashvalue: '.$hash);\n $userobj = getAnAdmin([\n '`user`=' => $args['loginUsername'],\n '`valid`=' => 1,\n ]);\n if ($userobj == '') {\n return new ZEN_Error(-1, 'Incorrect username or password '.$args['loginUsername'].' '.$args['loginPassword']);\n } //$userobj == ''\n else {\n $localhash = $userobj->getPass();\n debugLog('hash = '.$hash.' localhash = '.$localhash);\n if ($hash == $localhash) {\n return true;\n } //$userobj\n else {\n return new ZEN_Error(-1, 'Incorrect username or password '.$args['loginUsername'].' '.$args['loginPassword']);\n }\n }\n}", "function authenticate() {\n //this would be for hard-coded username/password, sometimes useful if you \n //don't have a database\n //echo $_SERVER[\"PHP_AUTH_USER\"] . \"<BR>\";\n if ((isset($_SERVER[\"PHP_AUTH_USER\"]) && ($_SERVER['PHP_AUTH_USER'] == 'client') &&\n isset($_SERVER['PHP_AUTH_PW']) && ($_SERVER[\"PHP_AUTH_PW\"] == 'secret'))) {\n header('HTTP/1.0 200 OK'); //all is good!\n } else {\n -\n //don't let them in!\n header('WWW-Authenticate: Basic realm=\"Test Authentication System\"');\n header('HTTP/1.0 401 Unauthorized');\n echo \"You must enter a valid login ID and password to access this resource\\n\";\n }\n exit; //stop execution of the program so we don't get any more errors\n}", "public function checkVerificationCode() {\n $request_params = Request::all();\n $validation = Validator::make($request_params, $this->getRulesUtils()->check_verification_code, $this->getRulesUtils()->selectLanguageForMessages('check_verification_code', $request_params['lang']));\n if ($validation->fails()) {\n return $this->getCommonUtils()->jsonErrorResponse($validation->errors()->first());\n }\n $verficationCode = $this->getVerificationModel()->getConfirmationCode($request_params);\n if (empty($verficationCode)) {\n return $this->getCommonUtils()->jsonErrorResponse($this->getMessageUtils()->getMessageData('error', $request_params['lang'])['verification_code_invalid']);\n }\n return $this->validationProcess($request_params, $verficationCode);\n }", "public function authenticate(){\n $user = $_SERVER['PHP_AUTH_USER'];\n $pass = $_SERVER['PHP_AUTH_PW'];\n\n if(!empty($user) && $this->api_config['allowed_users'][$user] === $pass){\n return True;\n }\n return False;\n }", "public function checkAuth() {\n\n /*\n * Dummy stuff - just to test the authentication loop\n */\n if ($_SERVER['PHP_AUTH_USER'] === $this->config['general']['admin']['user'] && $_SERVER['PHP_AUTH_PW'] === $this->config['general']['admin']['password']) {\n return true;\n }\n\n return false;\n }", "public function Login() {\n $success = FALSE;\n\t\n if (isset($_GET['code']) && isset($_GET['state'])) {\n\n //The user has gone off to patreon, signed in, and has given us access. Score!\n //but now we have to let patreon know that it gave this stuff to the right page\n //we do this via a post request with the data you see in the $data array\n $data = http_build_query(\n array(\n 'code'=>$_GET['code'],\n 'grant_type'=>'authorization_code',\n 'client_id'=>$this::access['client_id'],\n 'client_secret'=>$this::access['client_secret'],\n 'redirect_uri'=>'http://www.familycraftmc.com/manage/index.php'\n )\n );\n\n $userAuth = $this->UpdateToken($data);\n\t \n if (isset($this->accessToken) && ($this->accessToken != NULL))\n $success = TRUE;\n\t}\n $this->loggedIn = $success;\n\treturn $success;\n }", "public function route_status() {\n\t\treturn self::$core::pj(self::$ctrl->get_safe_user_data(), 401);\n\t}", "public function authorize(): bool\n {\n return auth('api')->check();\n }" ]
[ "0.7618129", "0.7482779", "0.7404108", "0.7404108", "0.70975757", "0.6978377", "0.69681376", "0.691241", "0.68695736", "0.68399525", "0.6838868", "0.67681533", "0.66978216", "0.6641991", "0.6635551", "0.6623928", "0.6621698", "0.6608935", "0.66064906", "0.65980685", "0.6550709", "0.65494215", "0.64995104", "0.64967406", "0.6464776", "0.64602387", "0.64602387", "0.6457369", "0.6425359", "0.63935524", "0.63807887", "0.6379745", "0.6375667", "0.6375667", "0.6372005", "0.63658845", "0.6361451", "0.63533556", "0.63517857", "0.6322788", "0.6297465", "0.6296861", "0.6293734", "0.6278065", "0.6251381", "0.6249586", "0.62464553", "0.6241998", "0.62314326", "0.6227012", "0.6226819", "0.6221373", "0.62145954", "0.6206114", "0.6179695", "0.6169107", "0.6168004", "0.61578995", "0.61399627", "0.6138947", "0.61362374", "0.6133363", "0.6128723", "0.6128063", "0.6119113", "0.61178035", "0.6102982", "0.6091288", "0.6091145", "0.6086303", "0.60792303", "0.6059191", "0.60564905", "0.605188", "0.60500234", "0.6039667", "0.6037666", "0.6035277", "0.60337806", "0.602782", "0.60238796", "0.60171753", "0.60146815", "0.6007239", "0.6004163", "0.59978354", "0.59916484", "0.59895927", "0.59878904", "0.5984864", "0.5980334", "0.59752655", "0.5975119", "0.5974404", "0.59696907", "0.5969608", "0.5960614", "0.5955773", "0.5952575", "0.59488004", "0.59449744" ]
0.0
-1
by default eloquent uses "car_product" name for the intermediate table
public function products() { // if the intermediate table is called differently an SQl error is raised // to use a custom table name it should be passed to "belongsToMany" method as the second argument return $this->belongsToMany(Product::class, 'cars__products'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function product(){\n return $this->belongsTo(Product::class);\n }", "public function car() {\n return $this->hasMany('\\App\\Car');\n }", "public function product()\n {\n return $this->belongsTo('\\App\\Product');\n }", "public function product()\n {\n \treturn $this->belongsTo(Product::class);\n }", "public function product()\n {\n return $this->belongsTo('TechTrader\\Models\\Product');\n }", "public function product()\n {\n \treturn $this->belongsTo('App\\Product');\n }", "public function product()\n {\n \treturn $this->belongsTo('App\\Product');\n }", "public function product(){\n\n return $this->belongsTo(Product::class);\n\n }", "public function product()\n {\n return $this->belongsTo(Product::Class());\n }", "public function product()\n {\n return $this->belongsTo(Product::class);\n\n }", "public function car()\n {\n return $this->hasMany('App\\Entity\\Car');\n }", "public function product()\n {\n return $this->belongsTo('App\\CatalogProduct', 'product_id');\n }", "public function product()\n {\n return $this->belongsTo(Product::class);\n }", "public function product()\n {\n return $this->belongsTo(Product::class);\n }", "public function product()\n {\n return $this->belongsTo(Product::class);\n }", "public function product()\n {\n return $this->belongsTo(Product::class);\n }", "public function product()\n {\n return $this->belongsTo( Product::class );\n }", "public function product()\n\t{\n\t\treturn $this->belongsTo('Tricks\\Product');\n\t}", "public function products()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = brand_id, localKey = id)\n return $this->hasMany(Product::class);\n }", "public function car()\n {\n return $this->belongsTo('App\\Models\\Car', 'car_id');\n }", "public function product()\n {\n return $this->belongsTo('App\\Product');\n\t}", "public function products()\n\t{\n\t\treturn $this->belongsTo(Product::class);\n\t}", "public function products()\n {\n return $this->belongsTo('App\\Models\\Product');\n }", "public function products(){\n return $this->hasMany('App\\Product');\n }", "public function product() {\n return $this->belongsTo('App\\Entity\\Product');\n }", "public function product_supply(){ return $this->hasMany(ProductSupply::class,'vehicle_id'); }", "public function product()\n {\n return $this->belongsTo('App\\Product');\n }", "public function product()\n {\n return $this->belongsTo('App\\Product');\n }", "public function product()\n {\n return $this->belongsTo('App\\Models\\Product');\n }", "public function products(){\n return $this->hasMany(Product::class);\n }", "public function product()\n {\n return $this->belongsTo('App\\Entities\\Product');\n }", "public function product()\n {\n return $this->belongsTo(BaseProduct::class);\n }", "public function product()\n {\n // belongsTo(RelatedModel, foreignKey = product_id, keyOnRelatedModel = id)\n return $this->belongsTo(Product::class);\n }", "public function product()\n\t{\n\t\treturn $this->belongsTo(StoreProduct::class);\n\t}", "public function product()\n\t{\n\t\treturn $this->belongsTo(Product::class, $this->primaryKey);\n\t}", "public function car()\n {\n return $this->belongsTo(Car::class, 'car_id', 'id');\n }", "public function product()\n {\n \t// belongsTo(RelatedModel, foreignKey = p_id, keyOnRelatedModel = id)\n \treturn $this->belongsTo('App\\Product','p_id','p_id');\n }", "public function product()\n {\n return $this->belongsTo(ProductProxy::modelClass());\n }", "public function product()\n {\n //retorna un solo objeto product, la capacitacion solo tiene un producto\n return $this->belongsTo('Vest\\Tables\\Product');\n }", "public function products(){\n\t\treturn $this->hasMany('Product');\t\n\t}", "public function getProducts() {\n return $this->hasMany(Product::className(), ['brand_id' => 'id']); // second param - field in dependent table\n }", "public function products() {\r\n return $this->belongsToMany('App\\Product');\r\n }", "public function photo_product()\n {\n return $this->belongsTo(Photo_product::class);\n }", "public function product() : BelongsTo\n {\n return $this->belongsTo(Product::class);\n }", "public function product()\n {\n return $this->belongsTo('Laracart\\Product\\Models\\Product', 'product_id');\n\n }", "public function categoryProduct(){\n return $this->hasMany(CategoryProduct::class);\n }", "public function product()\n {\n return $this->belongsTo(Product::class, 'product_id', 'id');\n }", "public function product()\n {\n return $this->belongsTo(Product::class, 'product_id', 'id');\n }", "public function product()\n {\n return $this->belongsTo(Product::class, 'product_id', 'id');\n }", "public function Product()\n\t{\n\t\treturn $this->belongsTo('App\\Product');\n\t}", "public function category_product()\n {\n return $this->belongsTo(Category_product::class);\n }", "public function product(): BelongsTo\n {\n return $this->belongsTo(Product::class);\n }", "public function product()\n {\n // return $this->hasMany(product::class, 'orders_has_products', 'odrders_id', 'products_id');\n return $this->belongsToMany(product::class, 'orders_has_products', 'orders_id', 'products_id');\n }", "public function products()\n {\n return $this->belongsTo('App\\Product', 'product_id');\n }", "public function products()\r\n {\r\n return $this->hasMany('App\\Models\\Product');\r\n }", "public function model()\n {\n return Product::class;\n }", "public function model()\n {\n return Product::class;\n }", "public function product() \n\t{\n\t\treturn $this->belongsTo('App\\Models\\Product', 'product_id', 'id');\n\t}", "public function product()\n {\n return $this->belongsTo('App\\Product', 'product_id');\n }", "public function model()\n {\n return ProductMeta::class;\n }", "public function product(): BelongsTo\n {\n return $this->belongsTo(ProductProxy::modelClass());\n }", "public function orders_products(){\n return $this->hasMany(Order_product::class);\n }", "public function products() \n {\n return $this->belongsToMany(Product::class);\n }", "public function product()\n {\n return $this->belongsTo('App\\Models\\Product', 'product_id', 'id');\n }", "public function products(){\n \t\n \treturn $this->hasMany(Product::class);\n }", "public function product()\n {\n return $this->belongsTo('App\\Models\\Product', 'product_id');\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function product(): BelongsTo\n {\n return $this->belongsTo(Product::class, 'id_product', 'id_product');\n }", "public function product()\n {\n return $this->hasMany(ProductM::class,'store_no','store_no');\n }", "public function car_type()\n {\n return $this->belongsTo('App\\Models\\CarType','car_id','id');\n }", "public function order_product(){\n return $this->hasOne(Order_product::class);\n }", "public function producto(){\n return $this->belongsTo(Producto::class);\n }", "public function product()\n {\n return $this->belongsTo(config('inventory.models.product-variant'), 'product_variant_id');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Product');\n }", "public function product(): BelongsTo\n {\n return $this->belongsTo(config('laravel-inventory.product'));\n }", "public function products()\n {\n return $this->belongsToMany('App\\Product');\n }", "public function products()\n {\n return $this->hasMany('App\\Models\\Products');\n }", "public function product(){\n return $this->hasMany('App\\Product','id_type','id');\n // 1: duong dan den model san pham , 2: khoa ngoai cua loai san pham voi san pham , 3 : khoa chinh cua loai san pham\n }", "public function products() {\n return $this->hasMany('App\\Product', 'category_id', 'id');\n }", "public function cars() {\n return $this->belongsToMany('\\App\\Car')->withTimestamps();;\n }", "public function product()\n {\n return $this->hasMany(product::class, 'category_id', 'id');\n }", "public function products()\n {\n return $this->hasMany('App\\Models\\Product');\n }", "public function products()\n {\n return $this->belongsToMany('App\\Models\\Product');\n }", "public function products(){\n return $this->hasMany(InvoiceProduct::class);\n //->leftJoin('invoice_product','products.id','invoice_product.product_id');\n //return $this->belongsToMany(Product::class);\n }", "public function products() {\n \treturn $this->belongsToMany(Product::class, 'items_product', 'item_id', 'product_id');\n }", "public function product() {\n // $productImage->product\n return $this->belongsTo(Product::class);\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "public function products(){\n \treturn $this->hasMany(Product::class,'category_id');\n }", "public function products()\n {\n return $this->hasMany('App\\Product', 'id');\n }", "public function product()\n {\n return $this->belongsTo('Modules\\Admin\\Models\\Product','product_id','id');\n }", "public function products() {\n return $this->hasMany(Product::class);\n }" ]
[ "0.6748697", "0.67422545", "0.67222184", "0.67204285", "0.67071104", "0.666943", "0.666943", "0.6654961", "0.6638013", "0.6632344", "0.6624093", "0.66156024", "0.65834343", "0.65834343", "0.65834343", "0.65834343", "0.65833825", "0.65805614", "0.65767497", "0.6549826", "0.6532468", "0.6531519", "0.650262", "0.6501864", "0.64973754", "0.64900726", "0.6486664", "0.6486664", "0.6481447", "0.6479326", "0.6477829", "0.64767706", "0.64727944", "0.64695674", "0.64678425", "0.645706", "0.6455275", "0.64492685", "0.6443409", "0.6432408", "0.64276105", "0.6394965", "0.63773715", "0.63721955", "0.63669664", "0.6366862", "0.636123", "0.636123", "0.636123", "0.63550335", "0.6346814", "0.6333712", "0.6325903", "0.632281", "0.6320183", "0.63179463", "0.63179463", "0.63106525", "0.63039035", "0.62965", "0.6296183", "0.6292933", "0.6287213", "0.62821007", "0.62813044", "0.6277221", "0.6275201", "0.6269843", "0.6240527", "0.6237976", "0.6235739", "0.6228085", "0.62266195", "0.62181014", "0.62181014", "0.62181014", "0.62181014", "0.62181014", "0.62181014", "0.62181014", "0.6215763", "0.6210079", "0.62045836", "0.62005395", "0.6199029", "0.61958236", "0.61884326", "0.617925", "0.6160272", "0.61544275", "0.6153562", "0.61522466", "0.6140798", "0.6140798", "0.6140798", "0.6140798", "0.6139352", "0.6130366", "0.61303335", "0.61250377" ]
0.746124
0
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\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 // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "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 $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\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->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\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 $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\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 $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\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->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1
Bootstrap any application services.
public function boot() { $this->app->singleton(Gateway::class, function ($app) { return new Gateway( [ 'environment' => 'sandbox', 'merchantId' => 'qc57kt7p9tzzsr99', 'publicKey' => '6tqxj2wr6f53sdd5', 'privateKey' => '47971a5edfef53e2f60f05a399e79066' ] ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
Display a listing of the resource.
public function __construct() { $this->middleware('permission:Exam-view', ['only' => ['index']]); $this->middleware('permission:Exam-add', ['only' => ['create','store']]); $this->middleware('permission:Exam-edit', ['only' => ['edit','update']]); $this->middleware('permission:Exam-delete', ['only' => ['distroy']]); }
{ "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() { $boards = Board::where('status','Active')->get(); $units = Unit::where('status','Active')->get(); return view('exam.add',compact('units','boards')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request, [ 'board_id' => 'required', 'medium_id' => 'required', 'standard_id' => 'required', 'semester_id' => 'required', 'subject_id' => 'required', 'unit_id' => 'required', 'name' => 'required', 'time_duration' => 'required', 'exam_date' => 'required', 'total_marks' => 'required', 'total_question' => 'required', 'start_time' => 'required', 'end_time' => 'required', ]); $add = new Exam; $add->board_id = $request->board_id; $add->medium_id = $request->medium_id; $add->standard_id = $request->standard_id; $add->semester_id = $request->semester_id; $add->subject_id = $request->subject_id; $add->unit_id = $request->unit_id; $add->name = $request->name; $add->note = isset($request->note) ? $request->note:''; $add->time_duration = $request->time_duration; $add->exam_date = $request->exam_date; $add->total_marks = $request->total_marks; $add->total_question = $request->total_question; $add->start_time = $request->start_time; $add->end_time = $request->end_time; $add->negative_marks = $request->negative_marks; $add->exam_status = isset($request->exam_status) ? $request->exam_status:0; $add->instant_result = isset($request->instant_result) ? $request->instant_result:0; $add->is_minus_system = isset($request->is_minus_system) ? $request->is_minus_system:0; $add->save(); storeLog('exam',$add->id,date('Y-m-d H:i:s'),'create'); storeReview('exam',$add->id,date('Y-m-d H:i:s')); return redirect()->route('exam.index')->with('success', 'Exam Added Successfully.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(Exam $exam) { }
{ "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(Exam $exam,$id) { $units = Unit::where('status','Active')->get(); $boards = Board::where('status','Active')->get(); $examdata = Exam::where('id',$id)->first(); return view('exam.edit',compact('examdata','units','boards')); }
{ "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, Exam $exam,$id) { $this->validate($request, [ 'board_id' => 'required', 'medium_id' => 'required', 'standard_id' => 'required', 'semester_id' => 'required', 'subject_id' => 'required', 'unit_id' => 'required', 'name' => 'required', 'time_duration' => 'required', 'exam_date' => 'required', 'total_marks' => 'required', 'total_question' => 'required', 'start_time' => 'required', 'end_time' => 'required', ]); $update = Exam::find($id); $update->board_id = $request->board_id; $update->medium_id = $request->medium_id; $update->standard_id = $request->standard_id; $update->semester_id = $request->semester_id; $update->subject_id = $request->subject_id; $update->unit_id = $request->unit_id; $update->name = $request->name; $update->note = isset($request->note) ? $request->note:''; $update->time_duration = $request->time_duration; $update->exam_date = $request->exam_date; $update->total_marks = $request->total_marks; $update->total_question = $request->total_question; $update->start_time = $request->start_time; $update->end_time = $request->end_time; $update->negative_marks = $request->negative_marks; $update->exam_status = isset($request->exam_status) ? $request->exam_status:0; $update->instant_result = isset($request->instant_result) ? $request->instant_result:0; $update->is_minus_system = isset($request->is_minus_system) ? $request->is_minus_system:0; $update->save(); return redirect()->route('exam.index')->with('success', 'Exam 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
Remove the specified resource from storage.
public function distroy(Exam $exam,$id) { $delete = Exam::find($id); $delete->status = "Deleted"; $delete->save(); return redirect()->route('exam.index')->with('success', 'Exam Deleted Successfully.'); }
{ "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
$getunit = Unit::where(['unit_id' => $request>board_id])>get();
public function getExam(Request $request){ $getexam = Exam::where(['standard_id' => $request->standard_id,'semester_id' => $request->semester_id,'subject_id' => $request->subject_id,'unit_id' => $request->unit_id])->get(); $result="<option value=''>--Select Exam--</option>"; if(count($getexam) > 0) { foreach ($getexam as $exam) { if($request->has('exam_id')){ if($request->exam_id == $exam->id){ $result.="<option value='".$exam->id."' selected>".$exam->name."</option>"; } else{ $result.="<option value='".$exam->id."'>".$exam->name."</option>"; } }else{ $result.="<option value='".$exam->id."'>".$exam->name."</option>"; } } } return response()->json(['html'=>$result]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index(Request $request)\n {\n\n $data = Model::whereUnitId($request->unit_id)->get();\n return Response::success('', $data);\n}", "public function edit(Request $request)\n {\n $unitdata = Unit::where('id',$request->id)->first();\n return $unitdata;\n // $boards = Board::where('status','Active')->get();\n // $subjects = Subject::where('status','Active')->get();\n // $semesters = Semester::where('status','Active')->get();\n // $standards = Standard::where('status','Active')->get();\n //return view('unit.edit',compact('unitdata','subjects','semesters','standards','boards'));\n }", "public function getUnit(Request $request){\n $getunit = Unit::where(['board_id' => $request->board_id,'medium_id' => $request->medium_id,'standard_id' => $request->standard_id,'semester_id' => $request->semester_id,'subject_id' => $request->subject_id,'status' => 'Active'])->get();\n\n $result=\"<option value=''>--Select Unit--</option>\";\n if(count($getunit) > 0)\n {\n foreach ($getunit as $unit) {\n\n if($request->has('unit_id')){\n if($request->unit_id == $unit->id){\n $result.=\"<option value='\".$unit->id.\"' selected>\".$unit->title.\"</option>\";\n }\n else{\n $result.=\"<option value='\".$unit->id.\"'>\".$unit->title.\"</option>\"; \n }\n }else{\n $result.=\"<option value='\".$unit->id.\"'>\".$unit->title.\"</option>\";\n }\n }\n }\n \n return response()->json(['html'=>$result]); \n }", "public function unit(){\n return $this->belongsTo('App\\Unit', 'Unit1', 'Unit_No');\n }", "public function selectItemUnitAngularById(Request $request)\n {\n \n\n //$unitId = $request->input('unit_id');\n \n // if (!empty($unitId)) {\n /* $getPurchaseData = DB::select('SELECT * FROM item_type_master WHERE is_deleted_status = \"N\"');\n\n\n foreach ($getPurchaseData as $purhase) {\n $purchaseListHtml = '<option value=\"'.$purhase->id.'\"';\n \n if ($unitId == $purhase->id) { \n $purchaseListHtml .= ' selected=\"selected\"';\n }\n\n $purchaseListHtml .= '>'.$purhase->name.'</option>';\n\n \n echo $purchaseListHtml; \n } */\n\n // }\n\n }", "public function get_excel_unit(Request $request){\n $getunit = Unit::where(['board_id' => $request->board_id,'medium_id' => $request->medium_id,'standard_id' => $request->standard_id,'semester_id' => $request->semester_id,'subject_id' => $request->subject_id,'status' => 'Active'])->get();\n\n $result=\"<option value=''>--Select Unit--</option><option value='All'>All</option>\";\n if(count($getunit) > 0)\n {\n foreach ($getunit as $unit) {\n\n if($request->has('unit_id')){\n if($request->unit_id == $unit->id){\n $result.=\"<option value='\".$unit->id.\"' selected>\".$unit->title.\"</option>\";\n }\n else{\n $result.=\"<option value='\".$unit->id.\"'>\".$unit->title.\"</option>\"; \n }\n }else{\n $result.=\"<option value='\".$unit->id.\"'>\".$unit->title.\"</option>\";\n }\n }\n }\n \n return response()->json(['html'=>$result]); \n }", "public function index(Request $request)\n {\n \n $property = new Property;\n $unit = new Unit;\n\n $units = Unit::select();\n $hasFields = false;\n $units->whereHas('property', function ($query) USE ($request, $property) {\n \n // if($request->has('address') && trim($request->address)) {\n // // dd('sadasd');\n // $query->where('address', 'like', \"%{$request->address}%\");\n // }\n \n\n if($request->has('property_type') && in_array($request->property_type, array_keys($property->types))){\n // dd('aaa');\n $query->where('property_type', '=', $request->property_type);\n }\n \n\n if($request->has('gender')) {\n // dd('asdsad');\n $query->where('gender', '=', $request->gender);\n }\n });\n\n \n\n if($request->has('furnishing') && in_array($request->furnishing, array_keys($unit->furnishings))) \n $units->where('furnishing', '=', $request->furnishing);\n\n if($request->has('terms') && in_array($request->terms, ['LONG', 'SHORT']))\n $units->where('rental_terms', '=', $request->terms);\n\n if($request->has('bedrooms') && is_numeric($request->bedrooms))\n $units->where('bedrooms', '=', $request->bedrooms);\n\n if($request->has('bathrooms') && is_numeric($request->bathrooms))\n $units->where('bathrooms', '=', $request->bathrooms);\n\n if($request->has('capacity') && is_numeric($request->capacity))\n $units->where('bedrooms', '=', $request->capacity);\n\n if($request->has('min_price') && is_numeric($request->min_price)){\n $units->where(function($query) USE ($request) {\n if($request->has('terms') && $request->terms === 'LONG'){\n $query->where('long_term_rate', '>=', $request->min_price);\n }\n\n if($request->has('terms') && $request->terms === 'SHORT'){\n $query->where('short_term_daily_rate', '>=', $request->min_price)\n ->orWhere('short_term_weekly_rate', '>=', $request->min_price)\n ->orWhere('short_term_monthly_rate', '>=', $request->min_price);\n } \n });\n }\n\n if($request->has('max_price') && is_numeric($request->max_price)){\n $units->where(function($query) USE ($request) {\n if($request->has('terms') && $request->terms === 'LONG'){\n $query->where('long_term_rate', '<=', $request->max_price);\n }\n\n if($request->has('terms') && $request->terms === 'SHORT'){\n $query->where('short_term_daily_rate', '<=', $request->max_price)\n ->orWhere('short_term_weekly_rate', '<=', $request->max_price)\n ->orWhere('short_term_monthly_rate', '<=', $request->max_price);\n } \n });\n }\n\n if(in_array($postSort = $request->input('post_time'), ['asc', 'desc'])){\n $units->orderBy('created_at', $postSort);\n }\n\n if(in_array($priceSort = $request->input('price_sort'), ['asc', 'desc'])){\n $units->orderBy(DB::raw(\"CASE WHEN rental_terms = 'LONG' THEN long_term_rate ELSE short_term_monthly_rate END\"), $priceSort);\n }\n\n $favorites = array();\n if($request->has('fav')) {\n $tfavorites = DB::table('favorites')->select('unit')->where('user',Auth::id())->get()->pluck('unit');\n $byFav = true;\n // dd($favorites);\n $f_units = $units->approved()->whereIn('id', $tfavorites)->with('property')->orderBy('id', 'DESC')->limit(3)->get();\n // dd($f_units);\n }else{\n $byFav = false;\n $f_units = $units->approved()->with('property')->get();\n }\n \n\n // dd($f_units);\n $sug_units = false;\n if(count($f_units) <= 0) {\n $sug_units = Unit::limit(3)->get();\n }\n $brgys = lang::get('barangay');\n return view('home', [\n 'types' => $property->types,\n 'furnishing' => $unit->furnishings,\n 'amenities' => $unit->amenitiesList,\n 'units' => $f_units,\n 'brgys' => $brgys['brgys'],\n 'byFav' => $byFav,\n 'favorites' => $favorites,\n 'sug_units' => $sug_units,\n 'barangays' => $this->barangays,\n 'permitMove' => (int)empty($request->all())\n ]);\n }", "public function unit()\n {\n return $this->belongsTo('App\\Unit');\n }", "public function unit()\n {\n return $this->belongsTo('App\\Models\\Unit');\n }", "public function edit(Request $request, $id)\n {\n $order_id = $id;\n $unit_id = $request->query('unit');\n $payment_history_id = $request->query('payment_history');\n $detailUnit = $unit = DB::table('unit')\n ->select([\n 'unit.unit_number', \n 'unit.unit_name', \n 'unit.large as large', \n 'unit.id as unit_id', \n 'unit.available_status_id',\n 'unit_types.name as unit_type_name', \n 'floors.name as floor', \n 'unit.price as price', \n 'views.name as view_name', \n 'towers.name as tower_name',\n 'clients.id as client_id',\n 'clients.name as client_name',\n 'clients.handphone as client_phone',\n 'clients.address as client_address',\n 'payment_histories.payment_status_id as payment_status',\n 'payment_histories.payment_method as payment_method',\n 'payment_histories.nominal as nominal',\n 'payment_histories.id as payment_history_id',\n 'payment_histories.valid_transaction as valid_transaction',\n 'payment_histories.refundable_status as refundable_status',\n 'payment_histories.notes as payment_history_note',\n 'users.name as user_name',\n 'users.email as user_email',\n 'orders.order_number as order_number',\n 'orders.created_at as order_date',\n 'orders.id as order_id',\n 'orders.persen_dp as order_persen_dp',\n 'orders.nominal_dp as order_nominal_dp',\n 'orders.lama_cicilan as order_lama_cicilan',\n 'orders.cicilan as order_cicilan',\n 'orders.bunga as order_bunga'\n ])\n ->join('unit_types', 'unit.unit_type_id', '=', 'unit_types.id')\n ->join('floors', 'unit.floor_id', '=', 'floors.id')\n ->join('views', 'unit.view_id', '=', 'views.id')\n ->join('towers', 'unit.tower_id', '=', 'towers.id')\n ->leftJoin('orders', 'unit.id', '=', 'orders.unit_id')\n ->leftJoin('clients', 'orders.client_id', '=', 'clients.id')\n ->leftJoin('users', 'orders.user_id', '=', 'users.id')\n ->leftJoin('payment_histories', 'orders.id', '=', 'payment_histories.order_id')\n ->where(\"unit.id\", \"=\", $unit_id)\n ->where(\"orders.id\", \"=\", $order_id)\n ->where(\"payment_histories.id\", \"=\", $payment_history_id)\n ->first();\n // dd($detailUnit);\n if(auth()->user()->hasRole('kasir')){\n $clients = DB::table('clients')->get();\n }else{\n $clients = DB::table('clients')->where('user_id', \"=\" , auth()->user()->id)->get();\n }\n\n $transactionHistory = DB::table('payment_histories')\n ->select([\n 'payment_histories.id',\n 'payment_histories.order_id',\n 'payment_histories.payment_number',\n 'payment_histories.nominal',\n 'payment_histories.payment_date',\n 'payment_histories.refundable_status',\n 'payment_histories.valid_transaction',\n 'payment_histories.payment_method',\n 'users.name as user_name',\n 'payment_status.name as payment_status_name'\n ])\n ->join('payment_status', 'payment_histories.payment_status_id', '=', 'payment_status.id')\n ->join('users', 'payment_histories.user_id', '=', 'users.id')\n ->where('payment_histories.order_id', '=', $unit->order_id)\n ->paginate(10);\n \n // dd($detailUnit);\n $options = [\n 'order_id' => $id,\n 'type' => 'update',\n 'unit' => $detailUnit,\n 'clients' => $clients,\n 'payment_statuss' => PaymentStatus::all(),\n 'payment_methods' => PaymentHistories::PAYMENT_METHOD,\n 'transactionHistory' => $transactionHistory \n ];\n\n return view('layouts.orders.form', $options);\n }", "public function unitByIdget($unit_id)\r\n {\r\n $response = Unit::findOrFail($unit_id);\r\n if(!$response){ \r\n return response()->json(['msg' => 'could not find unit'], 204);\r\n }else{\r\n return response()->json($response, 200);\r\n }\r\n }", "public function unit()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Unit');\n\t}", "public function create(Request $request)\n {\n $unit_id = $request->query('unit');\n $detailUnit = $unit = DB::table('unit')\n ->select([\n 'unit.unit_number', \n 'unit.unit_name', \n 'unit.large as large', \n 'unit.available_status_id as available_status_id', \n 'unit_types.name as unit_type_name', \n 'floors.name as floor', \n 'unit.price as price', \n 'views.name as view_name', \n 'towers.name as tower_name',\n 'clients.id as client_id',\n 'clients.name as client_name',\n 'clients.handphone as client_phone',\n 'clients.address as client_address',\n 'users.name as user_name',\n 'users.email as user_email',\n 'orders.order_number as order_number',\n 'orders.created_at as order_date',\n 'orders.id as order_id',\n 'orders.persen_dp as order_persen_dp',\n 'orders.nominal_dp as order_nominal_dp',\n 'orders.lama_cicilan as order_lama_cicilan',\n 'orders.cicilan as order_cicilan',\n 'orders.bunga as order_bunga',\n // 'payment_histories.payment_status_id as payment_status',\n // 'payment_histories.payment_method as payment_method',\n // 'payment_histories.nominal as nominal',\n // 'payment_histories.id as payment_history_id',\n // 'payment_histories.valid_transaction as valid_transaction'\n ])\n ->join('unit_types', 'unit.unit_type_id', '=', 'unit_types.id')\n ->join('floors', 'unit.floor_id', '=', 'floors.id')\n ->join('views', 'unit.view_id', '=', 'views.id')\n ->join('towers', 'unit.tower_id', '=', 'towers.id')\n ->leftJoin('orders', 'unit.id', '=', 'orders.unit_id')\n ->leftJoin('users', 'orders.user_id', '=', 'users.id')\n ->leftJoin('clients', 'orders.client_id', '=', 'clients.id')\n ->leftJoin('payment_histories', 'orders.id', '=', 'payment_histories.order_id')\n ->where(\"unit.id\", \"=\", $unit_id)\n ->first();\n\n // get customer data\n if(auth()->user()->hasRole('kasir')){\n $clients = DB::table('clients')->get();\n }else{\n $clients = DB::table('clients')->where('user_id', \"=\" , auth()->user()->id)->get();\n }\n\n // get history transaksi\n $transactionHistory = DB::table('payment_histories')\n ->select([\n 'payment_histories.id',\n 'payment_histories.order_id',\n 'payment_histories.payment_number',\n 'payment_histories.nominal',\n 'payment_histories.payment_date',\n 'payment_histories.refundable_status',\n 'payment_histories.valid_transaction',\n 'payment_histories.payment_method',\n 'users.name as user_name',\n 'payment_status.name as payment_status_name',\n 'payment_status.id as payment_status_id'\n ])\n ->join('payment_status', 'payment_histories.payment_status_id', '=', 'payment_status.id')\n ->join('users', 'payment_histories.user_id', '=', 'users.id')\n ->where('payment_histories.order_id', '=', $unit->order_id)\n ->get();\n\n if(auth()->user()->hasRole('kasir')){\n $reserved_payment_status = ($unit->available_status_id == null) ? PaymentStatus::BOOKING : array_values(array_diff(PaymentStatus::LUNAS, PaymentStatus::BOOKING)); \n }else{\n $existing_payment_status = $transactionHistory->pluck('payment_status_id')->all();\n $booking_status = collect(PaymentStatus::BOOKING); \n $reserved_payment_status = ($unit->available_status_id == null) ? PaymentStatus::BOOKING : $booking_status->diff($existing_payment_status); \n }\n // dd($reserved_payment_status);\n \n $x = DB::table('payment_histories')->select('payment_status_id')->distinct()\n ->join('orders', 'payment_histories.order_id', '=', 'orders.id')\n ->where('unit_id','=', $request->query('unit'))\n ->whereNotIn('payment_status_id', [4,5])->get();\n $y = collect($reserved_payment_status);\n $diff = $y->diff($x->pluck('payment_status_id')->values());\n $payment_status_id = $diff->values()->all();\n $options = [\n 'type' => 'create',\n 'unit' => $detailUnit,\n 'clients' => $clients,\n 'payment_statuss' => PaymentStatus::find($payment_status_id),\n 'payment_methods' => PaymentHistories::PAYMENT_METHOD,\n 'transactionHistory' => $transactionHistory \n ];\n return view('layouts.orders.form', $options);\n }", "public function unit(){\n\n $unit = MedicalSupply::where('medSupName', '=', Input::get('mName'))\n ->where('brand', '=', Input::get('mBrand'))\n ->where('supType', '=', 'm')\n ->get();\n\n return Response::json($unit);\n }", "public function getRbaMurni($request, $kodeUnit = null)\n {\n $rba = Rba::whereHas('statusAnggaran', function ($query) {\n $query->where('is_copyable', true);\n })->with(['statusAnggaran', 'mapKegiatan.blud']);\n \n if ($kodeUnit) {\n $rba->where('kode_unit_kerja', $kodeUnit);\n }\n\n if ($request->unit_kerja) {\n $rba->where('kode_unit_kerja', $request->unit_kerja);\n }\n\n if ($request->start_date) {\n $rba->where('created_at', '>=', $request->start_date);\n }\n\n if ($request->end_date) {\n $rba->where('created_at', '<=', $request->end_date);\n }\n\n return $rba->get();\n\n }", "function get_unit()\r\n{\r\n\t$ci = & get_instance();\r\n\t$ci->load->database();\r\n\t\r\n\treturn $unit = $ci->db->get('t_unit')->result();\r\n}", "public function getAllFreezingOperation(Request $request, $row_id){\n $getLotInfoId = LotInfo::find($row_id);\n if(!empty($getLotInfoId)){\n $getfreezingOperation = LotInfo::select('id','lot_number','production_date')->where('id',$row_id)->with('freezingOperations')\n ->with('tunnels')->with('frequencyTempReadings')->first();\n return response()->json($getfreezingOperation, 200);\n }\n else{\n return response()->json(['error'=>'Lot Number Not Found!'], 401);\n }\n}", "public function floor(Request $request)\n {\n\n if (!empty($request->un_id))\n {\n\n $list = \"<option value=\\\"\\\">Select Floor</option>\";\n $desList = Floor::where('hr_floor_unit_id', $request->un_id)\n ->pluck('hr_floor_name','hr_floor_id');\n\n foreach ($desList as $key => $value)\n {\n $list .= \"<option value=\\\"$key\\\">$value</option>\";\n }\n\n return $list;\n }\n}", "public function getBusDetails(Request $request){\n $bus_id=(int)$request->busid;\n $result = DB::select(\"SELECT * FROM bus where bus_id='$bus_id'\");\n $routes= DB::select(\"SELECT * FROM route\");\n $routes1= DB::select(\"SELECT * FROM route where route_id=(SELECT route_id FROM bus where bus_id='$bus_id')\");\n //var_dump($routes);\n if($request->search==\"Update Bus\"){\n return view('updateBus',compact('result','routes'));\n }elseif ($request->delete==\"Remove Or View Bus Details\"){\n return view('deletebus',compact('result','routes1'));\n }elseif ($request->add==\"Add New Bus\"){\n $routes = DB::select('select * from route');\n return view('addnewbus',compact('routes'));\n }elseif ($request->addS==\"Add New Schedule\"){\n $busids = DB::select('select * from bus');//search route\n $places=DB::select('select * from town');\n return view('formAddschedule',compact('busids','places'));\n }\n }", "public function index(){\n // $Room = Room::all();\n // dd($Room);\n // SELECT roomtype FROM `rooms` WHERE roomtype = \"single\"\n // $Room = DB::table('rooms')\n // ->select('rooms.roomType', 'rooms.id')\n // ->get();\n // dd($Room);\n $Rooms = DB::table('rooms')\n ->select('rooms.roomType')\n ->distinct()\n ->get();\n\n\n // dd($Rooms);\n return view('reservation/searchRoomF',['Rooms' => $Rooms]);\n}", "public function getnombre_institucion(Request $request)\n\n{\n\n $nombre_institucion= DB::table(\"nombre_institucion\")\n\n ->where(\"codigo_municipio_trabajo\",$request->codigo_municipio_trabajo)\n\n ->pluck(\"nombre_institucion_trabajo\",\"id_nombre_institucion\");\n\n return response()->json($nombre_institucion);\n\n}", "public function edit(Request $Request){\n\t$edit_id = $_GET['edit_id'];\n\t$branch_edit_id = $Request->edit_id; // Here catch a variable for url \n\t$branches = DB::table('Branches')\n\t\t \t\t\t->where('branch_id', $branch_edit_id) // Here use a condition\n\t\t\t\t\t->join('Users', 'users.id', '=', 'Branches.user_id') // Here Joning data with user table\n\t\t\t\t\t->first();\n\treturn response()->json($branches); // Here return all data by json formet\n\t\n}", "public function findUnit($id_produto) {\r\n$sql = \"SELECT * FROM $this->tabela WHERE id_produto = :id_produto\";\r\n$stm = DB::prepare($sql);\r\n$stm->bindParam(':id_produto', $id_produto, PDO::PARAM_INT);\r\n$stm->execute();\r\nreturn $stm->fetch();\r\n}", "public function tampil(Request $request){\n $transaksi_juals = transaksi_jual::when($request->dm_plat, function ($query) use ($request) {\n $query->where('dm_plat','like',\"%{$request->dm_plat}%\")\n ->where('tj_telepon','like',\"%{$request->tj_telepon}%\")\n ->join('detail_motors', 'detail_motors.tj_id', 'transaksi_juals.tj_id');\n })->first();\n return view('kostumerRiwayat',['transaksi_juals'=>$transaksi_juals]); \n }", "public function unitget()\r\n {\r\n $response = Unit::get();\r\n if(!$response){ \r\n return response()->json(['msg' => 'could not find unit'], 204);\r\n }else{\r\n return response()->json($response, 200);\r\n }\r\n }", "public function getnombre_tipo_institucion(Request $request)\n\n{\n\n $tipo_institucion= DB::table(\"tipo_institucion\")\n\n ->where(\"id_nombre_institucion\",$request->id_nombre_institucion)\n\n ->pluck(\"nombre_tipo_institucion\",\"id_tipo_institucion\");\n\n return response()->json($tipo_institucion);\n\n}", "public function selectPurhaseAngularById(Request $request)\n {\n\n\n $unitId = $request->input('unit_id');\n \n if (!empty($unitId)) {\n $getPurchaseData = DB::select('SELECT * FROM item_type_master WHERE is_deleted_status = \"N\"');\n\n\n foreach ($getPurchaseData as $purhase) {\n $purchaseListHtml = '<option value=\"'.$purhase->id.'\"';\n \n if ($unitId == $purhase->id) { \n $purchaseListHtml .= ' selected=\"selected\"';\n }\n\n $purchaseListHtml .= '>'.$purhase->name.'</option>';\n\n \n echo $purchaseListHtml; \n } \n\n }\n\n }", "public function update(Request $request, Unit $unit)\n {\n $update = $request->all();\n\n $x = Unit::where('unit_name', $request->unit_name)\n ->where('id', '!=', $request->id)->count();\n \n if($x == 0){\n $unit->where('id', $request->id)->update($update);\n return response()->json($request->unit_name, Response::HTTP_OK);\n }\n \n // return response()->json($x, Response::HTTP_OK);\n\n // $new_update = $unit->updateOrCreate($update);\n\n // if($new_update->id == $unit->id OR !$new_update->exists){\n \n // }\n // $count = Unit::select('unit_name')->where('id', $request->id)->get();\n // if($count < 1){\n // $datas = Unit::where('id', $request->id)->first();\n // Unit::where('id', $request->id)->update($request->all());\n // return response()->json($datas, Response::HTTP_OK);\n // }\n\n }", "public function busquedaMaterial(Request $request){\n\n $material = RegistroBodegaB4::where('nombre', 'like', '%' . $request->nombre . '%')\n ->orWhere('codigo', 'like', '%' . $request->nombre . '%')\n ->select('nombre AS label')\n ->take(8)\n ->get();\n\n return $material;\n }", "public function show(Request $request)\n {\n //check ว่าเข้าได้เฉพาะของที่ตัวเองมี\n $req = DB::table('roomreqs')->where([\n ['id',$request->roomreq_id],\n ['user_id',Auth::user()->id]\n ])->get();\n\n if($req->count() == 0){\n return 'no data';\n }\n\n return $req;\n }", "public function buscaTurnos($grado,$anio){\n //public function buscaTurnos($grado){\n $match = ['grado' => $grado, 'anios_id' => $anio];\n //$turnos=Grado::where('grado',$grado)->select('turnos_id')->groupBy('turnos_id')->get();\n $turnos=Grado::where($match)->select('turnos_id')->groupBy('turnos_id')->get();\n //$turnos_values=Arr::flatten($turnos);\n return $turnos;\n }", "public function findprogram($unit,$id) {\n\t\t$hasil = $this->db->query(\"select * from cc_program a LEFT JOIN (select * from cc_program_input where input_user='$unit')b on a.cc_detail=b.input_detail where status='Default' AND cc_id='$id'\");\n\t\tif($hasil->num_rows() > 0){\n\t\t\treturn $hasil->row();\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}", "public function getUnits(){\n\n\t\t $this->db->where('delete_status',0);\n\t $query=$this->db->get('unit'); \n\t return $query->result();\n\n\t}", "function getUnits(){\n $sql = \"SELECT * FROM units\";\n return runQuery($sql);\n}", "public function getmunicipio_lugar_trabajo(Request $request)\n\n{\n\n $municipio_lugar_trabajo = DB::table(\"municipio_lugar_trabajo\")\n\n ->where(\"codigo_departamento_trabajo\",$request->codigo_departamento_trabajo)\n\n ->pluck(\"nombre_municipio_trabajo\",\"codigo_municipio_trabajo\");\n\n return response()->json($municipio_lugar_trabajo);\n\n}", "public function getAllClodStorage(Request $request,$row_id){\n \n $getLotInfoId = LotInfo::find($row_id); \n if(!empty($getLotInfoId)){\n \n $getColdStorage = LotInfo::select('id','lot_number','production_date')->where('id',$row_id)->with('coldStorages')->first();\n return response()->json($getColdStorage, 200);\n }\n else{\n return response()->json(['error'=>'Lot Number Not Found!']);\n }\n}", "public function update(Request $request, $unit)\n {\n $this->validate($request, [\n 'school_id' => 'required|numeric',\n 'department_id' => 'required',\n 'course_id' => 'required|string',\n 'unit_id' => 'required|string',\n 'unit_name' => 'required|string',\n\n ]);\n DB::table('units')->where('id',$unit)->update([\n\n 'school_id' => $request->school_id,\n 'department_id' => $request->department_id,\n 'course_id' => $request->course_id,\n 'unit_id' => $request->unit_id,\n 'unit_name' => $request->unit_name,\n ]);\n \n\n return redirect()->route('unit.index')\n ->with('success','Unit Updated');\n }", "public function obtenerEstudiantesSeccion(Request $request){\n $idSeccion = $request[\"idSeccion\"];\n\n //obteniendo los estudiantes que estan matriculados en esa seccion\n $estudiantes = \\App\\Estudiante::where('idSeccion', $idSeccion)->get();\n\n echo $estudiantes;\n\n }", "public function edit($unit)\n {\n $school = new Department;\n $department = new Course;\n $unit = Unit::findOrFail($unit);\n\n return view('admin/units/edit')\n ->with('unit', $unit)\n ->with('courses', Course::all())\n ->with('departments', Department::all())\n ->with('schools', School::all())\n ->with('school', $school)\n ->with('dept', $department);\n }", "function getQuestionRecord($question_id)\n {\n return QuestionBank::where('id','=',$question_id)->first();\n }", "public function getQuantityByUnit($unit)\n {\n return\n DB::table('positions')\n ->select()\n ->where([\n ['positions.tenant_id', $this->requester->getTenantId()],\n ['positions.company_id', $this->requester->getCompanyId()],\n ['positions.unit_code', $unit]\n ])\n ->get();\n }", "public function getBomItemData(Request $request)\n {\n\n $pi_bom = DB::table('cm_pi_asset_description AS cpad')\n ->leftJoin('cm_machine_type','cpad.cm_machine_type_id','=','cm_machine_type.id')\n ->leftJoin('cm_section','cpad.cm_section_id','=','cm_section.id')\n ->where('cpad.id',$request->machine)\n ->select([\n 'cpad.*',\n 'cm_machine_type.type_name',\n 'cm_machine_type.manufacturer',\n 'cm_machine_type.id AS type_id',\n 'cm_section.section_name',\n 'cm_section.id AS section_id'\n ])\n ->first();\n return Response::json($pi_bom);\n }", "public function getUserRequirement()\n {\n $id = 1;\n $requirement = MaterialRequirement::where('id_user',$id)->get();\n return $requirement;\n }", "public function show(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'user_id' => 'required'\n ]);\n //$fcm = Fcm::find($request->get('user_id'));\n $fcm = FCM::where('user_id', $request->get('user_id'))->first();\n return $fcm;\n }", "public function show($id)\n {\n //\n $result=DB::table(\"tblUnit\")\n ->select(DB::raw('count(*) as count'))\n ->where('tblFloor.intFloorCode', $id)\n ->join('tblFloor','tblUnit.intFloorCode','tblFloor.intFloorCode')\n ->first();\n return Response::json($result);\n }", "public function checksolicitud($folio){\n $this->db->where('folio',$folio);\n $result= $this->db->get('solicitudes');\n return $result->row(); \n}", "public function show($id)\n {\n if (Auth::check()){\n\n \n $room=Attroom::where('id_user',Auth::user()->id,'=')->get()->pluck('id_room');\n $myrooms=DB::table('rooms')->whereIn('id', $room)\n ->get()->pluck('id')->toArray();\n $rooms = Room::all();\n return view('attendee.room',compact('rooms','myrooms')); \n }\n else{\n $rooms = Room::all();\n return view('attendee.room',compact('rooms'));\n }\n}", "public function getnombre_sede_institucion(Request $request)\n\n{\n\n $sede_institucion= DB::table(\"sede_institucion\")\n\n ->where(\"id_tipo_institucion\",$request->id_tipo_institucion)\n\n ->pluck(\"nombre_sede_institucion\",\"id_sede_institucion\");\n\n return response()->json($sede_institucion);\n\n}", "public function getUnit()\n {\n return $this->hasOne(Unit::className(), ['unit_id' => 'unit_id']);\n }", "public function show(Request $request)\n {\n $phoneData = DB::table('formbuilds')->where('id' ,'=', $request->get('id'))->select('id', 'section', 'phone')->get();\n return $phoneData;\n }", "public function Doctorstudent($id){\n $data = array(\n 'students'=>DB::table('students')->where('regno','=',$id)->get(),\n );\n\n return $data;\n}", "public function postGetUnit(Request $request){\n $mef_officer_id = intval($request->mef_officer_id);\n $result = $this->giveRA->getUnit($mef_officer_id);\n return $result;\n }", "public function businessUnit() {\n return $this->belongsTo('Mr\\BusinessUnit');\n }", "public function create(Request $request)\n {\n $q = $request->get('q'); \n $kode = Barang::where('kode_barang', '=',$q)->orWhere('nama_barang', '=', \"$q\")\n ->get();\n // $Barang = Barang::pluck('kode_barang','id');\n return view('Retur.create',compact('q','kode'));\n }", "public function edit($id)\n {\n $result = DB::table('tblfloor')\n ->select('tblunit.*','tblbuilding.*','tblfloor.*',DB::raw('COUNT(tblunit.intUnitCode) as current'))\n ->leftJoin('tblunit','tblfloor.intFloorCode','=','tblunit.intFloorCode')\n ->join('tblbuilding','tblfloor.intBuilCode','=','tblbuilding.intBuilCode')\n ->where('tblfloor.intFloorCode','=',$id)\n ->groupBy('tblfloor.intFloorCode')\n ->orderBy('tblfloor.intFloorCode')\n ->first();\n return Response::json($result);\n }", "public function getTasks(Request $request) // Filter Methods of tasks\n { \n // $postData = $request->validate([\n // 'board_id' => 'required'\n // ]);\n\n $filter = array(\n // 'board_id' => $postData['board_id']\n );\n\n if($request->team_id !== 0){\n $filter['team_id'] = $request->team_id;\n }\n\n if(!empty($request->assignee_id)) { \n $filter['assignee_id'] = $request->assignee_id;\n }\n\n if(!empty($request->creator_id)) { \n $filter['creator_id'] = $request->creator_id;\n }\n\n if(!empty($request->status)) {\n $filter['status'] = $request->status;\n }\n\n $tasks = Task::with('creator', 'assignee')\n ->where($filter)\n ->where('title', 'ILIKE', '%'. request('keyword') .'%')\n ->get();\n \n return response()->json([\n 'status' => true,\n 'message' => $tasks\n ], 200);\n }", "function get_specific_unit_details($unitID){\n $courseID = (int)$_SESSION['currentCourse']; //the SESSION ought to have been set when this function gets called\n $query = \"SELECT unitTitle, objective, review, quiz FROM units WHERE courseID_Ref = '$courseID' AND unitID = '$unitID'\";\n $result = mysqli_query($GLOBALS['connect'], $query);\n\n $answer = mysqli_fetch_assoc($result);\n\n return $answer;\n}", "public function getRoomsNotOccupied(Request $request){\n $rooms = RoomModel::where('ispublished',1)\n ->where('status','!=', 'Occupied')\n ->where(function($q) use ($request){\n $q->where('roomNo', 'LIKE', \"%{$request->search}%\")\n ->orWhere('status', 'LIKE', \"%{$request->search}%\");\n })\n ->paginate(10);\n return $rooms;\n }", "public function loan_details($id){\n $data_edit=Loan::where('id',$id)->first();\n return $data_edit;\n}", "public function dropDownShow(Request $request)\n\n {\n $stations = \\App\\Station::where('status', 'active')->orderBy('id')->get();\n //dd($stations);\n $fstation = \\App\\Station::where('status', 'active')->orderBy('id')->first()->id;\n // $id = 2;\n\n // return view('front', compact('id', 'stations'));\n return view('front', compact('fstation','stations'));\n\n }", "public function show( $cubiculo)\n { return $cubiculo=Cubiculo::where('cubiculo',$cubiculo)->first();\n \n \n }", "public function plan_detail(Request $request) {\n\n $validator = Validator::make($request->all(), [\n 'plan_id' => 'required|exists:subscriptions,id', \n ], array(\n 'exists' => 'The :attribute doesn\\'t exists',\n ));\n \n if ($validator->fails()) {\n\n $error_messages = implode(',', $validator->messages()->all());\n\n $response_array = array('success' => false, 'error_messages'=>$error_messages , 'error_code' => 101);\n\n return response()->json($response_array);\n }\n \n $currency = Setting::get('currency');\n\n $model = Subscription::select('id as plan_id', 'title', 'description', 'plan', 'amount', 'status', 'popular_status', 'created_at', 'unique_id', DB::raw(\"'$currency' as currency\"))->where('id',$request->plan_id)->first();\n\n if ($model) {\n\n return response()->json(['success'=>true, 'data'=>$model]);\n\n } else {\n \n return response()->json(['success'=>false, 'message'=>tr('subscription_not_found')]);\n }\n\n }", "public function show($id) //Select \n {\n //Trae la informacion del id \n $ubicacion = Ubicacion::where('id','=',$id)->get();\n return response()->json($ubicacion);\n }", "public function unit() {\n return $this->belongsTo(DepartmentUnit::class);\n }", "public function getBillingItem($id)\n {\n// foreach ($table_order as $order) {\n// $arr = Order::where(['OID' => $order->OID, 'is_cancelled' => 0])->get();\n $sql = 'select * from order_descriptions where OID in (select oid from tbl_order where tbl_id=\"' . $id . '\" and is_cancelled=0 and IsBill=0)';\n $bills = DB::select($sql);\n return view('bill.partial_bill_item')->with(['bills' => $bills]);\n }", "public function unit(): BelongsTo\n {\n return $this->belongsTo(PlayerUnit::class, 'player_unit_id', 'unit_id');\n }", "public function getTransaction(Request $request)\n {\n\n\n if ($request->unit_number != '') {\n $data = SMSBundles::where('unit_from', '<=', $request->unit_number)->where('unit_to', '>=', $request->unit_number)->first();\n\n if ($data) {\n $unit_price = $data->price;\n $amount_to_pay = $request->unit_number * $unit_price;\n $transaction_fee = ($amount_to_pay * $data->trans_fee) / 100;\n $total = $amount_to_pay + $transaction_fee;\n } else {\n $unit_price = 'Price Bundle empty';\n $amount_to_pay = 'Price Bundle empty';\n $transaction_fee = 'Price Bundle empty';\n $total = 'Price Bundle empty';\n }\n } else {\n $unit_price = 'Price Bundle empty';\n $amount_to_pay = 'Price Bundle empty';\n $transaction_fee = 'Price Bundle empty';\n $total = 'Price Bundle empty';\n }\n\n\n return response()->json([\n 'unit_price' => $unit_price,\n 'amount_to_pay' => $amount_to_pay,\n 'transaction_fee' => $transaction_fee,\n 'total' => $total\n ]);\n\n\n }", "public function consultar_turno()\n {\n //$role_user=Auth::user()->whatRoleUser(Auth::user()->id);\n //dd($role_user);\n\n $turno=Role::select('tbl_turnos.id','tbl_turnos.role_user_id','tipo_turno_id','status_turno','descripcion_turno')\n ->join('role_user','role_user.role_id','roles.id') \n ->join('tbl_turnos','tbl_turnos.role_user_id','role_user.id') \n ->join('tbl_tipos_turnos','tbl_tipos_turnos.id','tbl_turnos.tipo_turno_id') \n ->orderBy('tbl_turnos.created_at','desc') \n ->orderBy('tbl_turnos.tipo_turno_id','desc') \n ->first();\n //dd($turno);\n return $turno;\n }", "function GetBedroomDetailsUnit($filter=false,$languageID=false)\n\t{\n\t\t$query=$this->db->query(\"select rp_property_attribute_values.*,rp_property_attribute_value_details.* from rp_property_attribute_values,rp_property_attribute_value_details where rp_property_attribute_values.propertyID='$filter' and rp_property_attribute_values.attributeID=1 and rp_property_attribute_values.attrValueID=rp_property_attribute_value_details.attrValueID and rp_property_attribute_value_details.languageID=$languageID\");\n\t}", "function Getunitdetails($filter=false)\n\t{\n\t\t$query=$this->db->query(\"select * from rp_properties where projectID='$filter' and type='Unit'\");\n\t\treturn $query->result();\n\t}", "public function actionGetunitprice($no)\n {\n \n \n $unitprice = Item::find()->select(['[Unit Cost]'])->where(['No_' => $no])->asArray()->one();\n return $unitprice['Unit Cost'];\n }", "public function getDeliveryPatient(Request $request){\n\n }", "public function list(Request $request)\n {\n $query=request()->all();\n $where=[];\n $u_name=$query['u_name']??'';\n if($u_name){\n $where[]=['u_name','like',\"%$u_name%\"];\n }\n $data=DB::table('kao')->where($where)->paginate(2);\n $u_lei=$data['u_lei'];\n return view('Kao/list',['data'=>$data,'u_lei'=>$u_lei,'u_name'=>$u_name]);\n\n }", "public function get($id)\n {\n return DB::table('bukus')->find($id);\n }", "public function update(Request $request, Unit $unit)\n {\n //\n }", "public function modelGetRecord(){\n $id = isset($_GET[\"id\"])&&$_GET[\"id\"] > 0 ? $_GET[\"id\"] : 0;\n $conn = Connection::getInstance();\n // thuc hien truy van\n $query = $conn->query(\"select * from inventory where id=$id\");\n // tra ve mot ban ghi\n return $query->fetch();\n }", "function verifiRentsDetails($id)\n{\n\n $requete = \"SELECT idSnow FROM rentsdetails where idSnow='$id';\";\n $request = executeQuery($requete);\n\n\n return $request;\n}", "public function get_units($units_id)\n\t{\n\t\t//retrieve all users\n\t\t$this->db->from('units');\n\t\t$this->db->select('*');\n\t\t$this->db->where('units_id = '.$units_id);\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "public function selectItemNamedAngularById()\n {\n\n $itemTypeId = !empty($_GET['itemTypeId']) ? $_GET['itemTypeId'] : '';\n if (!empty($itemTypeId)) {\n $itemDatasUnitData = DB::select('SELECT * FROM item_master WHERE is_deleted_status = \"N\" AND item_type_id = '.$itemTypeId.'');\n if (!empty($itemDatasUnitData)) {\n $unitId = $itemDatasUnitData[0]->unit_id;\n } \n }\n\n $itemUnitData = DB::select('SELECT * FROM unit_master WHERE is_deleted_status = \"N\" AND id = '.$unitId.'');\n if (!empty($itemUnitData)) {\n echo $itemUnitData[0]->unit;\n }\n\n }", "public function getStudent($idStudent){\n $student=student::where('numberAccount',$idStudent)->first();\n return $idStudent;\n }", "public function getStrafblad(Request $request)\n {\n // $straffen = DB::table('strafblad')->where('uuid', $uuid)->get();\n return response()->json(compact('request'));\n }", "public function selectRuv(Request $request){\n $ruvs = Lote::select('paq_ruv')\n ->where('paq_ruv','!=',NULL);\n if($request->proyecto != '')\n $ruvs = $ruvs->where('fraccionamiento_id','=',$request->proyecto);\n if($request->etapa != '')\n $ruvs = $ruvs->where('etapa_id','=',$request->etapa);\n $ruvs = $ruvs->orderBy('paq_ruv','asc')\n ->distinct()\n ->get();\n\n return ['ruvs'=>$ruvs];\n }", "public function edit(Request $request)\n {\n //\n $id = $request->id;\n\n $order = DB::select(DB::raw(\"SELECT * FROM `orders`, `produks`, `users` WHERE orders.id_order = \" .$id. \" AND orders.id_produk_order = produks.id_produk AND orders.id_user_order = users.id\"));\n //$order = Order::find($id);\n\n return $order;\n \n }", "public function query()\n {\n $query = Unit::select(['id','code','name']);\n\n return $this->applyScopes($query);\n }", "public function buscar_por_run (Request $request){\n if ($request->wantsJson()) {\n $run_madre = isset($request->run_madre)?$request->run_madre:null;\n if ($run_madre) {\n $formularios = FormDeis::where('run_madre', 'ilike', $run_madre.'%')->get();\n #$formularios = FormDeis::where('run_madre', '=', $run_madre)->get();\n return response()->json(['formularios'=>$formularios]);\n }else{\n return response()->json(['error'=>['rd' => 'El run no existe']]);\n }\n }\n }", "public static function getWaist($column){\n $units = array();\n\n\t\ttry{\n \t\n \t$units = UserWaistUnitOptions::orderBy('id')->pluck($column, 'id')->toArray();\n\n \tif(isset($units) && count($units) > 0 ){\n\t return $units;\n\t }\n }catch(\\Exception $e){\n \tLog::error($e->getMessage());\n \treturn $units = [];\n }\n\n return $units = [];\n }", "function get_by_formation($formation_id)\r\n {\r\n return $this->db->query('SELECT * FROM combatunits WHERE formation_id='.$formation_id)->result();\r\n }", "public function show(Request $request)\n {\n //dd($request->all());\n if(!$request->all()){\n return redirect('admin/purchase');\n }\n\n $purchase=$this->purchase->with('goods')->with('supplier')->findWhere($request->all());\n //dd($purchase);\n\n return view('admin/purchase/edit')->with('data',$purchase);\n\n }", "public function tambah_stock_keluar(Request $request){\n $nama_outlet = $request->outlet;\n $nama_barang = master::where('kode_outlet', $nama_outlet)\n -> select('tb_master.id_master as id_master','tb_master.kode_master as kode_master', 'tb_master.nama_barang as nama_barang')\n -> get();\n return view('pengiriman.pengiriman-tambah_stock_keluar', compact('nama_barang','nama_outlet'));\n }", "public function show($id)\n {\n //select units where course_id = this_id napeana\n //$unit = Unit::where('course_id', '=', $id);\n //return view(view, copmact(unit));\n }", "public function store(Request $request)\n{\n $this->validate(request(), [\n 'board_id' => 'required|exists:boards,id',\n 'name' => 'required'\n ]);\n\n $lane = $this->service->store($request);\n\n return new LaneResource($lane);\n}", "public function show($id)\n {\n try{ \n $unit = Unit::findOrFail($id);\n }catch(\\Exception $e) { return response()->json(['error' => 'Resource not found','error code' => '404'], 404); } \n return response()->json( $unit);\n }", "public function findPrice(Request $request){\n $p=Inventory::select('unit_price_min','stock')->where('id',$request->id)->first();\n return response()->json($p);\n }", "public function modelFetch(){\n\t\t\t$maphongban = isset($_GET[\"maphongban\"])&&is_numeric($_GET[\"maphongban\"])?$_GET[\"maphongban\"]:0;\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van, tra ket qua ve mot object\n\t\t\t$query = $conn->query(\"select * from phongban where maphongban=$maphongban\");\n\t\t\t//tra ve mot ban ghi\n\t\t\treturn $query->fetch();\n\t\t}", "public function show(Request $request){\n return $wilayah = Wilayah::orderBy('id','desc')->paginate(150);\n }", "function get_unit_user($username) {\r\n $this->load->database();\r\n $this->db->select('*');\r\n $this->db->from('unit_master_record');\r\n $this->db->where(\"app_username\", $username);\r\n $this->db->where(\"status\", \"1\");\r\n $this->db->limit(1);\r\n $query = $this->db->get();\r\n $this->db->close();\r\n if ($query->num_rows() > 0) {\r\n return $query->row();\r\n } else {\r\n return FALSE;\r\n }\r\n }", "public function index(Request $request)\n {\n $query = SubOrder::select(\n 'sub_orders.id AS suborder_id',\n 'sub_orders.unique_suborder_id',\n 'sub_orders.order_id',\n 'sub_orders.no_of_delivery_attempts',\n 'orders.unique_order_id',\n 'orders.delivery_name',\n 'orders.delivery_email',\n 'orders.delivery_msisdn',\n 'orders.delivery_alt_msisdn',\n 'orders.delivery_address1 AS delivery_address',\n 'orders.created_at',\n 'orders.merchant_order_id',\n 'hubs_d.title AS delivery_hub',\n 'stores.store_id AS store_name',\n 'merchants.name AS merchant_name',\n 'zones_d.name AS delivery_zone',\n 'cities_d.name AS delivery_city',\n 'states_d.name AS delivery_state',\n 'order_product.product_title',\n 'order_product.quantity',\n 'order_product.picking_attempts',\n 'order_product.weight',\n 'cart_product.weight AS proposed_weight',\n 'product_categories.name AS product_category',\n 'pickup_locations.title AS pickup_name',\n 'pickup_locations.email AS pickup_email',\n 'pickup_locations.msisdn AS pickup_msisdn',\n 'pickup_locations.alt_msisdn AS pickup_alt_msisdn',\n 'pickup_locations.address1 AS pickup_address',\n 'hubs_p.title AS pickup_hub',\n 'zones_p.name AS pickup_zone',\n 'cities_p.name AS pickup_city',\n 'states_p.name AS pickup_state',\n 'status.title AS sub_order_status'\n )\n ->where('sub_orders.status', '!=', 0)\n ->whereIn('sub_orders.sub_order_status', [15, 16])\n ->where('sub_orders.source_hub_id', '=', auth()->user()->reference_id)\n ->where('sub_orders.destination_hub_id', '!=', auth()->user()->reference_id)\n ->leftJoin('orders','orders.id','=','sub_orders.order_id')\n ->leftJoin('stores','stores.id','=','orders.store_id')\n ->leftJoin('merchants','merchants.id','=','stores.merchant_id')\n ->leftJoin('zones AS zones_d','zones_d.id','=','orders.delivery_zone_id')\n ->leftJoin('cities AS cities_d','cities_d.id','=','orders.delivery_city_id')\n ->leftJoin('states AS states_d','states_d.id','=','orders.delivery_state_id')\n ->leftJoin('order_product','order_product.sub_order_id','=','sub_orders.id')\n ->leftJoin('cart_product','cart_product.order_product_id','=','order_product.id')\n ->leftJoin('pickup_locations','pickup_locations.id','=','order_product.pickup_location_id')\n ->leftJoin('product_categories','product_categories.id','=','order_product.product_category_id')\n ->leftJoin('zones AS zones_p','zones_p.id','=','pickup_locations.zone_id')\n ->leftJoin('cities AS cities_p','cities_p.id','=','pickup_locations.city_id')\n ->leftJoin('states AS states_p','states_p.id','=','pickup_locations.state_id')\n ->leftJoin('status','status.code','=','sub_orders.sub_order_status')\n ->leftJoin('hubs AS hubs_p','hubs_p.id','=','sub_orders.source_hub_id')\n ->leftJoin('hubs AS hubs_d','hubs_d.id','=','sub_orders.destination_hub_id');\n\n if($request->has('order_id')){\n $query->where('orders.unique_order_id', $request->order_id);\n }\n\n if($request->has('merchant_order_id')){\n $query->where('orders.merchant_order_id', $request->merchant_order_id);\n }\n\n if($request->has('sub_order_id')){\n $query->where('sub_orders.unique_suborder_id', $request->sub_order_id);\n }\n\n if($request->has('sub_order_status')){\n $query->where('sub_orders.sub_order_status', $request->sub_order_status);\n }\n\n if($request->has('customer_mobile_no')){\n $query->where('orders.delivery_msisdn', $request->customer_mobile_no)->orWhere('orders.delivery_alt_msisdn', $request->customer_mobile_no);\n }\n\n if($request->has('store_id')){\n $query->where('orders.store_id', $request->store_id);\n }\n\n if($request->has('merchant_id')){\n $query->where('stores.merchant_id', $request->merchant_id);\n }\n\n if($request->has('pickup_zone_id')){\n $query->where('pickup_locations.zone_id', $request->pickup_zone_id);\n }\n\n if($request->has('delivery_zone_id')){\n $query->where('orders.delivery_zone_id', $request->delivery_zone_id);\n }\n\n if($request->has('start_date')){\n $start_date = $request->start_date;\n }else{\n $start_date = '2017-03-21';\n }\n\n if($request->has('end_date')){\n $end_date = $request->end_date;\n }else{\n $end_date = date('Y-m-d');\n }\n $query->WhereBetween('sub_orders.updated_at',array($start_date.' 00:00:01',$end_date.' 23:59:59'));\n\n $sub_orders = $query->orderBy('sub_orders.id', 'desc')->get();\n\n $stores = Store::whereStatus(true)->lists('store_id', 'id')->toArray();\n $merchants = Merchant::whereStatus(true)->lists('name', 'id')->toArray();\n\n $pickupman = User::\n select(DB::raw('CONCAT(users.name, \" - \",hubs.title) AS name'),'users.id')\n ->leftJoin('hubs','hubs.id','=','users.reference_id')\n ->where('reference_id', '=', auth()->user()->reference_id)\n ->where('users.status',true)->where('users.user_type_id', '=', '8')->lists('name','users.id')->toArray();\n\n $zones = Zone::\n select(DB::raw('CONCAT(zones.name, \" - \",cities.name) AS name'),'zones.id')\n ->leftJoin('cities','cities.id','=','zones.city_id')->\n where('zones.status',true)->lists('name','zones.id')->toArray();\n\n $trips = Trip::whereStatus(true)->where('source_hub_id', '=', auth()->user()->reference_id)->where('trip_status', '=', '1')->lists('unique_trip_id', 'id')->toArray();\n\n return view('queued-shipping.index', compact('sub_orders', 'stores', 'merchants', 'pickupman', 'zones'));\n }", "public function bySubcategoria($id){\n return Material::where('idsubcategoria','=',$id)->get();\n //Este de aqui nos dara una coleccion una respuesta, para probar ello se creara un ruta\n }", "public function show($id)\n {\n $owner = Auth::user()->id_no; \n $data = Room::where('owner_id', '=', $owner)->where('room_no', '=', $id)->get();\n\n $room_data = Room::select('*')->where('owner_id', '=', $owner)->where('room_no', '=', $id)->get();\n $rent_cost = Room::where('owner_id', '=', $owner)->where('room_no', '=', $id)->value('rent_month');\n $elect_cost = Room::where('owner_id', '=', $owner)->where('room_no', '=', $id)->value('elect_cost');\n $water_cost = Room::where('owner_id', '=', $owner)->where('room_no', '=', $id)->value('water_cost');\n $others_cost = Room::where('owner_id', '=', $owner)->where('room_no', '=', $id)->value('others');\n $total_cost = $rent_cost + $elect_cost + $water_cost + $others_cost;\n\n return view('user.bill', compact('total_cost','room_data'));\n }", "function getByStatus($status){\n // Please make this clear, where can in find this status, status darimana? status dari peminjaman atau status dari pengembalian atau status dari inventori?\n $this->db->where('status_barang',$status);\n $query = $this->db->get('pengembalian'); // Please make this clear where to find or how to find which table contains status.\n return array();\n}", "public function get_ambil_wilayah($where){\n\t\t$this->db->select('id_wilayah');\n\t\t$this->db->where('kecamatan', $where);\n\t\t$query = $this->db->get('wilayah')->result_array();\n\t\treturn $query;\n\t}" ]
[ "0.7526955", "0.6582504", "0.656654", "0.6142973", "0.6084316", "0.5976508", "0.59277046", "0.5918753", "0.590472", "0.5898758", "0.58864146", "0.5863031", "0.5861257", "0.57908094", "0.5748295", "0.572759", "0.57007957", "0.5700467", "0.5698168", "0.56587255", "0.56404203", "0.5626536", "0.56196356", "0.56014484", "0.55940753", "0.5585028", "0.5572233", "0.5555368", "0.55541444", "0.55340534", "0.54964715", "0.5495939", "0.547703", "0.5455932", "0.54505116", "0.5441597", "0.54379135", "0.54274845", "0.5409526", "0.53939825", "0.53930265", "0.5380764", "0.53473353", "0.53358245", "0.5334232", "0.53305876", "0.5321327", "0.53103745", "0.5300605", "0.52972883", "0.5296706", "0.52928305", "0.5292017", "0.5289851", "0.5285321", "0.5283105", "0.5247592", "0.52460015", "0.5229422", "0.52291596", "0.52257437", "0.5225653", "0.52134824", "0.52054447", "0.5194392", "0.518831", "0.5185572", "0.5183136", "0.5182267", "0.5181924", "0.51769423", "0.51751345", "0.5169858", "0.51673716", "0.5166654", "0.51570225", "0.5156322", "0.5154488", "0.515203", "0.51507133", "0.5138874", "0.5136492", "0.5129547", "0.5122436", "0.51213056", "0.5116773", "0.51134956", "0.510755", "0.51073384", "0.51005995", "0.50994295", "0.50927085", "0.50906503", "0.50867546", "0.5086214", "0.5084666", "0.5083152", "0.5081741", "0.50813085", "0.508115", "0.5078769" ]
0.0
-1
Create a new User
public function create($request) { try { // Begin database transaction DB::beginTransaction(); // Create User $scholarship_collection = ScholarshipCollection::create([ 'name' => $request->name, 'description' => $request->description, 'image_url' => $request->image_url, 'repeats' => $request->repeats, 'pub_id' => $request->pub_id, ]); if (!$scholarship_collection) { // If User isn't created, rollback database to initial state DB::rollback(); return $scholarship_collection = "Oops! Sorry there was an error. Please try again"; }else { // If User is created, commit transaction to the database DB::commit(); return $scholarship_collection; } } catch (\Exception $e) { return "Oops! Sorry there was an error. Please try again"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "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 createUser()\n {\n }", "public function create()\n {\n $this->validate($this->request, User::createRules());\n\n $user = new User;\n $user->name = $this->request->name;\n $user->phone = $this->request->phone;\n $user->dob = $this->request->dob;\n $user->image = $this->request->image_path;\n $plainPassword = $this->request->password;\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return $this->response(201,\"User\", $user);\n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "public function create(User $user)\n {\n\n }", "public function create(User $user)\n {\n }", "public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function create(User $user)\n {\n //\n }", "public function createUser()\n {\n\n $userCurrent = $this->userValidator->validate();\n $userCurrent['password'] = Hash::make($userCurrent['password']);\n $userCurrent = $this->user::create($userCurrent);\n $userCurrent->roles()->attach(Role::where('name', 'user')->first());\n return $this->successResponse('user', $userCurrent, 201);\n }", "public function create(UserCreateRequest $request): User\n {\n // TODO: Implement create() method.\n }", "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 createUser()\n {\n return User::factory()->create();\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser () {\n syslog( LOG_INFO, 'Create a Lineberty User \\n' );\n\n $url = '/users';\n\n return $this->runRequest($url, 'POST', null);\n }", "public function create()\n\t{\n\t\t$user = new User;\n\n\t\t$user->username \t\t= Input::get('username');\n\t\t$user->password \t\t= Hash::make(Input::get('password'));\n\t\t$user->email \t\t \t= Input::get('email');\n\n\t\t$user->save();\n\n\t\treturn Redirect::to('user/add')->with('sukses', 'Data User Sudah Tersimpan');\n\t}", "public function create() {\n /*$id = json_decode($_POST['id']);\n $name = json_decode($_POST['name']);\n $usr = User();\n $usr->id = $id;\n $usr->name = $name;\n $usr->save();*/\n }", "public function create()\n {\n return $this->userService->create();\n }", "public function creating(User $user)\n {\n\n }", "protected function create()\n {\n// dd(request());\n // create new user in database\n $newUser = User::create([\n 'name' => \\request('name'),\n 'email' => \\request('email'),\n 'student_id' => \\request('student_id'),\n 'phone' => \\request('phone'),\n 'password' => bcrypt(\\request('password')),\n 'remember_token' => \\request('_token'),\n ]);\n\n\n //login the new user\n\n auth()->login($newUser);\n\n }", "public function store(UserCreateRequest $request)\n {\n\t\t\t$user = User::create([\n\t\t\t\t'name' \t\t\t\t=> $request->input('name'),\n\t\t\t\t'lastname' \t\t=> $request->input('lastname'),\n\t\t\t\t'idNumber'\t\t=> $request->input('idNumber'),\n\t\t\t\t'email' \t\t\t=> $request->input('email'),\n\t\t\t\t'phone' \t\t\t=> $request->input('phone'),\n\t\t\t\t'address' \t\t=> $request->input('address'),\n\t\t\t\t'birthdate' \t=> $request->input('birthdate'),\n\t\t\t\t'category_id' => $request->input('category_id'),\n\t\t\t\t'password'\t\t=> 'password', // I NEED TO ADD LOGIN FUNCTIONALITY\n\t\t\t\t'is_admin'\t\t=> 0,\n\t\t\t\t'status' \t\t\t=> 'non live' // As default in the db?\n\t\t\t]);\n\n\t\t\treturn redirect('/users')->with('success', 'User Registered');\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "public\n function create(User $user)\n {\n //\n }", "public function create ( Request $request )\n {\n\n\n if( $request->isMethod( 'post' ) )\n {\n\n try\n {\n\n $user = new User();\n $user->name = $request->input( 'name' );\n $user->email = $request->input( 'email' );\n $user->password = bcrypt( $request->input( 'password' ) );\n $user->save();\n\n }\n catch( Exception $ex ) \n {\n\n return(\n back()\n ->with(\n [\n 'flash_error' => 'Failed to create new user.',\n 'flash_exception' => $ex->getMessage()\n ]\n )\n );\n\n }\n\n return(\n back()\n ->with( [ 'flash_success' => 'New Users Added' ] )\n );\n\n }\n else\n {\n return(\n view('users.create')\n );\n }\n\n }", "public function actionCreateUser()\n {\n $model = new User();\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\n $model->setPassword($model->password);\n $model->generateAuthKey();\n $model->generateEmailConfirmToken();\n if ($model->save()) {\n // нужно добавить следующие три строки:\n // $auth = Yii::$app->authManager;\n // $authorRole = $auth->getRole('superadmin');\n // $auth->assign($authorRole, $user->getId());\n return $this->redirect(['view-user', 'id' => $model->id]);\n }else{\n print_arr($model->errors);\n die('A');\n }\n } else {\n return $this->render('user/create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}", "protected function createUser()\n {\n $this->question('Enter your details for the admin user.');\n\n $user = \\App\\User::create([\n 'name' => $this->ask('Name', 'Admin'),\n 'email' => $this->ask('Email address', 'noreply@'.str_replace(['http://', 'https://'], '', config('app.url'))),\n 'password' => Hash::make($this->ask('Password')),\n ]);\n \n $this->info(\"Admin user created successfully. You can log in with username {$user->email}\");\n }", "public function creat_new_user()\n {\n \n factory(User::class)->create();\n $respone=$this->post('/admin/category/create',[\n 'name' => 'Tuan',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'active'=>1,\n 'password' => '2', // password\n 'remember_token' => Str::random(10),\n ]);\n // $this->assertCount(8,User::all());\n }", "public function test_it_creates_a_new_user()\n {\n $user = ['email' => '[email protected]', 'given_name' => 'Andrew', 'family_name' => 'Hook'];\n\n $this->json('POST', '/users', $user)\n ->seeJson($user);\n }", "public function creating(User $user): void\n {\n \n }", "public function store(CreateUserRequest $request)\n {\n $data = $request->only('name', 'email', 'password');\n $data['password'] = Hash::make($data['password']);\n $data['user_type'] = $request->get('is_admin') ? User::$ADMIN : User::$DATAENTRANT;\n User::create($data);\n return redirect()->to('users')->withSuccess('User Account Created');\n }", "public function create(){\n \n $data = array();\n $data['login'] = $_POST['login'];\n $data['password'] = Hash::create('sha256', $_POST['password'], HASH_KEY);\n $data['role'] = $_POST['role'];\n \n //Do the Error checking\n \n $this->model->RunCreate($data);\n /*\n * After we Post the user info to create, the header is refereshed so that the data appears dynamically \n * below in the users list\n */\n header('location: ' . URL . 'users');\n }", "public function 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 $user = User::create($this->_cleaned);\n return $this->respond($user);\n }", "function createUser(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\t\t\t\n\t\t\t//Check if username meets minimum requirements\n\t\t\tif($this->username == \"\" || $this->username == null || strlen($this->username) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Username\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t//Check if username already exists\n\t\t\t\tif($db->query('SELECT * FROM user WHERE Username = \"'.$this->username.'\"')->rowCount() > 0){\n\t\t\t\t\t$json->exists(\"Username\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if password meets minimum requirements\n\t\t\tif($this->password == \"\" || $this->password == null || strlen($this->password) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Password\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$passHash = generatePassword($this->password);\n\t\t\t\t$this->password = $passHash;\n\t\t\t\t$apiHash = generateApiKey($this->username.\"\".date('Y-m-d'));\n\t\t\t}\n\t\t\t\n\t\t\t//Check if admin is empty or invalid, if so make user non-admin\n\t\t\tif($this->admin == \"\" || $this->admin == null || $this->admin < 0)\n\t\t\t\t$this->admin = 0;\n\t\t\t\n\t\t\tif($this->subject == \"\" || $this->subject == null || $this->subject < 0)\n\t\t\t\t$this->subject = 0;\n\t\t\t\t\n\t\t\t$insert = $db->prepare('INSERT INTO user VALUES (DEFAULT, :username, :password, :subject, :admin, :api)');\n\t\t\t$insert->bindParam(':username', $this->username);\n\t\t\t$insert->bindParam(':password', $this->password);\n\t\t\t$insert->bindParam(':subject', $this->subject);\n\t\t\t$insert->bindParam(':admin', $this->admin);\n\t\t\t$insert->bindParam(':api', $apiHash);\n\t\t\t\n\t\t\tif($insert->execute()){\n\t\t\t\t$json->created(\"User\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$json->server();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "protected function createUser()\n {\n $errors = $this->validate(['username','password','email','group_id']);\n\n if(count($errors) > 0)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => $errors\n ]);\n }\n\n $arrUserData = [\n 'username' => $this->request->variable('username',''),\n 'user_password' => $this->request->variable('password',''), // already hashed by contao\n 'user_email' => $this->request->variable('email',''),\n 'group_id' => $this->request->variable('group_id',''),\n 'user_type' => USER_NORMAL\n ];\n\n // Create the user and get an ID\n $userID = user_add($arrUserData);\n\n // If user wasn't created, send failed response\n if(!$userID)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'phpbb Could not create user',\n 'error' => ['Could not create phpBB user']\n ]);\n }\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user created',\n 'data' => [\n 'user_id' => $userID\n ]\n ]);\n }", "public function create() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"INSERT INTO users (id, mail, name, password, role, state) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t$stmt->execute(array($this->id, $this->mail, $this->name, $this->password, $this->role, $this->state));\n\t}", "public function createUser(Request $request)\r\n\t{\r\n\t\t$username = '';\r\n\t\tif (!empty($request->username))\r\n\t\t{\r\n\t\t\t$username = $request->username;\r\n\t\t}\r\n\r\n\t\tif (!empty($request->password))\r\n\t\t{\r\n\t\t\t$passwordPlain = $request->password;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$passwordPlain = $this->generator->getPassword();\r\n\t\t}\r\n\r\n\t\t$passwordHash = $this->hashPassword($username, $passwordPlain);\r\n\r\n\t\treturn new User($username, $passwordHash, $passwordPlain);\r\n\t}", "public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }" ]
[ "0.8761194", "0.8761194", "0.8761194", "0.8761194", "0.8228945", "0.8179029", "0.8041811", "0.80126196", "0.7991509", "0.7981603", "0.7965506", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7956583", "0.7923669", "0.79054904", "0.78892726", "0.7885804", "0.7880057", "0.7880057", "0.78694093", "0.77978146", "0.77768606", "0.7775096", "0.7769875", "0.77210385", "0.7666177", "0.7657779", "0.7564918", "0.7560092", "0.75505126", "0.7531938", "0.7528833", "0.75132877", "0.75120544", "0.75022215", "0.74763095", "0.7471853", "0.7469421", "0.74568564", "0.74536705", "0.74407864", "0.74380034", "0.7431696", "0.74285924" ]
0.0
-1
Set Timerpoint for Debugoutput. Shows Memoryusage also, if available
public function tracker($event) { if ($this->mode > 0) { $time = array_sum(explode(" ", microtime())); // Prepare for Memory, just if functions avail if (function_exists('memory_get_usage')) { $mem = sprintf("MemAct: %05d KB &nbsp;&nbsp;", memory_get_usage() / 1024); } else { $mem = ""; } if (function_exists('memory_get_peak_usage')) { $memmax = sprintf("MemPeak: %05d KB &nbsp;&nbsp;", memory_get_peak_usage() / 1024); } else { $memmax = ""; } if (!$this->timer_first or !$event) { $this->timer_first = $time; } if (!$this->timer_last or !$event) { $this->timer_last = $time; } $tmp_out = sprintf( "Step: %07.1f ms &nbsp; Total: %07.1f ms &nbsp;&nbsp;".$mem.$memmax." => [%s]<br />\n", ($time - $this->timer_last) * 1000, ($time - $this->timer_first)*1000, $event ); $this->timer_out .= $tmp_out; $this->timer_all = $time - $this->timer_first; $this->timer_last = $time; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memory_trace_point($name=NULL)\n{\n\tglobal $MEMORY_POINTS;\n\tif (is_null($name)) $name='#'.integer_format(count($MEMORY_POINTS)+1);\n\t$MEMORY_POINTS[]=array(memory_get_usage(),$name);\n}", "public function iniPerformance(){\n $this->tiempo = microtime(true);\n $this->memoria = memory_get_usage();\n }", "public function start()\n {\n $this->fStarted = microtime(true);\n $this->iStartMemoryUsage = memory_get_usage();\n }", "function show_memory_points()\n{\n\t@header('Content-type: text/plain; charset='.get_charset());\n\n\t@ini_set('ocproducts.xss_detect','0');\n\n\t$GLOBALS['SCREEN_TEMPLATE_CALLED']='';\n\n\tglobal $MEMORY_POINTS;\n\t$before=mixed();\n\tforeach ($MEMORY_POINTS as $point)\n\t{\n\t\tlist($memory,$name)=$point;\n\t\techo 'Memory at '.$name.' is'.\"\\t\".integer_format($memory).' (growth of '.(is_null($before)?'N/A':integer_format($memory-$before)).')'.\"\\n\";\n\t\t$before=$memory;\n\t}\n\texit();\n}", "public function setMemoryUsage(){\r\n $this->fMemoryUsage = memory_get_usage(TRUE);\r\n }", "public function finPerformance(){\n $memoria = memory_get_usage() - $this->memoria;\n $tiempo = microtime(true) - $this->tiempo;\n\n echo \"<pre>\";\n print_r(array(\"memoria\" => $memoria.\" bytes \", \"tiempo\" => $tiempo.\" segundos\" ));\n die;\n }", "function ajan_core_print_generation_time() {\n?>\n\n<!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->\n\n\t<?php\n}", "function DisplayTimer( $html='' )\n {\n $format = '<p style=\"text-align:center\">Script runtime: %.5f %s</p>';\n if( !empty($html) ):\n $format = preg_replace( '/\\[dec=([0-9]+)\\]/i', '%.$1f %s', $html, 1 );\n endif;\n $time = $this->pCalcTime();\n $sec = ( ($time > 1) ? 'secs.' : 'sec.' );\n printf( $format.NL, $time, $sec );\n }", "public function gatherSpeedData()\n {\n $speedTotals = array();\n\n $speedTotals['total'] = $this->getReadableTime((microtime(true) - $this->startTime) * 1000);\n $speedTotals['allowed'] = ini_get(\"max_execution_time\");\n\n $this->output['speedTotals'] = $speedTotals;\n }", "public static function display()\n {\n $display = '';\n if (self::$_sessionBenchmarkOn) {\n $display = '<div style=\"\n color: #FFFFFF;\n background-color: #3d3d3d;\n border-color: #FFFFFF;\n border-width: 1px;\n border-style: solid;\n margin-left: auto;\n margin-right: auto;\n width: 90%;\n text-align: center;\n margin-bottom:25px;\n margin-top:25px;\n \">';\n\n $benchmarkStartTime = self::$_sessionBenchmarkStart;\n $benchmarkEndTime = self::$_sessionBenchmarkFinish;\n $total = ($benchmarkEndTime - $benchmarkStartTime) *1000;\n $formatTime = number_format($total, 5, '.', ' ');\n $memoryUsage = memory_get_usage()/1024;\n\n $display .= '\n Total application runtime: ' . $formatTime . ' ms&nbsp;&nbsp;&nbsp;&nbsp;\n Total memory usage: '. number_format($memoryUsage, 3, ',', '')\n . ' kB<br /><br />';\n\n $display .= 'Marker times:<br /><table style=\"width:100%\">'.\"\\n\";\n\n foreach (self::$_sessionBenchmarkMarkers as $marker) {\n if ($marker['marker_color']) {\n $additionalColor = 'background-color:#' . dechex($marker['marker_color']);\n } else {\n $additionalColor = '';\n }\n\n if ($marker['marker_time'] === '') {\n $time = '-';\n $percent = '-';\n $ram = '-';\n } else {\n $ram = ($marker['marker_memory'] - self::$_sessionMemoryStart) / 1024;\n $ram = number_format($ram, 3, ',', '');\n $percent = ($marker['marker_time'] / $total) *100000;\n $percent = number_format($percent, 5);\n $time = number_format(\n $marker['marker_time'] *1000,\n 5,\n '.',\n ' '\n );\n $time .= ' ms';\n $percent .= ' %';\n $ram .= ' kB';\n }\n\n $display .= '<tr style=\"' . $additionalColor . '\">\n <td style=\"width:40%;color:#fff\">' . $marker['marker_name'] . '</td>' . \"\\n\";\n $display .= '<td style=\"width:20%\">' . $time . '</td>'.\"\\n\";\n $display .= '<td style=\"width:20%\">' . $percent . '</td>'.\"\\n\";\n $display .= '<td style=\"width:20%;color:#fff\">' . $ram . '</td>\n </tr>' . \"\\n\";\n }\n $display .= '</table></div>';\n }\n return $display;\n }", "public function updateMemoryUsage(): void\n {\n $this->data['memory'] = \\memory_get_peak_usage(true);\n }", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "function e107_db_debug() {\n\t\tglobal $eTimingStart;\n\n\t\t$this->aTimeMarks[0]=array(\n\t\t'Index' => 0,\n\t\t'What' => 'Start',\n\t\t'%Time' => 0,\n\t\t'%DB Time' => 0,\n\t\t'%DB Count' => 0,\n\t\t'Time' => ($eTimingStart),\n\t\t'DB Time' => 0,\n\t\t'DB Count' => 0\n\t\t);\n\t\t\n\t\tregister_shutdown_function('e107_debug_shutdown');\n\t}", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "function init_performance_info() {\n\n global $PERF, $CFG, $USER;\n\n $PERF = new object();\n $PERF->logwrites = 0;\n if (function_exists('microtime')) {\n $PERF->starttime = microtime();\n }\n if (function_exists('memory_get_usage')) {\n $PERF->startmemory = memory_get_usage();\n }\n if (function_exists('posix_times')) {\n $PERF->startposixtimes = posix_times();\n }\n if (function_exists('apd_set_pprof_trace')) {\n // APD profiling\n if ($USER->id > 0 && $CFG->perfdebug >= 15) {\n $tempdir = $CFG->dataroot . '/temp/profile/' . $USER->id;\n mkdir($tempdir);\n apd_set_pprof_trace($tempdir);\n $PERF->profiling = true;\n }\n }\n}", "protected function printResourceUsage()\n {\n if (class_exists('PHP_Timer', true) === true) {\n echo str_repeat('-', $this->width) . PHP_EOL;\n echo PHP_Timer::resourceUsage() . PHP_EOL;\n }\n }", "static function ms(){\r\n $dm = memory_get_usage() - self::$startmem;\r\n return self::memformat($dm);\r\n }", "function setProfiling(){\r\n\t\t$this->query(\"SET profiling=1\");\r\n\t}", "function enableProfiler(){\t\t\n\t\t$CI = &get_instance();\n\t\t$CI->output->enable_profiler( config_item('enable_profiling') );\t\t\n\t}", "public function gatherMemoryData()\n {\n $memoryTotals = array();\n\n $memoryTotals['used'] = $this->getReadableFileSize(memory_get_peak_usage());\n\n $memoryTotals['total'] = ini_get(\"memory_limit\");\n\n $this->output['memoryTotals'] = $memoryTotals;\n }", "public function __destruct()\n {\n if ($this->args->has('profile'))\n {\n $td = microtime(true) - $this->time_start;\n $td = $td < 1 ? round($td * 1000, 2) . \"ms\" : round($td, 2) . \"s\";\n $mem = round(memory_get_peak_usage(false) / 1048576, 2) . \" MB\";\n printf(\"\\nRuntime: %s - mem: %s\", $td, $mem);\n }\n }", "private function startTimer()\n\t{\n\t\t// Keep statistics\n\t\tself::$totalCallCount++;\n\n\t\t// Rough execution time\n\t\t$this->startMicroStamp = microtime(true);\n\t}", "public function profilerStop()\n {\n if (extension_loaded('xhprof')) {\n $xhprofData = xhprof_disable();\n $xhprofRuns = new XHProfRuns_Default();\n $runId = $xhprofRuns->save_run($xhprofData, $this->xhprofNamespace);\n $profilerUrl = sprintf($this->xhprofHtmlPath . 'index.php?run=%s&source=%s', $runId, $this->xhprofNamespace);\n $styles = ' style=\"display: block; position: absolute; left: 5px; bottom: 5px; background: red; padding: 8px; z-index: 10000; color: #fff;\"';\n echo '<a href=\"' . $profilerUrl . '\" target=\"_blank\" ' . $styles . '>Profiler output</a>';\n }\n }", "function printResults () {\n\n if (! $this->isActive()) { return; }\n\n $unstoppedTasks = array_keys($this->startTime);\n if (count($unstoppedTasks)) {\n Tht::error('Unstopped Perf task: `' . $unstoppedTasks[0] . '`');\n }\n\n $results = $this->results();\n\n // Have to do this outside of results() or the audit calls will show up in the perf tasks.\n // $results['imageAudit'] = Tht::module('Image')->auditImages(Tht::path('public'));\n\n $thtDocLink = Tht::getThtSiteUrl('/reference/perf-panel');\n $compileMessage = Compiler::getDidCompile() ? '<div class=\"bench-compiled\">Files were updated. Refresh to see compiled results.</div>' : '';\n\n $table = OTypeString::getUntyped(\n Tht::module('Web')->u_table(OList::create($results['single']),\n OList::create([ 'task', 'durationMs', 'memoryMb', 'value' ]),\n OList::create([ 'Task', 'Duration (ms)', 'Peak Memory (MB)', 'Detail' ]),\n OMap::create(['class' => 'bench-result'])\n ), 'html');\n\n $tableGroup = OTypeString::getUntyped(\n Tht::module('Web')->u_table(OList::create($results['group']),\n OList::create([ 'task', 'durationMs', 'memoryMb', 'numCalls' ]),\n OList::create([ 'Task', 'Duration (ms)', 'Memory (MB)', 'Calls' ]),\n OMap::create(['class' => 'bench-result'])\n ), 'html');\n\n\n $opCache = '';\n if (Tht::isOpcodeCacheEnabled()) {\n $opCache = '<span style=\"color: #393\">ON</span>';\n }\n else {\n $opCache = '<span style=\"color: #c33\">OFF</span>';\n }\n\n $appCache = Tht::module('Cache')->u_get_driver();\n if ($appCache == 'file') {\n $appCache = '<span style=\"color: #c33\">' . $appCache . '</span>';\n }\n else {\n $appCache = '<span style=\"color: #393\">' . $appCache . '</span>';\n }\n\n\n\n $phpVersion = phpVersion();\n\n\n echo $this->perfPanelCss();\n echo $this->perfPanelJs($results['scriptTime']);\n\n ?>\n <div id=\"perf-score-container\">\n\n <div class=\"perfSection\">\n <div class='perfHeader'>Perf Score: <span id='perfScoreTotalLabel'></span><span id='perfScoreTotal'></span></div>\n\n <div class=\"perfHelp\"><a href=\"<?= $thtDocLink ?>\" style=\"font-weight:bold\">About This Score</a></div>\n </div>\n\n <?= $compileMessage ?>\n\n <div class=\"perfSection\">\n <div class=\"perfTotals\">\n <div>Server - Page Execution: <span id=\"perfScoreServer\"><?= $results['scriptTime'] ?> ms</span></div>\n <div>Network - Transfer: <span id='perfScoreNetwork'></span></div>\n <div>Browser - window.onload: <span id='perfScoreClient'></span></div>\n </div>\n </div>\n\n <div class=\"perfSection\">\n <div class=\"perfTotals\">\n <div>Server - Peak Memory: <span><?= $results['peakMemory'] ?> MB</span></div>\n </div>\n </div>\n\n <div class=\"perfSection tasksGrouped\">\n <div class=\"perfSubHeader\">Top Tasks (Grouped)</div>\n <?= $tableGroup ?>\n </div>\n\n <div class=\"perfSection\">\n <div class=\"perfSubHeader\">Top Tasks (Individual)</div>\n <?= $table ?>\n <div style='text-align:center; margin-top:48px;'>\n <p style=\"font-size: 80%\"> Sub-task time is not included in parent tasks.</p>\n </div>\n </div>\n\n\n\n <div class=\"perfSection\">\n <div class=\"perfHeader\">PHP Info</div>\n\n <div style=\"text-align: left; width: 300px; display: inline-block; margin-top: 32px\">\n <li>PHP Version: <b><?= $phpVersion ?></b></li>\n <li>Opcode Cache: <b><?= $opCache ?></b></li>\n <li>App Cache Driver: <b><?= $appCache ?></b></li>\n </div>\n </div>\n\n <div class=\"perfSection\">\n Perf Panel only visible to localhost or <code>devIp</code> in <code>config/app.jcon</code>\n </div>\n\n </div>\n <?php\n\n }", "static function measure($name='std'){\n\t\t$next = count(self::$measures[$name]);\n\t\tself::$measures[$name][$next]['time'] = microtime(true);\n\t\tself::$measures[$name][$next]['mem'] = memory_get_usage();\n\t\tself::$measures[$name][$next]['peakMem'] = memory_get_peak_usage();\n\t}", "public function profilerStart()\n {\n if (extension_loaded('xhprof')) {\n include_once($this->xhprofLibPath . 'utils/xhprof_lib.php');\n include_once($this->xhprofLibPath . 'utils/xhprof_runs.php');\n xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);\n }\n }", "public static function profile()\n\t{\n\t\t// Return the view\n\t\treturn View::factory('benchmark/profile')\n\t\t\t->set('memory', (memory_get_usage() - START_MEMORY) / 1024)\n\t\t\t->set('time', round(microtime(TRUE) - START_TIME, 5))\n\t\t\t->set('memory_limit', 131072) // 128M\n\t\t\t->set('time_limit', 30)\n\t\t\t->render();\n\t}", "public function tick()\n {\n $backtrace = debug_backtrace();\n if (isset($backtrace[1])) {\n $what = $backtrace[1]['function'];\n if (isset($backtrace[1]['class'])) {\n $what = $backtrace[1]['class'] . ' ' . $backtrace[1]['function'];\n }\n $message = $what .' ' . $this->memoryUsage();\n $this->log($message);\n }\n\n return;\n }", "function trace($msg)\n{\n $file = CIMAGE_DEBUG_FILE;\n if (!is_writable($file)) {\n return;\n }\n\n $timer = number_format((microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"]), 6);\n $details = \"{$timer}ms\";\n $details .= \":\" . round(memory_get_peak_usage()/1024/1024, 3) . \"MB\";\n $details .= \":\" . count(get_included_files());\n file_put_contents($file, \"$details:$msg\\n\", FILE_APPEND);\n}", "public static function display($output) {\n\t\tself::displayCssJavascript();\n\n\t\t$overlay_image = base64_encode(file_get_contents(dirname(__FILE__) . '/resources/images/overlay.gif'));\n\t\t$side_image = base64_encode(file_get_contents(dirname(__FILE__) . '/resources/images/side.png'));\n\n\t\t$side_bg_style = 'padding: 10px 0 5px 0; background: url(data:image/png;base64,' . $side_image . ') repeat-y right; ';\n\n\t\t$logCount = count($output['logs']['console']['messages']);\n\t\t$fileCount = count($output['files']);\n\t\t$memoryUsed = $output['memoryTotals']['used'];\n\t\t$queryCount = $output['queryTotals']['all'];\n\t\t$speedTotal = $output['speedTotals']['total'];\n\n\t\techo '<div id=\"profiler-container\" class=\"profiler hideDetails\" style=\"display: none;\">';\n\t\techo '<div id=\"profiler\" class=\"console\">';\n\t\techo '<table id=\"profiler-metrics\" cellspacing=\"0\">';\n\t\techo '<tr>';\n\t\techo '<td id=\"console\" class=\"tab\" style=\"color: #588E13;\">';\n\t\techo '<var>' . $logCount . '</var>';\n\t\techo '<h4>Console</h4>';\n\t\techo '</td>';\n\t\techo '<td id=\"speed\" class=\"tab\" style=\"color: #3769A0;\">';\n\t\techo '<var>' . $speedTotal . '</var>';\n\t\techo '<h4>Load Time</h4>';\n\t\techo '</td>';\n\t\techo '<td id=\"queries\" class=\"tab\" style=\"color: #953FA1;\">';\n\t\techo '<var>' . $queryCount . ' Queries</var>';\n\t\techo '<h4>Database</h4>';\n\t\techo '</td>';\n\t\techo '<td id=\"memory\" class=\"tab\" style=\"color: #D28C00;\">';\n\t\techo '<var>' . $memoryUsed . '</var>';\n\t\techo '<h4>Memory Used</h4>';\n\t\techo '</td>';\n\t\techo '<td id=\"files\" class=\"tab\" style=\"color: #B72F09;\">';\n\t\techo '<var>' . $fileCount . ' Files</var>';\n\t\techo '<h4>Included</h4>';\n\t\techo '</td>';\n\t\techo '</tr>';\n\t\techo '</table>';\n\n\t\t// Start Console tab\n\t\techo '<div id=\"profiler-console\" class=\"profiler-box\" style=\"background: url(data:image/gif;base64,' . $overlay_image . '); border-top: 1px solid #ccc; height: 200px; overflow: auto;\">';\n\n\t\tif ($logCount == 0) {\n\t\t\techo '<h3>This panel has no log items.</h3>';\n\t\t} else {\n\t\t\techo '<table class=\"side\" cellspacing=\"0\">';\n\t\t\techo '<tr>';\n\t\t\techo '<td class=\"console-log\" id=\"console-log\"><var>' . $output['logs']['console']['count'] . '</var><h4>Logs</h4></td>';\n\t\t\techo '<td class=\"console-errors\" id=\"console-error\"><var>' . $output['logs']['errors']['count'] . '</var> <h4>Errors</h4></td>';\n\t\t\techo '</tr>';\n\t\t\techo '<tr>';\n\t\t\techo '<td class=\"console-memory\" id=\"console-memory\"><var>' . $output['logs']['memory']['count'] . '</var> <h4>Memory</h4></td>';\n\t\t\techo '<td class=\"console-speed\" id=\"console-speed\"><var>' . $output['logs']['speed']['count'] . '</var> <h4>Speed</h4></td>';\n\t\t\techo '</tr>';\n\t\t\techo '<tr>';\n\t\t\techo '<td class=\"console-benchmarks\" id=\"console-benchmark\"><var>' . $output['logs']['benchmarks']['count'] . '</var><h4>Benchmarks</h4></td>';\n\t\t\techo '</tr>';\n\t\t\techo '</table>';\n\t\t\techo '<table class=\"main\" cellspacing=\"0\">';\n\n\t\t\t$class = '';\n\t\t\tforeach ($output['logs']['console']['messages'] as $log) {\n\t\t\t\techo '<tr class=\"log-' . $log['type'] . '\"><td class=\"type\">' . $log['type'] . '</td><td class=\"' . $class . '\">';\n\n\t\t\t\tif ($log['type'] == 'log') {\n\t\t\t\t\techo '<div><pre>' . $log['data'] . '</pre></div>';\n\t\t\t\t} else if ($log['type'] == 'memory') {\n\t\t\t\t\techo '<div><pre>' . $log['data'] . '</pre> <em>' . $log['dataType'].'</em>: ' . $log['name'] . ' </div>';\n\t\t\t\t} else if ($log['type'] == 'speed') {\n\t\t\t\t\techo '<div><pre>' . $log['data'] . '</pre> <em>' . $log['name'] . '</em></div>';\n\t\t\t\t} else if ($log['type'] == 'error') {\n\t\t\t\t\techo '<div><em>Line ' . $log['line'].'</em> : ' . $log['data'] . ' <pre>' . $log['file'] . '</pre></div>';\n\t\t\t\t} else if ($log['type'] == 'benchmark') {\n\t\t\t\t\techo '<div><pre>' . $log['data'] . '</pre> <em>' . $log['name'] . '</em></div>';\n\t\t\t\t}\n\n\t\t\t\techo '</td></tr>';\n\t\t\t\t$class = ($class == '') ? 'alt' : '';\n\t\t\t}\n\n\t\t\techo '</table>';\n\t\t}\n\t\techo '</div>';\n\n\t\t// Start Load Time tab\n\t\techo '<div id=\"profiler-speed\" class=\"profiler-box\" style=\"background: url(data:image/gif;base64,' . $overlay_image . '); border-top: 1px solid #ccc; height: 200px; overflow: auto;\">';\n\t\tif ($output['logs']['speed']['count'] == 0) {\n\t\t\techo '<h3>This panel has no log items.</h3>';\n\t\t} else {\n\t\t\techo '<table class=\"side\" cellspacing=\"0\">';\n\t\t\techo '<tr><td style=\"' . $side_bg_style . '\"><var>' . $output['speedTotals']['total'] . '</var><h4>Load Time</h4></td></tr>';\n\t\t\techo '<tr><td class=\"alt\" style=\"' . $side_bg_style . '\"><var>' . $output['speedTotals']['allowed'] . '</var> <h4>Max Execution Time</h4></td></tr>';\n\t\t\techo '</table>';\n\t\t\techo '<table class=\"main\" cellspacing=\"0\">';\n\n\t\t\t$class = '';\n\t\t\tforeach ($output['logs']['console']['messages'] as $log) {\n\t\t\t\tif (isset($log['type']) && $log['type'] == 'speed') {\n\t\t\t\t\techo '<tr class=\"log-speed\"><td class=\"' . $class . '\">';\n\t\t\t\t\techo '<div><pre>' . $log['data'] . '</pre> <em>' . $log['name'] . '</em></div>';\n\t\t\t\t\techo '</td></tr>';\n\t\t\t\t\t$class = ($class == '') ? 'alt' : '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo '</table>';\n\t\t}\n\t\techo '</div>';\n\n\t\t// Start Database tab\n\t\techo '<div id=\"profiler-queries\" class=\"profiler-box\" style=\"background: url(data:image/gif;base64,' . $overlay_image . '); border-top: 1px solid #ccc; height: 200px; overflow: auto;\">';\n\t\tif ($output['queryTotals']['count'] == 0) {\n\t\t\techo '<h3>This panel has no log items.</h3>';\n\t\t} else {\n\t\t\techo '<table class=\"side\" cellspacing=\"0\">';\n\t\t\techo '<tr><td><var>' . $output['queryTotals']['count'] . '</var><h4>Total Queries</h4></td></tr>';\n\t\t\techo '<tr><td class=\"alt\"><var>' . $output['queryTotals']['time'] . '</var> <h4>Total Time</h4></td></tr>';\n\t\t\techo '<tr><td><var>' . $output['queryTotals']['duplicates'] . '</var> <h4>Duplicates</h4></td></tr>';\n\t\t\techo '<tr><td class=\"alt\">';\n\t\t\techo '<var>' . $output['queryTotals']['types']['select']['total'] . ' (' . $output['queryTotals']['types']['select']['percentage'] . '%)</var>';\n\t\t\techo '<var>' . $output['queryTotals']['types']['select']['time'] . ' (' . $output['queryTotals']['types']['select']['time_percentage'] . '%)</var>';\n\t\t\techo '<h4>Selects</h4>';\n\t\t\techo '</td></tr>';\n\t\t\techo '<tr><td>';\n\t\t\techo '<var>' . $output['queryTotals']['types']['update']['total'] . ' (' . $output['queryTotals']['types']['update']['percentage'] . '%)</var>';\n\t\t\techo '<var>' . $output['queryTotals']['types']['update']['time'] . ' (' . $output['queryTotals']['types']['update']['time_percentage'] . '%)</var>';\n\t\t\techo '<h4>Updates</h4>';\n\t\t\techo '</td></tr>';\n\t\t\techo '<tr><td class=\"alt\">';\n\t\t\techo '<var>' . $output['queryTotals']['types']['insert']['total'] . ' (' . $output['queryTotals']['types']['insert']['percentage'] . '%)</var>';\n\t\t\techo '<var>' . $output['queryTotals']['types']['insert']['time'] . ' (' . $output['queryTotals']['types']['insert']['time_percentage'] . '%)</var>';\n\t\t\techo '<h4>Inserts</h4>';\n\t\t\techo '</td></tr>';\n\t\t\techo '<tr><td>';\n\t\t\techo '<var>' . $output['queryTotals']['types']['delete']['total'] . ' (' . $output['queryTotals']['types']['delete']['percentage'] . '%)</var>';\n\t\t\techo '<var>' . $output['queryTotals']['types']['delete']['time'] . ' (' . $output['queryTotals']['types']['delete']['time_percentage'] . '%)</var>';\n\t\t\techo '<h4>Deletes</h4>';\n\t\t\techo '</td></tr>';\n\t\t\techo '</table>';\n\t\t\techo '<table class=\"main\" cellspacing=\"0\">';\n\n\t\t\t$class = '';\n\t\t\tforeach ($output['queries'] as $query) {\n\t\t\t\techo '<tr><td class=\"' . $class . '\">' . $query['sql'];\n\t\t\t\tif ($query['duplicate']) {\n\t\t\t\t\techo '<strong style=\"display: block; color: #B72F09;\">** Duplicate **</strong>';\n\t\t\t\t}\n\n\t\t\t\tif (isset($query['explain']) && $query['explain']) {\n\t\t\t\t\t$explain = $query['explain'];\n\t\t\t\t\techo '<em>';\n\t\t\t\t\t\n\t\t\t\t\tif (isset($explain['possible_keys'])) {\n\t\t\t\t\t\techo 'Possible keys: <b>' . $explain['possible_keys'] . '</b> &middot;';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($explain['key'])) {\n\t\t\t\t\t\techo 'Key Used: <b>' . $explain['key'] . '</b> &middot;';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($explain['type'])) {\n\t\t\t\t\t\techo 'Type: <b>' . $explain['type'] . '</b> &middot;';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($explain['rows'])) {\n\t\t\t\t\t\techo 'Rows: <b>' . $explain['rows'] . '</b> &middot;';\n\t\t\t\t\t}\n\n\t\t\t\t\techo 'Speed: <b>' . $query['time'] . '</b>';\n\t\t\t\t\techo '</em>';\n\t\t\t\t} else if (isset($query['time'])) {\n\t\t\t\t\techo '<em>Speed: <b>' . $query['time'] . '</b></em>';\n\t\t\t\t}\n\n\t\t\t\tif (isset($query['profile']) && is_array($query['profile'])) {\n\t\t\t\t\techo '<div class=\"query-profile\"><h4>&#187; Show Query Profile</h4>';\n\t\t\t\t\techo '<table style=\"display: none\">';\n\n\t\t\t\t\tforeach ($query['profile'] as $line) {\n\t\t\t\t\t\techo '<tr><td><em>' . $line['Status'] . '</em></td><td>' . $line['Duration'] . '</td></tr>';\n\t\t\t\t\t}\n\n\t\t\t\t\techo '</table>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\n\t\t\t\techo '</td></tr>';\n\t\t\t\t$class = ($class == '') ? 'alt' : '';\n\t\t\t}\n\n\t\t\techo '</table>';\n\t\t}\n\t\techo '</div>';\n\n\t\t// Start Memory tab\n\t\techo '<div id=\"profiler-memory\" class=\"profiler-box\" style=\"background: url(data:image/gif;base64,' . $overlay_image . '); border-top: 1px solid #ccc; height: 200px; overflow: auto;\">';\n\t\tif ($output['logs']['memory']['count'] == 0) {\n\t\t\techo '<h3>This panel has no log items.</h3>';\n\t\t} else {\n\t\t\techo '<table class=\"side\" cellspacing=\"0\">';\n\t\t\techo '<tr><td><var>' . $output['memoryTotals']['used'] . '</var><h4>Used Memory</h4></td></tr>';\n\t\t\techo '<tr><td class=\"alt\"><var>' . $output['memoryTotals']['total'] . '</var> <h4>Total Available</h4></td></tr>';\n\t\t\techo '</table>';\n\t\t\techo '<table class=\"main\" cellspacing=\"0\">';\n\n\t\t\t$class = '';\n\t\t\tforeach ($output['logs']['console']['messages'] as $log) {\n\t\t\t\tif (isset($log['type']) && $log['type'] == 'memory') {\n\t\t\t\t\techo '<tr class=\"log-message\">';\n\t\t\t\t\techo '<td class=\"' . $class . '\"><b>' . $log['data'] . '</b> <em>' . $log['dataType'] . '</em>: ' . $log['name'] . '</td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t\t$class = ($class == '') ? 'alt' : '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo '</table>';\n\t\t}\n\t\techo '</div>';\n\n\t\t// Start Files tab\n\t\techo '<div id=\"profiler-files\" class=\"profiler-box\" style=\"background: url(data:image/gif;base64,' . $overlay_image . '); border-top: 1px solid #ccc; height: 200px; overflow: auto;\">';\n\t\tif ($output['fileTotals']['count'] == 0) {\n\t\t\techo '<h3>This panel has no log items.</h3>';\n\t\t} else {\n\t\t\techo '<table class=\"side\" cellspacing=\"0\">';\n\t\t\techo '<tr><td style=\"' . $side_bg_style . '\"><var>' . $output['fileTotals']['count'] . '</var><h4>Total Files</h4></td></tr>';\n\t\t\techo '<tr><td class=\"alt\" style=\"' . $side_bg_style . '\"><var>' . $output['fileTotals']['size'] . '</var> <h4>Total Size</h4></td></tr>';\n\t\t\techo '<tr><td style=\"' . $side_bg_style . '\"><var>' . $output['fileTotals']['largest'] . '</var> <h4>Largest</h4></td></tr>';\n\t\t\techo '</table>';\n\t\t\techo '<table class=\"main\" cellspacing=\"0\">';\n\n\t\t\t$class ='';\n\t\t\tforeach ($output['files'] as $file) {\n\t\t\t\techo '<tr><td class=\"' . $class . '\"><b>' . $file['size'] . '</b> ' . $file['name'] . '</td></tr>';\n\t\t\t\t$class = ($class == '') ? 'alt' : '';\n\t\t\t}\n\n\t\t\techo '</table>';\n\t\t}\n\t\techo '</div>';\n\n\t\t// Start Footer\n\t\techo '<table id=\"profiler-footer\" cellspacing=\"0\">';\n\t\techo '<tr>';\n\t\techo '<td class=\"credit\"><a href=\"http://github.com/steves/PHP-Profiler\" target=\"_blank\"><strong>PHP</strong>&nbsp;Profiler</a></td>';\n\t\techo '<td class=\"actions\">';\n\t\techo '<a class=\"detailsToggle\" href=\"#\">Details</a>';\n\t\techo '<a class=\"heightToggle\" href=\"#\">Toggle Height</a>';\n\t\techo '</td>';\n\t\techo '</tr>';\n\t\techo '</table>';\n\t\techo '</div></div>';\n\t}", "public static function render($isDetailed = false)\n {\n if (!self::isEnabled()) {\n return;\n }\n\n $precision = 3;\n\n $exec_time = microtime(true) - self::$globalStartTime;\n\n echo 'Time: <b>', round($exec_time, $precision) * 1000 , '</b> ms',\n '. Memory <b>', round((memory_get_usage() - self::$globalStartMemory) / 1024 / 1024, 2), '</b> MB (<b>',\n round((memory_get_peak_usage(true) - self::$globalStartMemory) / 1024 / 1024, 2), '</b> peak).';\n\n //echo ' Files: <b>' . count(get_included_files()) . \"</b>.\\n\";\n\n if (!is_null(self::$dbLogger) and is_object(self::$dbLogger)) {\n echo ' DB: <b>'.self::$dbLogger->currentQuery.'</b>';\n\n $queries_time = 0;\n foreach (self::$dbLogger->queries as $value) {\n $queries_time += $value['executionMS'];\n }\n\n $delta = round($queries_time * 100 / $exec_time, 2);\n echo ' (<b>'.round($queries_time, $precision) * 1000 .\"</b> ms, $delta %).\".\"\\n\";\n }\n\n if (!empty(self::$p) and $isDetailed) {\n $summary_time = 0;\n $summary_memory = 0;\n $summary_db = 0;\n foreach (self::$p['all'] as $tag => $points) {\n $summary_time += (int) $points['time'];\n $summary_memory += (int) $points['memory'];\n $summary_db += (int) $points['db_query_count'];\n }\n\n echo \"<br />Checkpoints summary time: <b>$summary_time</b>, memory: <b>\"\n .round((memory_get_usage() - $summary_memory) / 1024 / 1024, 2)\n .\" MB.</b>, DB: <b>$summary_db</b>. \\n\";\n\n self::dump(self::$p);\n }\n\n if (!empty(self::$kernel)\n and self::$kernel->getContainer()->has('ladybug')\n and self::$kernel->getContainer()->get('ladybug')->getVars() !== null\n ) {\n foreach (self::$kernel->getContainer()->get('ladybug')->getVars() as $key => $value) {\n echo '<br />'.$value['file'].' : <b>'.$value['line'].'</b>'.$value['content'].\"<hr />\\n\\n\";\n }\n }\n }", "public function add_timing_meta_box( $post ) {\n\t\t\techo $this->display_timing( $post );\n\t\t}", "function pt_text_speed_render()\n\t\t{ \n\t\t\t$options = get_option( 'pt_settings' );\n\t\t\t?>\n\t\t\t<input type='text' name='pt_settings[pt_text_field_speed]' value='<?php if( @$options['pt_text_field_speed'] > 0) echo $options['pt_text_field_speed']; else echo 5000;?>'> ms\n\t\t\t<?php\n\t\t}", "function memory_debug_add( $comment, $init_usage=0 )\n\t{\n\t\tif ( IPS_MEMORY_DEBUG_MODE AND function_exists( 'memory_get_usage' ) )\n\t\t{\n\t\t\t$_END = memory_get_usage();\n\t\t\t$_USED = $_END - $init_usage;\n\t\t\t$this->_memory_debug[] = array( $comment, $_USED );\n\t\t}\n\t}", "function memory_debug_make_flag()\n\t{\n\t\tif ( IPS_MEMORY_DEBUG_MODE AND function_exists( 'memory_get_usage' ) )\n\t\t{\n\t\t\treturn memory_get_usage();\n\t\t}\n\t}", "protected function _compile_memory_usage()\n\t{\n\t\t$output = \"\\n\\n\";\n\t\t$output .= \"\\n\";\n\t\t$output .= '<h4>'.$this->CI->lang->line('profiler_memory_usage').'</h4>';\n\t\t$output .= \"\\n\";\n\n\t\tif (function_exists('memory_get_usage') && ($usage = memory_get_usage()) != '')\n\t\t{\n\t\t\t$output .= \"<div>\".number_format($usage).' bytes</div>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$output .= \"<div>\".$this->CI->lang->line('profiler_no_memory').\"</div>\";\n\t\t}\n\n\t\treturn $output;\n\t}", "function wpf_timer_stop( $id = 0, $echo = 0, $precision = 3 ) { // if called like timer_stop(1), will echo $timetotal\n\tglobal $wpf_profiler;\n\n\tif ( !isset($wpf_profiler[$id]) )\n\t\treturn false;\n\n\t$mtime = microtime();\n\t$mtime = explode( ' ', $mtime );\n\t$wpf_profiler[$id]['stop'] = $mtime[1] + $mtime[0];\n\t$total = $wpf_profiler[$id]['stop'] - $wpf_profiler[$id]['start'];\n\n\t$wpf_profiler[$id]['total'] = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $total, $precision ) : number_format( $total, $precision );\n\n\treturn ( $echo ) ? print $wpf_profiler[$id]['total'] : $wpf_profiler[$id]['total'];\n}", "public function endTimer() {\n $this->time_end = microtime(true);\n $this->time = number_format(($this->time_end - $this->time_start), 5);\n static::$total_exec += $this->time;\n }", "function start() {\n if ($this->isLogging) {\n $this->tStart = gettimeofday();\n $this->tLast = $this->tStart;\n $this->log = \"<h1>Log: \" . $this->name . \"</h1>\\n<pre>Started: \" . gmdate(\"D, d M Y H:i:s T\", $this->tStart['sec']) . \"\\n &#916; Start ; &#916; Last ;\";\n\t\t\t$this->logLine(\"Start\");\n\t\t}\n }", "public static function timer($type, $output = false) {\r\n\t\t// If output is false, it will record time\r\n\t\tif(!$output) {\r\n\t\t\tself::$timers[$type] = microtime(true);\r\n\t\t// If output is true, it will echo the time difference\r\n\t\t} else {\r\n\t\t\t$end = microtime(true);\r\n\t\t\t$diff = ($end - self::$timers[$type]);\r\n\t\t\t\r\n\t\t\techo \"Time difference: \" . $diff . \"s (\".$type.\")<br />\";\r\n\t\t\treturn $diff;\r\n\t\t}\r\n\t\t\r\n\t\treturn NULL;\r\n\t}", "function trace(){\n\t\techo($this->get_trace()/(1024*1024).\" MB\");\n\t}", "public function start()\n\t{\n\t\t$this->startTimer = microtime(TRUE);\n\t}", "private function endScript($st_Time='')\n {\n $end_time = microtime(TRUE);\n $var = memory_get_usage(true);\n\n if ($var < 1024)\n $mem = $var.\" bytes\";\n elseif ($var < 1048576)\n $mem = round($var/1024,2).\" kilobytes\";\n else\n $mem = round($var/1048576,2).\" megabytes\";\n \n if($this->m_bDebugInfo)\n {\n $this->logSection('Memory usages : ', $mem);\n $this->logSection('Time taken : ', $end_time - $st_Time);\n }\n }", "public static function div_main_debug() {\n\n\t//--\n\tif(!SmartFrameworkRuntime::ifDebug()) {\n\t\treturn '';\n\t} //end if\n\t//--\n\n\t//--\n\treturn '<div id=\"SmartFramework__Debug__Profiler\"></div>';\n\t//--\n\n}", "public function setUsageTimeframe(string $usage_timeframe): void\n {\n $this->_usage_timeframe = $usage_timeframe;\n }", "public function printRAMUssage() {\r\n var_dump(memory_get_usage());\r\n }", "protected function correntMemoryUsage()\n {\n $mem = memory_get_usage(true);\n $this->phpmemoryallocate = $this->formatBytes($mem, 0);\n $mem = memory_get_usage(false);\n $this->phpmemoryusage = $this->formatBytes($mem, 0);\n $mem = memory_get_peak_usage(false);\n $this->phppeakmemoryusage = $this->formatBytes($mem, 0);\n }", "function debug($string = '', $data = [])\n{\n if (DEBUG) {\n output(trim('[D ' . get_memory_used() . '] ' . $string) . \"\\n\");\n if (!empty($data)) {\n output(print_r($data, 1));\n }\n return true;\n }\n return false;\n}", "public function memory_usage( ) {\n return '{memory_usage}' ;\n }", "function prof_print()\r\n{\r\n global $prof_timing, $prof_names, $profiling;\r\n $size = count($prof_timing);\r\n for($i=0;$i<$size - 1; $i++)\r\n {\r\n \tif($profiling)\r\n \t{\r\n \techo \"{$prof_names[$i]}\\n\";\r\n \techo sprintf(\" %f\\n\", $prof_timing[$i+1]-$prof_timing[$i]);\r\n \t}\r\n }\r\n if($profiling)\r\n {\r\n \techo \"{$prof_names[$size-1]}\\n\";\r\n\t}\r\n}", "function tearDown() {\n Debug::disable();\n Debug::$enable_show = true;\n }", "public function stats()\r\n\t{\r\n\t\treturn ProfilerToolbar::render(FALSE);\r\n\t}", "public function stats()\n\t{\n\t\t$stat = View::factory('profiler/stats');\n\t\t// echo $stat;\n\t}", "function stop_timing() {\n $this->time = number_format(microtime(true) - $this->start_time, 3);\n }", "function initProfiler()\r\n{\r\n global $TIME_START;\r\n $TIME_START=microtime(1);\r\n global $DB_ITEMS_LOADED;\r\n $DB_ITEMS_LOADED=0;\r\n\r\n global $g_count_db_statements;\r\n $g_count_db_statements = 0;\r\n}", "function panel_timer_ctools_access_summary($conf, $context) {\n $time = array('@timer' => 1);\n return t('Checks the time.', $time);\n}", "public function benchmarkStart()\n\t{\n\t\t$this->startTime = round(microtime(true) * 1000);\n\t}", "public function logPerformance();", "public function logPerformance();", "function memory_tracking()\n{\n $memory_tracking = intval(get_value('memory_tracking'));\n if (memory_get_peak_usage() > 1024 * 1024 * $memory_tracking) {\n if (php_function_allowed('error_log')) {\n error_log('Memory usage above memory_tracking (' . strval($memory_tracking) . 'MB) @ ' . get_self_url_easy(true), 0);\n }\n }\n}", "private function Benchmark()\r\n\t{\t\t\r\n\t}", "protected function setMemory()\n {\n if (empty($this->memory)) {\n $meminfo = $this->readFile(self::FILE_MEMINFO, true);\n\n preg_match(\"/(\\d+)/\", $meminfo[0], $matches);\n $this->memory['total'] = $matches[1];\n\n preg_match(\"/(\\d+)/\", $meminfo[2], $matches);\n $this->memory['available'] = $matches[1];\n $this->memory['used'] = $this->memory['total'] - $this->memory['available'];\n }\n }", "function pantomime_num_queries(){\n\techo '<p id=\"footer-num-queries\">';\n\t_e('Generated from '. get_num_queries() .' queries in '. timer_stop(0,3) .' seconds.', 'pantomime');\n\techo '</p>';\n}", "public static function time() {\n if (is_null(self::$_time)) {\n self::$_time = microtime(true);\n } else {\n echo 'Time-Consumed:- ' . (microtime(true) - self::$_time) . PHP_EOL;\n }\n }", "function __construct() {\n $this->start_time = microtime(true);\n }", "function start(){\n\t\t$this->time_start = $this->microtime_float();\n\t}", "function wpf_timer_start( $id = 0 ) {\n\tglobal $wpf_profiler;\n\n\t$mtime = explode( ' ', microtime() );\n\t$wpf_profiler[$id]['start'] = $mtime[1] + $mtime[0];\n\n\treturn true;\n}", "public function Run() {\n\t\tif(!$this->IfDebug()) {\n\t\t\t$this->PageViewSetErrorStatus(404, 'NO Twig-TPL-DEBUG Service has been activated on this server ...');\n\t\t\treturn;\n\t\t} //end if\n\t\t//--\n\n\t\t//--\n\t\t$tpl = $this->RequestVarGet('tpl', '', 'string');\n\t\t//--\n\n\t\t//--\n\t\t$this->PageViewSetCfg('rawpage', true);\n\t\t//--\n\t\t$this->PageViewSetVar(\n\t\t\t'main',\n\t\t\t(string) SmartMarkersTemplating::render_file_template(\n\t\t\t\t'lib/core/templates/debug-profiler-util.htm',\n\t\t\t\t[\n\t\t\t\t\t'CHARSET' \t=> Smart::escape_html(SmartUtils::get_encoding_charset()),\n\t\t\t\t\t'TITLE' \t=> '{{ Twig-TPL }} Template Debug Profiling',\n\t\t\t\t\t'MAIN' \t\t=> (string) (new \\SmartModExtLib\\TplTwig\\Templating())->debug($tpl)\n\t\t\t\t],\n\t\t\t\t'no'\n\t\t\t)\n\t\t);\n\t\t//--\n\n\t}", "public function Action_foo()\n\t{\n\t if (Kohana::$profiling === TRUE)\n\t {\n\t // Start a new benchmark\n\t $benchmark = Profiler::start('my_group', __FUNCTION__);\n\t }\n\t for($i=0;$i<1000000;$i++){\n\t \techo $i;\n\t }\n\t // Do some stuff\n\t if (isset($benchmark))\n\t {\n\t // Stop the benchmark\n\t Profiler::stop($benchmark);\n\t }\n\t echo View::factory('profiler/stats');\n\t}", "function prof_print()\n{\n global $prof_timing, $prof_names;\n $size = count($prof_timing);\n for ($i = 0; $i < $size - 1; $i++) {\n echo \"<b>{$prof_names[$i]}</b><br>\";\n echo sprintf(\"&nbsp;&nbsp;&nbsp;%f<br>\", $prof_timing[$i + 1] - $prof_timing[$i]);\n }\n echo \"<b>{$prof_names[$size - 1]}</b><br>\";\n}", "function print_mem()\n {\n $mem_usage = memory_get_usage();\n\n /* Peak memory usage */\n $mem_peak = memory_get_peak_usage();\n $data = round($mem_usage / 1024);\n return $data;\n }", "function shutdown() {\n global $start;\n //echo \"\\n<!-- \" . round(microtime(true) - $start, 4) . \"s -->\";\n}", "public function startProfiling($label) {}", "private static function microtimeStart(string $label): void\n {\n if (self::$status[$label]) {\n self::$microtimeStart[$label] = microtime(true);\n }\n }", "private static function microtimeStop(string $label): void\n {\n if (self::$status[$label]) {\n self::$microtimeStop[$label] = microtime(true);\n }\n }", "function displayPqp($output, $config) {\n$cssUrl = $config.'css/pQp.css';\n\necho '<div id=\"pqp-container\" class=\"pQp\" style=\"display:none\">';\n\n$logCount = count($output['logs']['console']);\n$fileCount = count($output['files']);\n$memoryUsed = $output['memoryTotals']['used'];\n$queryCount = $output['queryTotals']['count'];\n$speedTotal = $output['speedTotals']['total'];\n\necho <<<PQPTABS\n<div id=\"pQp\" class=\"console\" style=\"display: none\">\n<table id=\"pqp-metrics\" cellspacing=\"0\">\n<tr>\n\t<td class=\"green\" id=\"tab-console\">\n\t\t<var>$logCount</var>\n\t\t<h4>Console</h4>\n\t</td>\n\t<td class=\"blue\" id=\"tab-speed\">\n\t\t<var>$speedTotal</var>\n\t\t<h4>Load Time</h4>\n\t</td>\n\t<td class=\"purple\" id=\"tab-queries\">\n\t\t<var>$queryCount Queries</var>\n\t\t<h4>Database</h4>\n\t</td>\n\t<td class=\"orange\" id=\"tab-memory\">\n\t\t<var>$memoryUsed</var>\n\t\t<h4>Memory Used</h4>\n\t</td>\n\t<td class=\"red\" id=\"tab-files\">\n\t\t<var>{$fileCount} Files</var>\n\t\t<h4>Included</h4>\n\t</td>\n</tr>\n</table>\nPQPTABS;\n\necho '<div id=\"pqp-console\" class=\"pqp-box\">';\n\nif ($logCount == 0) {\n\techo '<h3>This panel has no log items.</h3>';\n}\nelse {\n\techo '<table class=\"side\" cellspacing=\"0\">\n\t\t<tr>\n\t\t\t<td class=\"alt1\"><var>'.$output['logs']['logCount'].'</var><h4>Logs</h4></td>\n\t\t\t<td class=\"alt2\"><var>'.$output['logs']['errorCount'].'</var> <h4>Errors</h4></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"alt3\"><var>'.$output['logs']['memoryCount'].'</var> <h4>Memory</h4></td>\n\t\t\t<td class=\"alt4\"><var>'.$output['logs']['speedCount'].'</var> <h4>Speed</h4></td>\n\t\t</tr>\n\t\t</table>\n\t\t<section class=\"main\">\n\t\t\t<table cellspacing=\"0\">';\n\n\t\t$alt = '';\n\t\tforeach ($output['logs']['console'] as $key => $log) {\n\t\t\tif (!empty($log['query'])) {\n\t\t\t\t$log['type'] = 'query';\n\t\t\t}\n\t\t\techo '<tr class=\"log-'.$log['type'].'\">\n\t\t\t\t<td class=\"type\">'.$log['type'].'</td>\n\t\t\t\t<td class=\"'.$alt.'\">';\n\t\t\tif ($log['type'] == 'log' || $log['type'] == 'query' || $log['type'] == 'speed') {\n\t\t\t\techo '<div><em>'.$log['message'].'</em> <pre class=\"time\">'.$log['time'].'</pre></div>';\n\t\t\t}\n\t\t\telseif ($log['type'] == 'memory') {\n\t\t\t\techo '<div>';\n\t\t\t\tif ($log['dataType'] != 'NULL') echo '<em>'.$log['dataType'].'</em>: ';\n\t\t\t\techo $log['message'].'<pre class=\"memory\">'.$log['memory'].'</pre>\n\t\t\t\t\t</div>';\n\t\t\t}\n\t\t\telseif ($log['type'] == 'error') {\n\t\t\t\techo '<div>';\n\t\t\t\tif (isset($log['duplicate'])) echo '<em>'.$log['duplicate'].' times</em> ';\n\t\t\t\techo $log['message'].' <pre>'.$log['file'].':'.$log['line'].'</pre>\n\t\t\t\t\t</div>';\n\t\t\t\tif ($log['context']) echo '<div class=\"context\">'.$log['context'].'</div>';\n\t\t\t}\n\t\t\techo '</td></tr>';\n\t\t\t$alt = ($alt == '' ? 'alt' : '');\n\t\t}\n\n\t\techo '</table></section>';\n}\n\necho '</div>';\n\necho '<div id=\"pqp-speed\" class=\"pqp-box\">';\n\nif ($output['logs']['speedCount'] == 0) {\n\techo '<h3>This panel has no log items.</h3>';\n}\nelse {\n\techo '<table class=\"side\" cellspacing=\"0\">\n\t\t\t<tr><td><var>'.$output['speedTotals']['total'].'</var><h4>Load Time</h4></td></tr>\n\t\t\t<tr><td class=\"alt\"><var>'.$output['speedTotals']['allowed'].'</var> <h4>Max Execution Time</h4></td></tr>\n\t\t </table>\n\t\t<section class=\"main\">\n\t\t\t<table cellspacing=\"0\">';\n\n\t\t$alt = '';\n\t\tforeach ($output['logs']['console'] as $log) {\n\t\t\tif ($log['type'] == 'speed' || $log['type'] == 'log') {\n\t\t\t\t$class = !empty($log['query']) ? ' query' : '';\n\t\t\t\techo '<tr class=\"log-'.$log['type'].'\">\n\t\t\t\t\t<td class=\"'.$alt.$class.'\">\n\t\t\t\t\t\t<div>'.$log['message'].'<pre>'.$log['time'].'</pre></div>';\n\t\t\t\tif ($log['context']) echo '<div class=\"context\">'.$log['context'].'</div>';\n\t\t\t\techo '</td></tr>';\n\t\t\t\t$alt = ($alt == '' ? 'alt' : '');\n\t\t\t}\n\t\t}\n\n\t\techo '</table></section>';\n}\n\necho '</div>';\n\necho '<div id=\"pqp-queries\" class=\"pqp-box\">';\n\nif ($output['queryTotals']['count'] == 0) {\n\techo '<h3>This panel has no log items.</h3>';\n}\nelse {\n\techo '<table class=\"side\" cellspacing=\"0\">\n\t\t\t<tr><td><var>'.$output['queryTotals']['count'].'</var><h4>Total Queries</h4></td></tr>\n\t\t\t<tr><td class=\"alt\"><var>'.$output['queryTotals']['time'].'</var> <h4>Total Time</h4></td></tr>\n\t\t\t<tr><td id=\"find-duplicate\"><var>'.$output['queryTotals']['duplicate'].'</var> <h4>Duplicates</h4></td></tr>\n\t\t </table>\n\t\t<section class=\"main\">\n\t\t\t<table cellspacing=\"0\">';\n\n\t\t$alt = '';\n\t\tforeach ($output['queries'] as $query) {\n\t\t\t$class = isset($query['duplicate']) ? ' duplicate' : '';\n\t\t\techo '<tr class=\"log-query\">\n\t\t\t\t<td class=\"'.$alt.$class.'\">\n\t\t\t\t\t<span>#'.$query['id'].'</span> '.$query['sql'];\n\t\t\tif ($query['explain']) {\n\t\t\t\techo '<em>\n\t\t\t\t\tPossible keys: <b>'.$query['explain']['possible_keys'].'</b> &middot;\n\t\t\t\t\tKey Used: <b>'.$query['explain']['key'].'</b> &middot;\n\t\t\t\t\tType: <b>'.$query['explain']['type'].'</b> &middot;\n\t\t\t\t\tRows: <b>'.$query['explain']['rows'].'</b> &middot;\n\t\t\t\t\tSpeed: <b>'.$query['time'].'</b>\n\t\t\t\t</em>';\n\t\t\t}\n\t\t\techo '</td></tr>';\n\t\t\t$alt = ($alt == '' ? 'alt' : '');\n\t\t}\n\n\t\techo '</table></section>';\n}\n\necho '</div>';\n\necho '<div id=\"pqp-memory\" class=\"pqp-box\">';\n\nif ($output['logs']['memoryCount'] == 0) {\n\techo '<h3>This panel has no log items.</h3>';\n}\nelse {\n\techo '<table class=\"side\" cellspacing=\"0\">\n\t\t\t<tr><td><var>'.$output['memoryTotals']['used'].'</var><h4>Used Memory</h4></td></tr>\n\t\t\t<tr><td class=\"alt\"><var>'.$output['memoryTotals']['total'].'</var> <h4>Total Available</h4></td></tr>\n\t\t </table>\n\t\t<section class=\"main\">\n\t\t\t<table cellspacing=\"0\">';\n\n\t\t$alt = '';\n\t\tforeach ($output['logs']['console'] as $log) {\n\t\t\tif (!empty($log['query'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($log['type'] == 'memory' || $log['type'] == 'log') {\n\t\t\t\t$class = $log['type'] == 'log' ? ' memory' : '';\n\t\t\t\techo '<tr class=\"log-'.$log['type'].'\">\n\t\t\t\t\t<td class=\"'.$alt.$class.'\">\n\t\t\t\t\t\t<div>';\n\n\t\t\t\tif (isset($log['dataType']) && $log['dataType'] != 'NULL') echo '<em>'.$log['dataType'].'</em>: ';\n\t\t\t\techo $log['message'].'<pre>'.$log['memory'].'</pre>\n\t\t\t\t\t</div>';\n\n\t\t\t\tif (isset($log['context'])) echo '<div class=\"context\">'.$log['context'].'</div>';\n\t\t\t\techo '</td></tr>';\n\t\t\t\t$alt = ($alt == '' ? 'alt' : '');\n\t\t\t}\n\t\t}\n\n\t\techo '</table></section>';\n}\n\necho '</div>';\n\necho '<div id=\"pqp-files\" class=\"pqp-box\">';\n\nif ($output['fileTotals']['count'] == 0) {\n\techo '<h3>This panel has no log items.</h3>';\n}\nelse {\n\techo '<table class=\"side\" cellspacing=\"0\">\n\t\t\t\t<tr><td><var>'.$output['fileTotals']['count'].'</var><h4>Total Files</h4></td></tr>\n\t\t\t<tr><td class=\"alt\"><var>'.$output['fileTotals']['size'].'</var> <h4>Total Size</h4></td></tr>\n\t\t\t<tr><td><var>'.$output['fileTotals']['largest'].'</var> <h4>Largest</h4></td></tr>\n\t\t </table>\n\t\t<section class=\"main\">\n\t\t\t<table cellspacing=\"0\">';\n\n\t\t$alt ='';\n\t\tforeach ($output['files'] as $file) {\n\t\t\techo '<tr class=\"log-file\"><td class=\"'.$alt.'\">\n\t\t\t\t<div>'.$file['path'].'<pre>'.$file['size'].'</pre></div>\n\t\t\t</td></tr>';\n\t\t\t$alt = ($alt == '' ? 'alt' : '');\n\t\t}\n\n\t\techo '</table></section>';\n}\n\necho '</div>';\n\necho <<<HEADER\n\t<header id=\"pqp-header\" cellspacing=\"0\">\n\t\t<h2 class=\"credit\">\n\t\t\t<a href=\"//github.com/firejune/pqp2\" target=\"_blank\">\n\t\t\t<strong>PHP</strong>\n\t\t\t<b class=\"green\">Q</b><b class=\"blue\">u</b><b class=\"purple\">i</b><b class=\"orange\">c</b><b class=\"red\">k</b>\n\t\t\tProfiler #2</a></h2>\n\t\t<div class=\"actions\">\n\t\t\t<a id=\"toggle-details\">\n\t\t\t\t<img src=\"$config/images/close.svg\" width=\"16\" height=\"16\" alt=\"close\"/>\n\t\t\t</a>\n\t\t\t<a id=\"toggle-height\" class=\"heightToggle\">\n\t\t\t\t<img class=\"max\" src=\"$config/images/window-maximize.svg\" width=\"16\" height=\"16\" alt=\"maximize\"/>\n\t\t\t\t<img class=\"res\" src=\"$config/images/window-restore.svg\" width=\"16\" height=\"16\" alt=\"restore\"/>\n\t\t\t</a>\n\t\t</div>\n\t</header>\nHEADER;\n\necho '</div></div>';\n\necho <<<JAVASCRIPT\n<!-- JavaScript -->\n<script type=\"text/javascript\">\ntypeof window.pQp != 'function' ? window.pQp = (function() {\n\tvar PQP_DETAILS = sessionStorage.getItem('PQP_DETAILS') == 'true';\n\tvar PQP_HEIGHT = sessionStorage.getItem('PQP_HEIGHT') || 'short';\n\tvar PQP_LAST_TAP = sessionStorage.getItem('PQP_LAST_TAP') || 'console';\n\tvar PQP_DUP_IDX = 0;\n\n\tvar pQp;\n\tvar container;\n\n\taddEvent(window, 'load', loadCSS);\n\n\tfunction main(initialize) {\n\t\tpQp = document.getElementById('pQp');\n\t\tcontainer = document.getElementById('pqp-container');\n\t\tcontainer.style.display = 'block';\n\n\t\taddEvent('tab-console', 'click', changeTab.bind({}, 'console', false));\n\t\taddEvent('tab-speed', 'click', changeTab.bind({}, 'speed', false));\n\t\taddEvent('tab-queries', 'click', changeTab.bind({}, 'queries', false));\n\t\taddEvent('tab-memory', 'click', changeTab.bind({}, 'memory', false));\n\t\taddEvent('tab-files', 'click', changeTab.bind({}, 'files', false));\n\t\taddEvent('toggle-details', 'click', toggleDetails);\n\t\taddEvent('toggle-height', 'click', toggleHeight);\n\t\taddEvent('find-duplicate', 'click', findDuplicate);\n\n\t\tif (!initialize) {\n\t\t\tPQP_DUP_IDX = 0;\n\t\t\tPQP_DETAILS = !PQP_DETAILS;\n\t\t\tPQP_HEIGHT = PQP_HEIGHT == 'short' ? 'tall' : 'short';\n\t\t}\n\n\t\tchangeTab(PQP_LAST_TAP, true);\n\t\ttoggleDetails();\n\t\ttoggleHeight();\n\t}\n\n\tfunction changeTab(tab, notopen) {\n\t\thideAllTabs();\n\t\taddClassName(pQp, tab, true);\n\t\tif (!PQP_DETAILS && !notopen) {\n\t\t\ttoggleDetails();\n\t\t}\n\t\tsessionStorage.setItem('PQP_LAST_TAP', PQP_LAST_TAP = tab);\n\t}\n\n\tfunction hideAllTabs() {\n\t\tremoveClassName(pQp, 'console');\n\t\tremoveClassName(pQp, 'speed');\n\t\tremoveClassName(pQp, 'queries');\n\t\tremoveClassName(pQp, 'memory');\n\t\tremoveClassName(pQp, 'files');\n\t}\n\n\tfunction toggleDetails() {\n\t\tif (PQP_DETAILS) {\n\t\t\taddClassName(container, 'hideDetails', true);\n\t\t\tPQP_DETAILS = false;\n\t\t} else {\n\t\t\tremoveClassName(container, 'hideDetails');\n\t\t\tPQP_DETAILS = true;\n\t\t}\n\t\tsessionStorage.setItem('PQP_DETAILS', PQP_DETAILS);\n\t}\n\n\tfunction toggleHeight() {\n\t\tif (PQP_HEIGHT == 'short') {\n\t\t\taddClassName(container, 'tallDetails', true);\n\t\t\tPQP_HEIGHT = 'tall';\n\t\t} else {\n\t\t\tremoveClassName(container, 'tallDetails');\n\t\t\tPQP_HEIGHT = 'short';\n\t\t}\n\t\tsessionStorage.setItem('PQP_HEIGHT', PQP_HEIGHT);\n\t}\n\n\tfunction findDuplicate() {\n\t\tvar queries = document.getElementById('pqp-queries');\n\t\tvar finded = queries.querySelectorAll('.duplicate');\n\n\t\tvar focus = finded[PQP_DUP_IDX++];\n\t\tif (focus) focus.scrollIntoView();\n\t\tif (finded.length - 1 < PQP_DUP_IDX) {\n\t\t\tPQP_DUP_IDX = 0;\n\t\t}\n\t}\n\n\tfunction loadCSS() {\n\t\tvar sheet = document.createElement('link');\n\t\tsheet.setAttribute('rel', 'stylesheet');\n\t\tsheet.setAttribute('type', 'text/css');\n\t\tsheet.setAttribute('href', '$cssUrl');\n\t\tdocument.getElementsByTagName('head')[0].appendChild(sheet);\n\t\tsetTimeout(main, 10);\n\t}\n\n\tfunction addClassName(objElement, strClass, blnMayAlreadyExist) {\n\t\tif (objElement.className) {\n\t\t\tvar arrList = objElement.className.split(' ');\n\t\t\tif (blnMayAlreadyExist) {\n\t\t\t\tvar strClassUpper = strClass.toUpperCase();\n\t\t\t\tfor (var i = 0; i < arrList.length; i++) {\n\t\t\t\t\tif (arrList[i].toUpperCase() == strClassUpper) {\n\t\t\t\t\t\tarrList.splice(i, 1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tarrList[arrList.length] = strClass;\n\t\t\tobjElement.className = arrList.join(' ');\n\t\t} else {\n\t\t\tobjElement.className = strClass;\n\t\t}\n\t}\n\n\tfunction removeClassName(objElement, strClass) {\n\t\tif (objElement.className) {\n\t\t\tvar arrList = objElement.className.split(' ');\n\t\t\tvar strClassUpper = strClass.toUpperCase();\n\t\t\tfor (var i = 0; i < arrList.length; i++) {\n\t\t\t\tif (arrList[i].toUpperCase() == strClassUpper) {\n\t\t\t\t\tarrList.splice(i, 1);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tobjElement.className = arrList.join(' ');\n\t\t}\n\t}\n\n\tfunction addEvent(obj, type, fn) {\n\t\tif (typeof obj != 'object') {\n\t\t\tobj = document.getElementById(obj);\n\t\t}\n\n\t\tif (!obj) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (obj.attachEvent) {\n\t\t\tobj['e' + type + fn] = fn;\n\t\t\tobj[type+fn] = function() {\n\t\t\t\tobj['e' + type + fn](window.event);\n\t\t\t}\n\t\t\tobj.attachEvent('on' + type, obj[type + fn]);\n\t\t} else {\n\t\t\tobj.addEventListener(type, fn, false);\n\t\t}\n\t}\n\n\tmain.changeTab = changeTab;\n\treturn main;\n})() : pQp();\n</script>\nJAVASCRIPT;\n\n}", "function prmemx() {\r\n\tprx(GetMemory());\r\n}", "public function resetTimer()\r\n\t{\r\n\t\t$this->last = microtime(true);\r\n\t}", "public static function set_error_time()\n {\n $timer = &self::$timer;\n $session_start = $timer->__set('error');\n }", "function prof_flag($str)\r\n{\r\n global $prof_timing, $prof_names;\r\n $prof_timing[] = microtime(true);\r\n $prof_names[] = $str;\r\n}", "public function vvDebug($message, $timerRef = null, $newLineAfter = false)\n {\n $this->output('debug', $this->buildMessage($message, $timerRef, $newLineAfter), 2);\n }", "public function saveTotalDuration( StopwatchEvent $event ) {\n\t\t$this->filesystem->dumpFile( '.executionTime', $this->getDuration( $event ) );\n\t}", "public function index()\n {\n ini_set('memory_limit', '512M');\n Contour::getConfigManager()->turnOnErrorReporting();\n Contour::getConfigManager()->setTimeLimit(60);\n\n $start = microtime(true);\n MemoryDataManager::initialize();\n $manager = MemoryDataManager::getInstance();\n\n $tag = $manager->dataTagManager->get_by_id(1475);\n $tag2 = $manager->dataTagManager->get_by_id(1487);\n $tags = array($tag, $tag2);\n $block = $manager->dataBlockManager->getByTagsArray($tags);\n $stop = microtime(true);\n $bytes = memory_get_usage();\n $kilobytes = $bytes / 1024;\n $megabytes = intval($kilobytes / 1024);\n echo \"final memory usage: \" . $megabytes . \" MB<br />\";\n echo \"time spent: \" . number_format($stop - $start, 3) . \" Seconds<br />\";\n echo xdebug_peak_memory_usage() / 1024 / 1024;\n }", "public function start()\n {\n $this->_timeStartInMicroSeconds = microtime(true);\n }", "public function shutDown()\n {\n $data = $this->getData();\n if( $this->displayAsHTML ) {\n $log = $this->generateHTML($data);\n } else {\n $log = sprintf(\n '[phpbenchmark time=%f memory=%f files=%d classes=%d]',\n $data['time'],\n $data['memory'],\n $data['files'],\n $data['classes']\n );\n }\n\n echo $log;\n }", "public function totalTimer() {\n return \"It took \" . $this->getTime() . \" seconds to run \" . $this->getName() . \" <br>\";\n }", "public function __construct()\n {\n $this->startTime = microtime(true);\n parent::__construct();\n }", "private function stopTimer()\n\t{\n\t\t// Measure how many seconds it took to execute\n\t\t$this->executionSeconds = microtime(true) - $this->startMicroStamp;\n\n\t\t// Keep statistics\n\t\tself::$totalExecutionSeconds += $this->executionSeconds;\n\t}", "public function new_measure() {\r\n\r\n\t\t$this->_bodyData['watches'] = $this->watch->getWatches(\r\n\t\t\t$this->session->userdata('userId'));\r\n\r\n\t\t$this->event->add(MEASURE_LOAD);\r\n\r\n\t\tarray_push($this->_headerData['javaScripts'], \"input.time.logic\", \"time.api\");\r\n\r\n\t\t$this->_headerData['headerClass'] = 'blue';\r\n\t\t$this->load->view('header', $this->_headerData);\r\n\r\n\t\t$this->load->view('measure/new-measure', $this->_bodyData);\r\n\r\n\t\t$this->load->view('footer');\r\n\t}", "public function TimerStart()\r\n\t{\r\n\t\t$parts = explode( \" \", microtime() );\r\n\t\t$this->time_diff = 0;\r\n\t\t$this->time_start = $parts[1].substr( $parts[0],1 );\r\n\t}", "function bb_shutdown()\n{\necho '<div style=\"color:#fff;position:fixed;bottom:20px;left:0px; background-color:#000;\">'.$time = microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"].'</div>';\n}", "function setDebug($debug_mode=true)\n {\n $this->debug = $debug_mode;\n }", "public function SetDebugFn($fn)\n {\n $this->debugFn = $fn;\n }", "public function afterRun()\n {\n if (Zend_Registry::get('config')->default->db->useTransactions > 0) {\n Zend_Db_Table::getDefaultAdapter()->commit();\n }\n App_Profiler::stop('Bootstrap::run');\n\n /*if ((APPLICATION_ENV != 'production') AND ( ! Zend_Controller_Front::getInstance()->getRequest()->isXmlHttpRequest())) {\n echo '<div style=\"float:left\"><pre>'\n . 'Total execution time: ' . (App_Profiler::fetch('Bootstrap::run') + App_Profiler::fetch('Bootstrap::init'))\n . \"\\r\\n\"\n . 'Memory usage:' . memory_get_usage() . '('.memory_get_usage(TRUE).')'\n . \"\\r\\n\"\n ;\n //Zend_Debug::dump(App_Profiler::getTimersSlice(array('sum', 'count')));\n echo '</pre></div>';\n\n }*/\n\n\n }", "protected function startTimer()\r\n\t{\r\n\t\tlist($usec, $sec) = explode(\" \",$this->time);\r\n\t\t$this->startTime = ((float)$usec + (float)$sec);\r\n\t\treturn;\r\n\t}", "private static function time_exec()\n {\n $current = self::time();\n self::$time_exec = $current-self::$time_start;\n }", "private static function setTimeTracker()\n {\n if (!is_object($GLOBALS['TT'])) {\n $GLOBALS['TT'] = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_TimeTrackNull');\n }\n }", "public static function send()\n\t{\n\t\tif (static::isEnabled(static::DB_BENCHMARK) and count(static::$_queries))\n\t\t{\n\t\t\t$table = array(array('DB', 'Time', 'SQL', 'Bindings'));\n\t\t\tforeach(static::$_queries as $query)\n\t\t\t{\n\t\t\t\t$table[] = array($query['dbname'], (string)round($query['time'], 4), $query['sql'], $query['bindings']);\n\t\t\t}\n\t\t\tDebug\\FirePHP::getInstance()->table('Profiler - DB Benchmark', $table);\n\t\t}\n\n\t\tif (static::isEnabled(static::MARK_MEMORY) and count(static::$_memory_marks))\n\t\t{\n\t\t\t$table = array(array('Name', 'Type', 'Time', 'Memory'));\n\t\t\tforeach(static::$_memory_marks as $mark)\n\t\t\t{\n\t\t\t\t$table[] = array($mark['name'], $mark['type'], (string)round(($mark['time'] - APP_START_TIME), 4), (string)round($mark['memory'] / pow(1024, 2), 5) . 'MB');\n\t\t\t}\n\t\t\tDebug\\FirePHP::getInstance()->table('Profiler - Memory', $table);\n\t\t}\n\n\t\tif (static::isEnabled(static::MARK) and count(static::$_marks))\n\t\t{\n\t\t\t$table = array(array('Name', 'Time'));\n\t\t\tforeach(static::$_marks as $mark)\n\t\t\t{\n\t\t\t\tif($mark['stopped'])\n\t\t\t\t{\n\t\t\t\t\t$table[] = array($mark['name'], (string)round($mark['time'], 4));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Only displays the time marks if they're finished\n\t\t\tcount($table) > 2 and Debug\\FirePHP::getInstance()->table('Profiler - Time marks', $table);\n\t\t}\n\n\t\tif (static::isEnabled(static::APP_STATS))\n\t\t{\n\t\t\tDebug\\FirePHP::getInstance()->info('Execution time: ~' . round((microtime(true) - APP_START_TIME), 4) . ' - Memory usage: ' . round((memory_get_peak_usage() - APP_START_MEM) / pow(1024, 2), 3) . 'MB');\n\t\t}\n\t}", "public function setDebugOutput($method = 'echo')\n {\n $this->Debugoutput = $method;\n }", "function setDebugMode($debug) {\r\n $this->_templateObject->setDebugMode($debug);\r\n }" ]
[ "0.58490145", "0.5796903", "0.56126535", "0.5592284", "0.54928905", "0.5483366", "0.54372925", "0.5430032", "0.54248446", "0.5407317", "0.5406267", "0.5380349", "0.53632873", "0.53592163", "0.52957314", "0.52674764", "0.52625775", "0.525227", "0.5252223", "0.52441543", "0.52163607", "0.5177722", "0.5161434", "0.51445454", "0.51431006", "0.5142956", "0.5141815", "0.51236176", "0.5108771", "0.50990427", "0.5086633", "0.5072074", "0.5052219", "0.5051976", "0.5044193", "0.50366586", "0.5031255", "0.5012648", "0.50111306", "0.5007262", "0.5001083", "0.49964222", "0.49832836", "0.49825233", "0.49777466", "0.49644926", "0.49620852", "0.49516276", "0.49294353", "0.49216187", "0.4913987", "0.49068978", "0.48867965", "0.48817322", "0.48784557", "0.48744875", "0.48707607", "0.48692384", "0.48692384", "0.48531035", "0.48530522", "0.48493323", "0.484732", "0.4816461", "0.4810968", "0.48099095", "0.48071828", "0.4805828", "0.4782574", "0.47773144", "0.47729537", "0.4771154", "0.47684184", "0.47657388", "0.47623655", "0.47557974", "0.47543517", "0.47463575", "0.47399142", "0.47391436", "0.47264114", "0.4712096", "0.47021094", "0.46991873", "0.46933767", "0.4690922", "0.4679964", "0.4674439", "0.46651798", "0.46643797", "0.46583462", "0.465134", "0.4649778", "0.4649727", "0.46472657", "0.4646982", "0.46444982", "0.4638865", "0.4630017", "0.46180037" ]
0.48906288
52
Add Userdefined Debugvariable e.g. addvar('$anz',$anz) Caution : Use single quote vor Varcaption like $var
public function addvar($key, $value) { if ($this->mode > 0) { if (is_string($key)) { $this->debugvars[$key] = $value; } else { $this->debugvars["debugvar_".count($this->debugvars)] = $value; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function addVar($msg, $var)\r\n\t{\r\n\t\tif(self::$debug)\r\n\t\t{\r\n\t\t\tself::$debugData .= self::makePrintable($msg) . \": \" .\r\n\t\t\t\tself::makePrintable(print_r($var, true)) . \"\\n\";\r\n\t\t}\r\n\t}", "public function addVariable($tv);", "public function addVariable($name, $value);", "function addVar($varName,$value)\n {\n $this->VARS[${'varName'}][0] = $varName;\n $this->VARS[${'varName'}][1] = $value;\n }", "function addVariable($name,$value,$eval = true) {\n\t\t $this->Open();\n\t\t if ($eval) {\t\t \t\t \n\t\t $this->Stream .= '$'.$name.' = '.$this->prepareVariableString($value).';'.chr(10);\n\t\t \n\t\t } else {\t\t \n\t\t $this->Stream .= '$'.$name.' = $'.$value.\";\".chr(10);\n\t\t } \n\t\t}", "public function tlogVariable($name, $variable);", "public function addVar($key, $value)\n\t{\n\t\tswitch ($key) {\n\t\t\tcase 'variables':\n\t\t\t\t$this->vars['variables'] = array_merge($this->vars['variables'], $value);\n\t\t\tbreak;\n\t\t\tcase 'css':\n\t\t\tcase 'js':\n\t\t\t\tif (!empty($this->vars[$key])) {\n\t\t\t\t\t$this->vars[$key] .= ', '.$value;\n\t\t\t\t} else {\n\t\t\t\t\t$this->vars[$key] = $value;\n\t\t\t\t}\t\t \n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->vars[$key] = $value;\n\t\t}\t\n\t}", "function add_php_var($key, $value){\n\t\t$this->php_vars[$key] = $value;\n\t}", "function preVar($variable){\n\techo \"<pre>\";\n\tvar_dump($variable);\n\techo \"</pre>\";\n}", "public function debugprint($variable,$desc=\"\",$exit=0) {\n\t}", "function LogVar($msg, &$var)\n {\n if( !CCDebug::IsEnabled() )\n return;\n\n $t =& CCDebug::_textize($var);\n\n CCDebug::Log('[' . $msg . '] ' . $t);\n }", "public static function debugVar($var)\n {\n echo '<pre>';\n var_dump($var);\n echo '</pre>';\n }", "function v($variable) {\tdie( var_dump($variable) ); }", "protected function debugVar($var){\n \tob_start(); \n \t$this->debug(nl2br(ob_get_clean()));\n }", "public function addVariables($tvs = array());", "function add_debug ($text, $br=true) {\n // STS v4.1: Add debug text to the STS debug variable. If $br=false, then no line break added\n $this->template['debug'].= $text . ($br ? \"\\n\" : '');\n }", "function debug($var): void\n {\n call_user_func('dump', $var);\n }", "public function debug($var){\n\t\t////$this->core->log($var);\n\t}", "function debug( $var ) {\n print \"<pre>\";\n var_dump( $var );\n print \"</pre>\";\n }", "function vd($var): void{\n\tvar_dump($var);\n}", "public function InsertVariable($var, $value, $more = NULL, $quote = TRUE)\n {\n $q = $quote ? \"'\" : '';\n if(is_null($more))\n $this->variables[$var] = $q . $this->ReEscape($value) . $q;\n elseif(is_null($value))\n $this->variables[$var][] = $q . $this->ReEscape($more) . $q;\n else\n $this->variables[$var][$value] = $q . $this->ReEscape($more) . $q;\n }", "function debug($variable)\n{\n\techo '<pre>';\n\tprint_r($variable);\n\techo '</pre>';\n}", "public static function pvardebug($var) {\n printf(\"%s\\n\", static::vardebug($var));\n return static::getLastResult();\n }", "function debug_var($name,$data)\r\r\n{\r\r\n\r\r\n\tdebug_open_window();\r\r\n\r\r\n\t$captured = explode(\"\\n\", debug_capture_print_r($data) );\r\r\n\tprint \"<script language='JavaScript'>\\n\";\r\r\n\r\r\n\tprint \"debugWindow.document.writeln('<span style=\\'font-family: Arial, Helvetica, sans-serif; font-size: 10px; line-height: 11px;\\'><b>$name</b></span>');\\n\";\r\r\n\tprint \"debugWindow.document.writeln('<pre style=\\'line-height: 12px;\\'>');\";// \\n\r\r\n\r\r\n\tforeach($captured as $line)\r\r\n\t{\r\r\n\t\t$line2 = debug_colorize_string($line);\r\r\n\t\tprint \"debugWindow.document.writeln('<font size=-3>\" . \r\r\n\t\t\t\t$line2 . \"</font>');\\n\";\r\r\n\t}\r\r\n\tprint \"debugWindow.document.writeln('</pre>');\\n\";\r\r\n\tprint \"debugWindow.scrollBy(0,10000);\";\r\r\n\tprint \"self.focus();\\n\";\r\r\n\r\r\n\tprint \"</script>\\n\";\r\r\n}", "public function AddVar($key, $var)\n {\n $this->aTemplateData[$key] = $var;\n }", "function addVars($node, $vars) {\n\tforeach ($vars as $name=>$val) {\n\t\t$var = $node->data->addChild('var', $val);\n\t\t$var->addAttribute('name', $name);\n\t}\n}", "function addModuleVar( $module, $var, $val ) {\n Registry::add(esf_Extensions::MODULE.'.'.$module.'.'.$var, $val);\n}", "function debug($var) {\n\techo '<pre>',print_r($var,1),'</pre>';\n}", "function debuggingLog($header = \"Logged Data\", $variable)\n {\n $isDebuggerActive = false;\n\n if (!$isDebuggerActive)\n return;\n\n $op = \"<br>\";\n $op .= $header;\n echo $op . \"<hr>\" . \"<pre>\";\n var_dump($variable);\n echo \"</pre>\" . \"<hr>\";\n }", "private function debug($var = null) {\n if( $var ) {\n echo '<pre>';\n print_r( $var );\n echo '</pre>';\n }\n }", "public function debuglog($variable,$desc=\"\",$exit=1) {\n\t}", "function e($var_nm)\n{\n\tglobal $$var_nm ;\n\n\treturn '$' . $var_nm . ' = ' . $$var_nm . ' ' ;\n}", "public function debug($var){\n\t\tif ($this->env['debug'] !== false){\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($var);\n\t\t\techo \"</pre>\";\n\t\t}\n\t}", "public static function addDebug($msg)\r\n\t{\r\n\t\tif(self::$debug)\r\n\t\t\tself::$debugData .= self::makePrintable($msg) . \"\\n\";\r\n\t}", "function debuggingLog($header=\"Logged Data\",$variable){\n $isDebuggerActive= true;\n if(!$isDebuggerActive)\n return;\n $op = \"<br>\";\n $op .= $header;\n echo $op . \"<hr>\" . \"<pre>\";\n var_dump($variable);\n echo \"</pre>\" . \"<hr>\";\n}", "function defineVar(string $name, $value, string $scope=\"global\") {\r\n\r\n }", "protected function Debug($var){\n\t\t$bt = debug_backtrace();\n\t\t$dump = new CVarDumper();\n\t\t$debug = '<div style=\"display:block;background-color:gold;border-radius:10px;border:solid 1px brown;padding:10px;z-index:10000;\"><pre>';\n\t\t$debug .= '<h4>function: '.$bt[1]['function'].'() line('.$bt[0]['line'].')'.'</h4>';\n\t\t$debug .= $dump->dumpAsString($var);\n\t\t$debug .= \"</pre></div>\\n\";\n\t\tYii::app()->params['debugContent'] .=$debug;\n\t}", "function dump2(&$variable, $info = false) {\n $backup = $variable;\n $variable = $seed = md5(uniqid() . rand());\n $variable_name = 'unknown';\n foreach ($GLOBALS as $key => $value) {\n if ($value === $seed) { $variable_name = $key; }\n }\n $variable = $backup;\n\n echo '<pre style=\"\n font: 9pt sans-serif;\n text-align: left;\n margin: 25px;\n display: block;\n background: white;\n color: black;\n border:1px solid #ccc;\n padding:5px;\n margin: 25px;\n font-size: 11px;\n line-height: 14px;\n \">';\n\n $info = ($info) ? $info : '$' . $variable_name;\n echo '<b style=\"color:red;\">' . $info . ':</b><br>';\n do_dump($variable, '$' . $variable_name);\n echo '<b style=\"color:red;\">End ' . $info . '</b></pre>';\n}", "public static function debug($var) {\n echo '<pre>';\n var_dump($var);\n echo '</pre>';\n }", "public function addVars(array $vars = array())\n\t{\n\t\tforeach($vars as $var => $value)\n\t\t{\n\t\t\t$this->vars[$var] = $value;\n\t\t}\n\t}", "public static function debug($var) \n\t{\n\t\techo '<pre>'; var_dump($var); exit;\n\t}", "public function addTwigVar(string $varName, $varValue)\n {\n $this->vars[$varName] = $varValue;\n }", "function debug($var, $die = false) {\n\techo \"<pre>\" . print_r($var, true) . \"</pre>\";\n\tif ($die) {\n\t\tdie;\n\t}\n}", "function vd($var) {\n\techo '<hr><pre>';\n\tvar_dump($var);\n\techo '</pre><hr>';\n}", "public function dump($variable) {}", "public function addVariable_post(){\n $idVariable = $this->cleanData($this->post('id_variable'));\n $idGroup = $this->cleanData($this->post('id_grupo'));\n $msg = 'La variable '.$idVariable.' no puede ser agregada al grupo '.$idGroup;\n\n if($this->variablegroup->checkVariable($idVariable, $idGroup)){\n $input = array_map('trim', $this->post(NULL, TRUE));\n // ADD PARAMETERS TO DATA BASE\n $input = $this->addValuesDataBase($input);\n // NEW VARIABLE\n $this->variablegroup->create($input);\n $msg = 'La variable '.$idVariable.' fue agregada al grupo '.$idGroup;\n }\n return $this->response(array('msg'=> $msg));\n }", "public function visitVariableAstNode( ezcTemplateVariableAstNode $var )\n {\n $this->write( '$' . $var->name );\n }", "function indeed_debug_var($variable){\n\t if (is_array($variable) || is_object($variable)){\n\t\t echo '<pre>';\n\t\t print_r($variable);\n\t\t echo '</pre>';\n\t } else {\n\t \tvar_dump($variable);\n\t }\n}", "function qa_debug($var)\n{\n\techo \"\\n\" . '<pre style=\"padding: 10px; background-color: #eee; color: #444; font-size: 11px; text-align: left\">';\n\techo $var === null ? 'NULL' : htmlspecialchars(print_r($var, true), ENT_COMPAT|ENT_SUBSTITUTE);\n\techo '</pre>' . \"\\n\";\n}", "function dump($variable)\n {\n echo '<pre>';\n print_r($variable);\n }", "public function add($var, array $array)\n {\n $this->display[$var] = array_merge((array) $this->display[$var], $array);\n }", "function debug($variable)\n{\n echo \"<pre>\" . print_r($variable, true) . \"</pre>\";\n}", "function debug($var = null, $name = null)\n{\n $bt = array();\n $file = '';\n if ($name !== false) {\n $bt = debug_backtrace();\n $file = str_replace(bp(), '', $bt[0]['file']);\n print '<div style=\"font-family: arial; background: #FFFBD6; margin: 10px 0; padding: 5px; border:1px solid #666;\">';\n if ($name) $name = '<b>' . $name . '</b><br/>';\n print '<span style=\"font-size:14px;\">' . $name . '</span>';\n print '<div style=\"border:1px solid #ccc; border-width: 1px 0;\">';\n }\n print '<pre style=\"margin:0;padding:10px;\">';\n print_r($var);\n print '</pre>';\n if ($name !== false) {\n print '</div>';\n print '<span style=\"font-family: helvetica; font-size:10px;\">' . $file . ' on line ' . $bt[0]['line'] . '</span>';\n print '</div>';\n }\n}", "public function variable($string);", "function dump(&$var, $info = FALSE)\n{\n\t$scope = false;\n\t$prefix = 'unique';\n\t$suffix = 'value';\n\n\tif($scope) $vals = $scope;\n\telse $vals = $GLOBALS;\n\n\t$old = $var;\n\t$var = $new = $prefix . rand() . $suffix; $vname = FALSE;\n\tforeach($vals as $key => $val) if($val === $new) $vname = $key;\n\t$var = $old;\n\n\techo \"<pre style='margin: 0px 0px 10px 0px; display: block; background: white; color: black; font-family: Verdana; border: 1px solid #cccccc; padding: 5px; font-size: 10px; line-height: 13px;'>\";\n\tif($info != FALSE) echo \"<b style='color: red;'>$info:</b><br>\";\n\tdo_dump($var, '$'.$vname);\n\techo \"</pre>\";\n}", "function set_var($name, $value){ // set the template variable\n\tif (func_num_args()> 2){\n\t\tif (!$this->in_vars($name)) $this->vars[$name] = array();\n\t\t$this->vars[$name][func_get_arg(2)] = $value;\n\t} else $this->vars[$name] = $value;\n}", "function dd($var){\n\t\techo \"<pre>\";\n\t\tdie(print_r($var));\n\t}", "function add()\n{\n\t$args = func_get_args();\n\t$string = array_shift($args);\n\tSystem::InterfaceHandler()->content(vsprintf($string, $args));\n}", "function avoca_debug($var, $is_die = false)\n{\n echo '<pre>';\n print_r($var);\n echo '</pre>';\n\n if ($is_die) {\n die();\n }\n}", "function var_dump_pre ($input_variable)\n{\n print(\"<pre>\");\n var_dump($input_variable);\n print(\"</pre>\");\n}", "function dumpvar($mixed)\n\t\t{\n\t\t\t$this->vardump($mixed);\n\t\t}", "protected function _injectTplVariable()\r\n {\r\n $oConfig = oxRegistry::getConfig();\r\n $sTplVariableName = $oConfig->getConfigParam('sTplVariable');\r\n if ($sTplVariableName) {\r\n $oConfig->getActiveView()->addTplParam($sTplVariableName, $this->getToxid());\r\n }\r\n }", "function debug($var, $discord = false, $type = 'php')\n {\n if (!Configure::read('debug')) {\n return;\n }\n\n $trace = Debugger::trace(['start' => 1, 'depth' => 2, 'format' => 'array']);\n $search = [ROOT];\n\n $file = str_replace($search, '', $trace[0]['file']);\n $line = $trace[0]['line'];\n $lineInfo = sprintf('%s (line %s)', $file, $line);\n\n $template = <<<TEXT\n%s\n########## DEBUG ##########\n%s\n###########################\n%s\nTEXT;\n\n $discordTemplate = <<<TEXT\n**########## DEBUG ##########**\n`%s`\n```%s\n%s\n```\n%s\nTEXT;\n $var = Debugger::exportVar($var, 25);\n\n if ($discord === true) {\n return sprintf($discordTemplate, $lineInfo, $type, $var, PHP_EOL);\n }\n\n printf($template, $lineInfo, $var, PHP_EOL);\n }", "function debug( $var ) {\n\terror_log( print_r( $var, true ) );\n}", "private function serializeVariable($key, $value)\n {\n return sprintf('Variable: %s=%s', $key, $value);\n }", "function xdump(...$vars)\n {\n screens()->runtime()->addNl(\n (new VarDump(...$vars))\n ->toString()\n )->emit();\n }", "function add( $query = '', $meaning = '', $example = '', $name = '', $site = '', $error = '' )\n\t{\n\t\tglobal $security, $template, $basic_gui;\n\t\t\n\t\t$template->assign_block_vars( 'add', '', array(\n\t\t\t'S_ACTION' => $security->append_sid( '?' . MODE_URL . '=urbanislovar&' . SUBMODE_URL . '=adding' ),\n\t\t\t'S_QUERY' => $query,\n\t\t\t'S_MEANING' => $meaning,\n\t\t\t'S_EXAMPLE' => $example,\n\t\t\t'S_NAME' => $name,\n\t\t\t'S_SITE' => $site,\n\t\t\t'S_ERROR' => $error,\n\t\t\t\n\t\t\t'TOOL' => array(\n\t\t\t\t\t'NAME' => $basic_gui->make_tooltip( 'test', 'buttontip', 'tool_name' )\n\t\t\t\t)\n\t\t) );\n\t\t\n\t\t$template->assign_switch( 'add', TRUE );\n\t\t\n\t\t$basic_gui->add_file( 'urbanislovar' );\n\t}", "function debug($var) {\n echo '<pre>'. print_r($var, 1) .'</pre>';\n}", "function globalvariable($name, $tooltiptext, $first = false){\n if(!$first){ echo \", \";}\n $tooltiptext = str_replace(\"*\", \" (for debugging purposes)\", $tooltiptext);\n echo '<SPAN TITLE=\"' . $tooltiptext . '\">%' . $name . \"%</SPAN>\";\n}", "public function insertVars($vars) {\n\t\t$this->vars = array_merge($this->vars, $vars);\n\t}", "function d($var, $var_name = null) {\n?>\n <pre style=\"word-wrap: break-word; white-space: pre; font-size: 11px;\">\n<?php\n if (isset($var_name)) {\n echo \"<strong>$var_name</strong>\\n\";\n }\n if (is_null($var) || is_string($var) || is_int($var) || is_bool($var) || is_float($var)) {\n var_dump($var);\n } else {\n print_r($var);\n }\n?>\n </pre><br>\n<?php\n}", "protected function remebmer_variable( $name, $value ){\n\t\tstatic::$instance->variables[$name] = $value;\n\t}", "function drush_variable_realm_set($realm_name, $realm_key, $variable_name, $value) {\n variable_realm_set($realm_name, $realm_key, $variable_name, $value);\n drush_print('Variable set.');\n}", "function psa_debug( $variable ) {\n\techo \"<pre>\";\n\tif( is_array( $variable ) || is_object( $variable ) ) {\n\t\tprint_r( $variable );\n\t} else {\n\t\tvar_dump( $variable );\n\t}\n\techo \"</pre>\";\n}", "public static function vdump($variable) {\r\n\t\t$dump = '';\r\n\t\tif(Debug::enabled()) {\r\n\t\t\tif(func_num_args() >= 1) {\r\n\t\t\t\tob_start();\r\n\t\t\t\techo \"<pre>\";\r\n\t\t\t\t$args = func_get_args();\r\n\t\t\t\t\r\n\t\t\t\t$count = count($args);\r\n\t\t\t\tfor($x = 0; $x < $count; $x++) {\r\n\t\t\t\t\tvar_dump($variable);\r\n\t\t\t\t}\r\n\t\t\t\techo Debug::getBackTrace('', 1, 'fdumped in');\r\n\t\t\t\techo \"\\n\\n\";\r\n\t\t\t\techo \"</pre>\"; \r\n\t\t\t\t$dump = ob_get_clean();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $dump;\r\n\t}", "function var_show($var)\n{\n echo '<pre>';\n var_dump($var);\n echo '</pre>';\n}", "function dump($var, $name='') {\r\n}", "function VariableValue($variableName, $value = UNDEFINED);", "function varInfo(...$vars)\n {\n return (new VarDump(...$vars))->toString();\n }", "function debug($var, $val) {\r\necho \"***Deboggage\\nVariable : $var\\nValeur :\";\r\nif (is_array($val) || is_object($val) || is_resource($val)) {\r\n\tprint_r($val);\r\n} else {\r\n\techo \"\\n$val\\n\";\r\n}\r\n\techo \"***\\n\";\r\n\tdie(\"Fin deboggage\");\r\n}", "private function T_VARIABLE($value) {\n\t\treturn str_replace('$', '', $value);\n\t}", "function debug($variable){\n echo '<div style=\"border: 1px solid orange\">';\n echo '<pre>';\n print_r($variable);\n echo '</pre>';\n echo '</div>';\n}", "public static function debug_var($var)\n\t{\n\t\tswitch (gettype($var))\n\t\t{\n\t\t\tcase 'null':\n\t\t\t\treturn 'NULL';\n\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\treturn $var ? 'TRUE' : 'FALSE';\n\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\treturn var_export($var, TRUE);\n\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\treturn 'object '.get_class($var);\n\t\t\tbreak;\n\t\t\tcase 'array':\n\t\t\t\tif (arr::is_assoc($var))\n\t\t\t\t\treturn print_r($var, TRUE);\n\n\t\t\t\treturn 'array('.implode(', ', array_map(array(__CLASS__, __FUNCTION__), $var)).')';\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn var_export($var, TRUE);\n\t\t\tbreak;\n\t\t}\n\t}", "protected function attrPlus($variable, $base)\n {\n $value = isset($this->variables[$variable]) ? \"$base {$this->variables[$variable]}\" : $base;\n echo \"{$variable}=\\\"{$value}\\\"\";\n }", "public function servervalue ($var,$data){\n\t\t\n\t\t$this->vars[$var] = $data;\n\t}", "function __ ($var, $rpl = null)\n{\n global $main;\n if (array_key_exists ($var, $main->template->vars_l))\n {\n if (is_array ($rpl))\n $cnt = vsprintf ($main->template->vars_l[$var], $rpl);\n else\n $cnt = $main->template->vars_l[$var];\n echo $cnt;\n }\n}", "function xdd(...$vars)\n {\n screens()->runtime()->addNl(\n (new VarDump(...$vars))\n ->toString()\n )->emit();\n die(0);\n }", "function dumpVarsToJS(){\n\tglobal $nric,$firstName,$lastName,$dob,$address1,$address2,$poCode,\n$homeNum,$handphoneNum,$email,$description;\n\tglobal $faID;\n\t\n\t$jscommand = \"<script type=\\\"text/javascript\\\">\";\n\t$jscommand .= \"nric='\".$nric.\"';\";\n\t$jscommand .= \"firstName='\".$firstName.\"';\";\n\t$jscommand .= \"lastName='\".$lastName.\"';\";\n\t$jscommand .= \"dob='\".$dob.\"';\";\n\t$jscommand .= \"address1='\".$address1.\"';\";\n\t$jscommand .= \"address2='\".$address2.\"';\";\n\t$jscommand .= \"poCode='\".$poCode.\"';\";\n\t$jscommand .= \"homeNum='\".$homeNum.\"';\";\n\t$jscommand .= \"handphoneNum='\".$handphoneNum.\"';\";\n\t$jscommand .= \"email='\".$email.\"';\";\n\t$jscommand .= \"description='\".$description.\"';\";\n\t\n\t$jscommand .= \"faID='\".$faID.\"';\";\n\t\n\t$jscommand .= \"</script>\";\n\techo $jscommand;\n}", "function dd( $var ){\n echo \"<prev>\";\n die(print_r($var));//Finaliza la ejecucion\n}", "function var_identify($arg1){\n global $token;\n $error_val = False;\n\n get_token();\n if($token->type >= tokenType::f_gf && $token->type <= tokenType::f_tf){\n upper_scan($token->data, 0);\n $arg1->addAttribute('type', 'var');\n $arg1[0] = $token->data;\n get_token();\n if($token->type === tokenType::marker){\n $arg1[0] .= $token->data;\n get_token();\n if($token->type !== tokenType::identifier){\n if(!preg_match(\"/^[a-zA-Z_\\-\\$&%\\*!?][a-zA-Z_\\-\\$&%\\*!?0-9]*$/\", $token->data)){\n fwrite(STDERR,\"ERROR : LEX : detected lexical error in: $token->data\\n\");\n exit(23);\n }\n if(!is_keyword(tokenType::identifier)){\n $error_val = True;\n }\n }\n $arg1[0] .= $token->data;\n }\n else $error_val = True;\n }\n else $error_val = True;\n\n if($error_val){\n fwrite(STDERR, \"ERROR : SYNTAX : Variable <var> expected : last token: $token->data $token->type\\n\");\n exit(23);\n }\n }", "function SetVar( $var, $value )\r\n {\r\n $this->_vars[$var] = $value;\r\n }", "protected function registerTag(): string\n {\n return 'var';\n }", "function PrintVar(&$var, $template_safe = true)\n {\n if( !CCDebug::IsEnabled() )\n return;\n\n $t =& CCDebug::_textize($var);\n\n $html = '<pre style=\"font-size: 10pt;\">' .\n htmlspecialchars($t) .\n '</pre>';\n\n if( $template_safe )\n {\n CCPage::PrintPage( $html );\n }\n else\n {\n print(\"<html><body>$html</body></html>\");\n }\n exit;\n }", "function prepareVariableString($value) {\n\t\t if (!is_array($value)) {\n\t\t return '\"'.addslashes($value).'\"';\n\t\t } else {\n\t\t $str = 'array('.chr(10);\n\t\t foreach ($value as $key => $item) {\n\t\t $str .= '\"'. addslashes($key).'\" => '.'\"'.addslashes($item).'\",'.chr(10);\n\t\t } \n\t\t $str .= \")\";\n\t\t } \n\t\t return $str;\n\t\t}", "function setVariable($v) {\n ecrire_meta('antispam_'.$v, $_POST[$v]);\n}", "function addQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"||\",\"'\",$var);\n\t\t\t$string = str_replace('||||','\"',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "public function setVar($name, $value)\n {\n $this->var_holder->set($name, $value);\n }", "public function debugVar($variable): Debug\n {\n $this->data[] = [\n $variable,\n debug_backtrace(),\n time(),\n ];\n\n return $this;\n }", "public function AddVariables($tid, $var, $name = NULL){\n if(!is_array($var)){\n if(!isset($name)){\n //todo add errors\n return false;\n }\n $var = [$name => $var];\n }\n\n if(isset($this->envir_vars[$tid]) && is_array($this->envir_vars[$tid])){\n $this->envir_vars[$tid] = array_merge($this->envir_vars[$tid], $var);\n }\n else{\n $this->envir_vars[$tid] = $var;\n }\n return true;\n }", "function pagelines_less_var( $name, $value ){\n\t\n\tglobal $less_vars;\n\t\n\t$less_vars[$name] = $value;\n\t\n}" ]
[ "0.7277579", "0.70052963", "0.69426084", "0.69087315", "0.67157096", "0.6575796", "0.6328452", "0.630552", "0.6218417", "0.6175379", "0.61728424", "0.6159056", "0.6143398", "0.6114089", "0.6082139", "0.597812", "0.5973984", "0.5957312", "0.5950839", "0.5941004", "0.59340286", "0.5921548", "0.5886573", "0.5886163", "0.5873666", "0.5868274", "0.58678985", "0.58297426", "0.58242005", "0.5820146", "0.5798404", "0.57697386", "0.5767732", "0.57670397", "0.5753462", "0.57465273", "0.5739277", "0.5711641", "0.5710979", "0.57040536", "0.5698763", "0.56946945", "0.5693242", "0.56829005", "0.56770813", "0.5624718", "0.5621473", "0.5604893", "0.5592272", "0.55814606", "0.55809206", "0.55801296", "0.55751884", "0.557116", "0.5571133", "0.5547244", "0.55280757", "0.55278444", "0.55241156", "0.55196446", "0.5514055", "0.5507065", "0.5503593", "0.55034065", "0.5501933", "0.54596895", "0.5456459", "0.54547167", "0.54546213", "0.5454466", "0.5452973", "0.54496515", "0.5445472", "0.5437482", "0.54366344", "0.5430004", "0.54286814", "0.54230285", "0.5414892", "0.54053336", "0.54028445", "0.5394479", "0.53922135", "0.5391716", "0.5391617", "0.5389313", "0.5375609", "0.5364994", "0.5360903", "0.5339918", "0.5312009", "0.53078485", "0.52985394", "0.52897185", "0.52871704", "0.5279438", "0.5273537", "0.52694035", "0.52639157", "0.52588904" ]
0.6937896
3
Start Timer for testing. Always use with timer_stop() Shows measured Time in Debugoutput. You can alwas only start and stop just 1 time Example : $debug>timer_start('function sortarray'); $array = sortarray($array) $debug>timer_stop('function sortarray');
public function timer_start($caption) { if ($this->mode > 0) { // Diverse Ueberpruefungen, evtl mehrfach start/stop erlauben } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function TimerStart()\r\n\t{\r\n\t\t$parts = explode( \" \", microtime() );\r\n\t\t$this->time_diff = 0;\r\n\t\t$this->time_start = $parts[1].substr( $parts[0],1 );\r\n\t}", "private function startTimer()\n\t{\n\t\t// Keep statistics\n\t\tself::$totalCallCount++;\n\n\t\t// Rough execution time\n\t\t$this->startMicroStamp = microtime(true);\n\t}", "public function start()\n\t{\n\t\t$this->startTimer = microtime(TRUE);\n\t}", "public function startTimer(): void;", "function timer_start()\n {\n }", "protected function startTimer()\r\n\t{\r\n\t\tlist($usec, $sec) = explode(\" \",$this->time);\r\n\t\t$this->startTime = ((float)$usec + (float)$sec);\r\n\t\treturn;\r\n\t}", "function wpf_timer_start( $id = 0 ) {\n\tglobal $wpf_profiler;\n\n\t$mtime = explode( ' ', microtime() );\n\t$wpf_profiler[$id]['start'] = $mtime[1] + $mtime[0];\n\n\treturn true;\n}", "function timer_start(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$this->time_start = $mtime[1] + $mtime[0];\n\t\treturn true;\n\t}", "public function testStart() {\n $timer = new timer( false );\n\n // It should return a starting number\n $this->assertGreaterThan( 0, $timer->start() );\n\t}", "function _timerStart($key){\n\tglobal $_gTimers;\n\n\tif (!$_gTimers) $_gTimers = array();\n\n\tif (empty($_gTimers[$key]))\n\t\t$_gTimers[$key] = array(microtime(true),0, 1);\n\telse{\n\t\t$_gTimers[$key][0] = microtime(true);\n\t\t$_gTimers[$key][2] = 1;\n\t}\n\n\treturn $_gTimers[$key][0];\n}", "function StartTimer() {\n\tglobal $timestart;\n\t$mtime = microtime();\n\t$mtime = explode(\" \",$mtime);\n\t$mtime = $mtime[1] + $mtime[0];\n\t$timestart = $mtime;\n\treturn true;\n}", "public function timer_start()\n {\n }", "public static function timer_start() {\n $mtime = microtime();\n $mtime = explode(' ', $mtime);\n self::$time_start = $mtime[1] + $mtime[0];\n return true;\n }", "function start()\n{\n global $STATE_FILE, $LOG_FILE;\n\n $start_time = time();\n \n // log the timer in STATE_FILE\n $fp = fopen($STATE_FILE, 'w');\n fwrite($fp, $start_time);\n fclose($fp);\n}", "function start(){\n\t\t$this->time_start = $this->microtime_float();\n\t}", "public function benchmarkStart()\n\t{\n\t\t$this->startTime = round(microtime(true) * 1000);\n\t}", "public function start()\n {\n $this->_timeStartInMicroSeconds = microtime(true);\n }", "protected function Start_Timer() {\n\t\tif (!empty($this->timer_name)) \n\t\t{\n\t\t\t$this->Get_Server()->timer->Timer_Start($this->timer_name);\n\t\t}\n\t}", "public static function startTimer( $label = 'default' )\n\t{\n\t\tself::$timer[$label]['start'] = microtime( true );\n\t}", "function clock_start($key = 'main') {\n $time = explode(' ', microtime());\n $start = (float)$time[0] + (float)$time[1];\n $GLOBALS['_clock_'][$key]['start'] = $start;\n return $start;\n }", "public static function timeFunctionStart($name)\n {\n $session = self::getSession();\n\n if (! isset($session->timings, $session->timings[$name])) {\n $session->timings[$name] = array(\n 'count' => 0,\n 'level' => 0,\n 'sum' => 0,\n 'times' => array(),\n );\n }\n $level = $session->timings[$name]['level'];\n\n if (! isset($session->timings[$name]['times'][$level])) {\n $session->timings[$name]['times'][$level] = array('start' => 0, 'count' => 0, 'sum' => 0);\n }\n $session->timings[$name]['times'][$level]['start'] = microtime(true);\n $session->timings[$name]['level']++;\n }", "public function start()\n {\n $this->fStarted = microtime(true);\n $this->iStartMemoryUsage = memory_get_usage();\n }", "private static function startTimer(): bool\n {\n self::$TimerBegin = microtime(true);\n return true;\n }", "public function testGetStart() {\n // It should return an int\n $this->assertGreaterThan( 0, $this->timer->get_start() );\n }", "public function startTimer($name = null) {\n\n //Name Provided?\n if ($name != \"\" && $name != null) {\n $this->name = $name;\n }\n\n $this->time_start = microtime(true);\n static::$number_timers++;\n }", "function timer(){\n static $start;\n\n if (is_null($start))\n {\n $start = microtime(true);\n }\n else\n {\n $diff = round((microtime(true) - $start), 4);\n $start = null;\n return $diff;\n }\n}", "function start() {\n if ($this->isLogging) {\n $this->tStart = gettimeofday();\n $this->tLast = $this->tStart;\n $this->log = \"<h1>Log: \" . $this->name . \"</h1>\\n<pre>Started: \" . gmdate(\"D, d M Y H:i:s T\", $this->tStart['sec']) . \"\\n &#916; Start ; &#916; Last ;\";\n\t\t\t$this->logLine(\"Start\");\n\t\t}\n }", "public static function timer($timer)\n {\n // Starts the timer\n if (!isset(self::$timers[$timer]))\n {\n self::$timers[$timer] = microtime(true);\n\n self::Log('timer', [\n 'action' => 'start',\n 'name' => $timer\n ]);\n }\n // Ends the timer\n else\n {\n self::Log('timer', [\n 'action' => 'stop',\n 'name' => $timer,\n 'elapsed_time' => (microtime(true) - self::$timers[$timer])\n ]);\n\n unset(self::$timers[$timer]);\n }\n }", "function start($event) {\n Timer::setStartTime($event, Timer::getMicroTime());\n }", "function Start($id = null, $microseconds=false ) {\r\n\r\n\t# reset the interval array\r\n\t$this->intervals = array();\r\n\r\n\t# if no $id name is sent call it '~start'\r\n\tif ($id == null) $id = '~start';\r\n\r\n\t# set or clear the microsecond flag\r\n\t$this->microsec = $microseconds;\r\n\r\n\t# make the starting entry in the interval array\r\n\t$this->startTime = false;\r\n\t$this->Interval($id);\r\n\r\n# end function\r\n}", "protected function startTimer()\n {\n try {\n $timer = new Utils_Timer();\n $timer->start('page');\n Zend_Registry::set('timer', $timer);\n } catch (Exception $e) {\n throw new WrappedException('unable to start timer', $e);\n }\n }", "public static function start()\n {\n $start = round(microtime(true) * 1000);\n echo $start . \"\\n\";\n return $start;\n }", "function start();", "function start();", "public function start($id = self::DEFAULT_ID)\n {\n $microtime = false;\n if (self::$enabled) {\n $id = (!$id) ? self::DEFAULT_ID : (string)$id;\n if (isset($this->start[$id])) {\n $this->toss(\n \"Profiling\",\n \"Profiling has already started for identifier '{0}'.\",\n $id\n );\n }\n \n $this->start[$id] = $microtime = microtime(true);\n }\n \n return $microtime;\n }", "public function start_timer() {\n global $USER, $DB;\n $USER->startlesson[$this->properties->id] = true;\n $startlesson = new stdClass;\n $startlesson->lessonid = $this->properties->id;\n $startlesson->userid = $USER->id;\n $startlesson->starttime = time();\n $startlesson->lessontime = time();\n $DB->insert_record('languagelesson_timer', $startlesson);\n if ($this->properties->timed) {\n $this->add_message(get_string('maxtimewarning', 'languagelesson', $this->properties->maxtime), 'center');\n }\n return true;\n }", "function setStartTime($event, $time) {\n Timer::timers($event, array(\n 'start' => $time,\n 'stopped' => false\n ));\n }", "protected function _getSortedTimers() {\n\t\t\t$timers = array();\t\t \n\t\t\tforeach (Varien_Profiler::getTimers() as $name => $timer) {\n\t\t\t\t$sum = number_format(Varien_Profiler::fetch($name, 'sum'), 4);\n\t\t\t\t$count = Varien_Profiler::fetch($name, 'count');\n\t\t\t\t$emalloc = Varien_Profiler::fetch($name, 'emalloc');\n\t\t\t\t$realmem = Varien_Profiler::fetch($name, 'realmem');\n\t\t\t\t \n\t\t\t\t// Filter out entries of little relevance\n\t\t\t\tif ($sum < .0010 && $count < 10 && $emalloc < 10000)\n\t\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t$row = array($name, number_format($sum, 4), $count, number_format($emalloc), number_format($realmem));\n\t\t\t\t$timers[] = $row;\n\t\t\t}\n\t\t\tusort($timers, array($this, '_sortTimers'));\n\t\t\treturn $timers;\n\t\t}", "function start()\n\t{\n\t\tif( ! $this->is_running ){\n\t\t\t$this->is_running = TRUE;\n\t\t\t$this->running_since = self::timeMillisecondsAsFloat();\n\t\t}\n\t}", "protected function startTime()\n {\n return microtime(true);\n }", "function tideways_span_timer_start($span)\n{\n}", "public function resetTimer()\r\n\t{\r\n\t\t$this->last = microtime(true);\r\n\t}", "public static function getStartTime(): float\n {\n return self::$startTimer;\n }", "private function addTimer(array &$request) {\n $request['timer'] = microtime(true); //start time\n $request['time'] = false; //default if not overridden by time later\n }", "function __construct() {\n $this->start_time = microtime(true);\n }", "public function start($start);", "public function testTimeItDefaultsTimeProperly()\n {\n // rounds (10) and run code that takes 1 second to \"run\". It\n // should take roughly 10s to run and, at the end, we should\n // also have proper timings.\n $t = new Timer('sleep(1)');\n\n $start = time();\n $res = $t->timeit();\n $delta = time() - $start;\n\n // Default is 10 rounds\n $this->assertEquals(10, $res[0]);\n\n // This definitely must take 10s or more to run\n $this->assertGreaterThanOrEqual(10, $delta);\n\n // But not too much (unless your computer is very slow)\n $this->assertLessThan(10.5, $delta);\n\n // Each run should take roughly 1s\n $this->assertEquals(1.00, $res[1], '', 0.001);\n\n // The timing string should reflect a precise timing\n $this->assertEquals('1.00s', $res[2]);\n }", "protected function getDebug_StopwatchService()\n {\n return $this->services['debug.stopwatch'] = new \\Symfony\\Component\\Stopwatch\\Stopwatch();\n }", "function stop_timing() {\n $this->time = number_format(microtime(true) - $this->start_time, 3);\n }", "public function start()\n {\n $this->startTime = Carbon::now();\n }", "protected function _initTimer()\n {\n $this->_timer->reset();\n $timeout = $this->_options[self::OPT_FIRST_DIGIT_TIMEOUT];\n $this->_timer->setOptions( array( Streamwide_Engine_Timer_Timeout::OPT_DELAY => $timeout ) );\n }", "public function TimerStop()\r\n\t{\r\n\t\t$parts = explode( \" \", microtime() );\r\n\t\t$time_stop = $parts[1].substr( $parts[0],1 );\r\n\t\t$this->time_diff = ( $time_stop - $this->time_start );\r\n\t\t$this->time_start = 0;\r\n\t}", "private function isStarted($timer = 'default')\r\n\t{\r\n\t\treturn !$this->isStopped($timer) && ! is_null(static::$startedAt[$timer]);\r\n\t}", "public static function set_process_start_time()\n {\n $timer = &self::$timer;\n $session_start = $timer->__set('process_start');\n }", "private function stopTimer()\n\t{\n\t\t// Measure how many seconds it took to execute\n\t\t$this->executionSeconds = microtime(true) - $this->startMicroStamp;\n\n\t\t// Keep statistics\n\t\tself::$totalExecutionSeconds += $this->executionSeconds;\n\t}", "function __construct($start = FALSE)\n\t{\n\t\t$this->is_running = $start;\n\t\t$this->counter = 0;\n\t\tif( $start ){\n\t\t\t$this->running_since = self::timeMillisecondsAsFloat();\n\t\t}\n\t}", "public function testStarted(\\unittest\\TestStart $start) {\n $this->writeStatus($start->test());\n }", "public function start(): void\n {\n $this->startTimer();\n $this->setGameState(SELF::STATE_STARTED);\n }", "public function start($method)\r\n {\r\n $this->reset($method);\r\n if ($this->helper->getConfigValue('BENCHMARK_ENABLE')) {\r\n $this->startTime[$method] = round(microtime(true) * 1000);\r\n $this->logger->info(\"Method: \". $method);\r\n $this->logger->info(\"Start time: \". $this->startTime[$method]);\r\n \\Magento\\Framework\\Profiler::start($method);\r\n }\r\n }", "public function profilerStart()\n {\n if (extension_loaded('xhprof')) {\n include_once($this->xhprofLibPath . 'utils/xhprof_lib.php');\n include_once($this->xhprofLibPath . 'utils/xhprof_runs.php');\n xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);\n }\n }", "public function get_starttime()\n {\n }", "function Chronometer(&$CHRONO_STARTTIME)\n {\n $now = (float) array_sum( explode(' ', microtime()) );\n \n if(isset($CHRONO_STARTTIME['running']))\n {\n if($CHRONO_STARTTIME['running'])\n {\n /* Stop the chronometer : return the amount of time since it was started,\n in ms with a precision of 4 decimal places.\n We could factor the multiplication by 1000 (which converts seconds\n into milliseconds) to save memory, but considering that floats can\n reach e+308 but only carry 14 decimals, this is certainly more precise */\n \n $CHRONO_STARTTIME['elapsed'] += round($now - $CHRONO_STARTTIME['temp'], 4);\n $CHRONO_STARTTIME['running'] = false;\n\n \n return number_format($CHRONO_STARTTIME['elapsed'],4);\n }\n else\n {\n $CHRONO_STARTTIME['running'] = true;\n $CHRONO_STARTTIME['temp'] = $now;\n }\n }\n else\n {\n // Start the chronometer : save the starting time\n \n $CHRONO_STARTTIME = array();\n $CHRONO_STARTTIME['running'] = true;\n $CHRONO_STARTTIME['elapsed'] = 0;\n $CHRONO_STARTTIME['temp'] = $now;\n }\n }", "function wpf_timer_stop( $id = 0, $echo = 0, $precision = 3 ) { // if called like timer_stop(1), will echo $timetotal\n\tglobal $wpf_profiler;\n\n\tif ( !isset($wpf_profiler[$id]) )\n\t\treturn false;\n\n\t$mtime = microtime();\n\t$mtime = explode( ' ', $mtime );\n\t$wpf_profiler[$id]['stop'] = $mtime[1] + $mtime[0];\n\t$total = $wpf_profiler[$id]['stop'] - $wpf_profiler[$id]['start'];\n\n\t$wpf_profiler[$id]['total'] = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $total, $precision ) : number_format( $total, $precision );\n\n\treturn ( $echo ) ? print $wpf_profiler[$id]['total'] : $wpf_profiler[$id]['total'];\n}", "public function testGetStop() {\n // Stop the timer\n $this->timer->stop();\n\n // It should return an int\n $this->assertGreaterThan( $this->timer->get_start(), $this->timer->get_stop() );\n }", "public function timerEvent()\n {\n echo 'timer is triggered',\"\\n\";\n }", "function timer_stop(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$time_end = $mtime[1] + $mtime[0];\n\t\t$time_total = $time_end - $this->time_start;\n\t\treturn $time_total;\n\t}", "private static function microtimeStart(string $label): void\n {\n if (self::$status[$label]) {\n self::$microtimeStart[$label] = microtime(true);\n }\n }", "public function testBenchmarkStart(): void\n {\n $this->logger->benchmarkStart($this->benchmark->reveal());\n $display = $this->output->fetch();\n $this->assertStringContainsString('BenchmarkTest', $display);\n $this->assertStringContainsString('#1 benchSubject', $display);\n }", "public function start(int $start): void;", "protected function resetStartTime() : void\n {\n $this->startTime = time();\n }", "public function start($name) {\n $this->marks[$name]['start'] = microtime();\n }", "function GetExecutionTime($start) \r\n{\r\n\t//return sprintf('%1.6f', (microtime(true) - $start)) . ' sec';\r\n\treturn (microtime(true) - $start) . ' sec';\r\n}", "public function getStart();", "public function getStart();", "public static function init_timer()\n {\n if (!isset(self::$timer)) {\n $time_now = self::get_miliseconds_now();\n self::$timer = new TimerModel($time_now);\n }\n }", "public function stopTimer($timer_name)\r\n\t{\r\n\r\n\t\tif (isset($this->times[$timer_name]))\r\n\t\t{\r\n\t\t\t$stop_time = microtime();\r\n\r\n\t\t\t$elapsed_time = number_format(((substr($stop_time, 0, 9) + substr($stop_time, -10))\r\n\t\t\t\t\t\t\t\t- (substr($this->times[$timer_name], 0, 9))\r\n\t\t\t\t\t\t\t\t\t- (substr($this->times[$timer_name], -10))), 4);\r\n\r\n\t\t\t$log_text = \"Elapsed time for [\" . $timer_name . \"] is \" . $elapsed_time . \" seconds.\";\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$log_text = \"Elapsed time for [\" . $timer_name . \"] has no start time.\";\r\n\t\t}\r\n\r\n\t\tECash::getLog()->write($log_text, LOG_INFO);\r\n\t}", "public function testStop() {\n // It should return the elapse timed (not testing yet)\n $this->assertGreaterThan( 0, $this->timer->stop() );\n }", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "function timer()\n {\n return hrtime(true);\n }", "static function ts(){\r\n $dt = microtime(true) - self::$starttime;\r\n return self::mtformat($dt);\r\n }", "public static function getStartTime() : float\n {\n if (!isset(static::$startTime)) {\n static::$startTime = microtime(true);\n }//end if\n \n return static::$startTime;\n \n }", "public function getStartedTimer()\n {\n $timer = new StopwatchTimer($this->stopwatch, sprintf('Contentful fetch #%u', $this->timerCount), $this->stopwatchCategory, $this->stopwatchSection);\n $timer->start();\n $this->timerCount++;\n\n return $timer;\n }", "public function start($start = null)\n {\n // TODO: Implement start() method.\n }", "function e107_db_debug() {\n\t\tglobal $eTimingStart;\n\n\t\t$this->aTimeMarks[0]=array(\n\t\t'Index' => 0,\n\t\t'What' => 'Start',\n\t\t'%Time' => 0,\n\t\t'%DB Time' => 0,\n\t\t'%DB Count' => 0,\n\t\t'Time' => ($eTimingStart),\n\t\t'DB Time' => 0,\n\t\t'DB Count' => 0\n\t\t);\n\t\t\n\t\tregister_shutdown_function('e107_debug_shutdown');\n\t}", "function start() {\n\t\tif ($this->Time->hasAny(\"Time.user_id = '\" . $this->userid . \"' AND Time.stop = '0000-00-00 00:00:00'\")) {\n\t\t\t$this->flash('Du arbeitest doch schon', '/times/index');\n\t\t\texit();\n\t\t}\n\n\t\t$this->request->data['Time']['user_id'] = $this->userid;\n\t\t$this->request->data['Time']['start'] = date('Y-m-d H:i:s');\n\t\t$this->request->data['Time']['break'] = 0;\n\n\t\tif ($this->Time->save($this->request->data)) {\n\t\t\t$this->Session->setFlash('Started, Wohoo!', 'message_ok');\n\t\t\t$this->redirect('/times/index');\n\t\t} else {\n\t\t\t$this->Session->setFlash('Please correct errors below.', 'message_error');\n\t\t\t$this->set('users', $this->Time->User->find('list'));\n\t\t\t$this->set('customers', $this->Time->Customer->find('list'));\n\t\t\t$this->redirect('/times/index');\n\t\t}\n\t}", "function print_result_time($sorted_array, $time){\n echo(\"#################################\\n\");\n echo(\"The result is :\\n\");\n print_r($sorted_array);\n echo(\"Execution time in micro seconds : \".\n number_format($time,7,',',' ').\" \\n\");\n echo(\"#################################\\n\");\n}", "public function stop(){\n if($this->_id) $this->times[$this->_id] += microtime(true) - $this->_start;\n $this->_id = null;\n }", "public function run()\n {\n echo \"I'am run slowly <br>\";\n }", "public function start(): void;" ]
[ "0.7169932", "0.7110787", "0.70714813", "0.6834806", "0.67838806", "0.67684776", "0.6750531", "0.6725733", "0.6696337", "0.6619819", "0.66016674", "0.6587044", "0.65586686", "0.6497687", "0.6481512", "0.63813704", "0.62632734", "0.6177165", "0.6128935", "0.6113963", "0.61123526", "0.60345584", "0.5907513", "0.5904163", "0.58734787", "0.58706737", "0.5789978", "0.57569987", "0.5756407", "0.57143617", "0.566983", "0.56621873", "0.5628894", "0.5628894", "0.55549794", "0.55505764", "0.549118", "0.54866546", "0.5450292", "0.54422575", "0.5393301", "0.53888977", "0.5361798", "0.53520936", "0.5338432", "0.53318155", "0.5321108", "0.52861536", "0.52775145", "0.5271759", "0.5233243", "0.521566", "0.52116203", "0.5211512", "0.5201", "0.5200006", "0.5136903", "0.51357186", "0.5133345", "0.51248854", "0.51192", "0.5109138", "0.51022816", "0.50878817", "0.5078712", "0.50727916", "0.505152", "0.5050956", "0.50334024", "0.50205415", "0.5019492", "0.5011038", "0.5007626", "0.5007626", "0.49851513", "0.49758506", "0.4972135", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49717292", "0.49692237", "0.496873", "0.49651384", "0.49488738", "0.49391514", "0.49337536", "0.4931825", "0.49182394", "0.491604", "0.49085748", "0.48985642" ]
0.54918045
36
Stop Timer for testing. Always use with timer_start() For Instructions see timer_start())
public function timer_stop($caption) { if ($this->mode > 0) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function timer_stop()\n {\n }", "private function stopTimer()\n\t{\n\t\t// Measure how many seconds it took to execute\n\t\t$this->executionSeconds = microtime(true) - $this->startMicroStamp;\n\n\t\t// Keep statistics\n\t\tself::$totalExecutionSeconds += $this->executionSeconds;\n\t}", "static function stopTimer() {\n if(self::$timer) {\n self::$timer->cancel();\n self::$timer = null;\n }\n }", "public function testStop() {\n // It should return the elapse timed (not testing yet)\n $this->assertGreaterThan( 0, $this->timer->stop() );\n }", "protected function Stop_Timer() {\n\t\tif (!empty($this->timer_name)) \n\t\t{\n\t\t\t$this->Get_Server()->timer->Timer_Stop($this->timer_name);\n\t\t}\n\t}", "public function TimerStop()\r\n\t{\r\n\t\t$parts = explode( \" \", microtime() );\r\n\t\t$time_stop = $parts[1].substr( $parts[0],1 );\r\n\t\t$this->time_diff = ( $time_stop - $this->time_start );\r\n\t\t$this->time_start = 0;\r\n\t}", "public function stop_timer() {\n global $USER, $DB;\n unset($USER->startlesson[$this->properties->id]);\n return $this->update_timer(false, false);\n }", "public function testGetStop() {\n // Stop the timer\n $this->timer->stop();\n\n // It should return an int\n $this->assertGreaterThan( $this->timer->get_start(), $this->timer->get_stop() );\n }", "public function stop()\n {\n $this->_timeStopInMicroSeconds = microtime(true);\n }", "public function cancelTimer($timer): void;", "function timer_stop(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$time_end = $mtime[1] + $mtime[0];\n\t\t$time_total = $time_end - $this->time_start;\n\t\treturn $time_total;\n\t}", "function stop_timing() {\n $this->time = number_format(microtime(true) - $this->start_time, 3);\n }", "public static function timer_stop() {\n $mtime = microtime();\n $mtime = explode(' ', $mtime);\n $time_end = $mtime[1] + $mtime[0];\n $time_total = $time_end - self::$time_start;\n return $time_total;\n }", "function tideways_span_timer_stop($span)\n{\n}", "public static function stop()\n {\n self::$executionTime = round(abs(microtime(true) - $_ENV['W']['START_TIME']) * 1000, 0);\n }", "public function stop(){\n if($this->_id) $this->times[$this->_id] += microtime(true) - $this->_start;\n $this->_id = null;\n }", "function timer_stop($display = 0, $precision = 3)\n {\n }", "public function cancel(Timer $timer);", "public static function stop()\n {\n if (self::$_sessionBenchmarkOn) {\n self::$_sessionBenchmarkFinish = microtime(TRUE);\n }\n }", "public function stopTimer($timer_name)\r\n\t{\r\n\r\n\t\tif (isset($this->times[$timer_name]))\r\n\t\t{\r\n\t\t\t$stop_time = microtime();\r\n\r\n\t\t\t$elapsed_time = number_format(((substr($stop_time, 0, 9) + substr($stop_time, -10))\r\n\t\t\t\t\t\t\t\t- (substr($this->times[$timer_name], 0, 9))\r\n\t\t\t\t\t\t\t\t\t- (substr($this->times[$timer_name], -10))), 4);\r\n\r\n\t\t\t$log_text = \"Elapsed time for [\" . $timer_name . \"] is \" . $elapsed_time . \" seconds.\";\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$log_text = \"Elapsed time for [\" . $timer_name . \"] has no start time.\";\r\n\t\t}\r\n\r\n\t\tECash::getLog()->write($log_text, LOG_INFO);\r\n\t}", "public function stop(): void\n {\n $this->end = microtime(true);\n }", "function wpf_timer_stop( $id = 0, $echo = 0, $precision = 3 ) { // if called like timer_stop(1), will echo $timetotal\n\tglobal $wpf_profiler;\n\n\tif ( !isset($wpf_profiler[$id]) )\n\t\treturn false;\n\n\t$mtime = microtime();\n\t$mtime = explode( ' ', $mtime );\n\t$wpf_profiler[$id]['stop'] = $mtime[1] + $mtime[0];\n\t$total = $wpf_profiler[$id]['stop'] - $wpf_profiler[$id]['start'];\n\n\t$wpf_profiler[$id]['total'] = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $total, $precision ) : number_format( $total, $precision );\n\n\treturn ( $echo ) ? print $wpf_profiler[$id]['total'] : $wpf_profiler[$id]['total'];\n}", "public function resetTimer()\r\n\t{\r\n\t\t$this->last = microtime(true);\r\n\t}", "private static function stopTimer(): float\n {\n return (float)(microtime(true) - self::$TimerBegin);\n }", "public function endTimer() {\n $this->time_end = microtime(true);\n $this->time = number_format(($this->time_end - $this->time_start), 5);\n static::$total_exec += $this->time;\n }", "public function delTimer(): bool {}", "public function stopTime(){\n\t\treturn disposeTime();\n\t}", "public static function stop()\n {\n if (self::$time === null) {\n throw new \\Exception('The timer is not started');\n }\n\n $elapsedTime = microtime(true) - self::$time;\n\n self::$time = null;\n\n return $elapsedTime;\n }", "function stop(){\n\t\tif($this->time_end==0){\n\t\t\t $this->time_end = $this->microtime_float();\n\t\t\t $this->time_spend = $this->time_end - $this->time_start;\n\t\t}\n\t}", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "function stop()\n{\n global $STATE_FILE, $LOG_FILE, $NOT_RUNNING_STATE;\n\n $stop_time = time();\n \n // get the start time from STATE_FILE\n $start_time = file_get_contents($STATE_FILE);\n $duration = $stop_time - $start_time;\n \n // log the timer in STATE_FILE\n $start_time = file_get_contents($STATE_FILE);\n $fp = fopen($STATE_FILE, 'w');\n fwrite($fp, $NOT_RUNNING_STATE);\n fclose($fp);\n \n // log the timer in LOG_FILE\n $file_contents = file_get_contents($LOG_FILE);\n $size = filesize($LOG_FILE);\n $fp = fopen($LOG_FILE, 'w');\n if($size > 1)\n {\n fwrite($fp, $file_contents . 'start:' . $start_time . ' stop:' . $stop_time . ' duration:' . $duration . ' week:' . date('W') . '\\n');\n }\n else\n {\n fwrite($fp, 'start:' . $start_time . ' stop:' . $stop_time . ' duration:' . $duration . ' week:' . date('W') . \"\\n\");\n }\n fclose($fp);\n}", "public static function stop()\n {\n }", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public static function stop()\n {\n $stop = round(microtime(true) * 1000);\n echo $stop . \"\\n\";\n return $stop;\n }", "function stop()\n\t{\n\t\tif( $this->is_running ){\n\t\t\t$this->counter += (int) (self::timeMillisecondsAsFloat() - $this->running_since + 0.5);\n\t\t\t$this->is_running = FALSE;\n\t\t}\n\t}", "Public function end()\n\t{\n\t\t$this->endTimer = microtime(TRUE);\n\t}", "abstract public function stop();", "public function stop() {}", "function stop();", "public function stop()\n {\n // nop\n }", "public static function stopTimer($name)\n {\n static::$debugger->stopTimer(\"g5_{$name}\");\n\n return static::instance();\n }", "public function stop()\n {\n if(null !== $this->fEnd)\n {\n throw new \\Exception('stop time is already set');\n }\n $this->iEndMemoryUsage = memory_get_usage();\n $this->fEnd = microtime(true);\n }", "public static function timeFunctionStop($name)\n {\n $session = self::getSession();\n\n if (isset($session->timings[$name])) {\n $level = $session->timings[$name]['level'] - 1;\n\n if (isset($session->timings[$name]['times'][$level]['start'])) {\n $time = microtime(true) - $session->timings[$name]['times'][$level]['start'];\n\n $session->timings[$name]['times'][$level]['start'] = null;\n $session->timings[$name]['times'][$level]['count']++;\n $session->timings[$name]['times'][$level]['sum'] += $time;\n\n $session->timings[$name]['count']++;\n $session->timings[$name]['level']--;\n $session->timings[$name]['sum'] += $time;\n } else {\n self::r(\"To many stop timing calls for $name at $level.\");\n }\n } else {\n self::r(\"Unknown stop timing call for $name.\");\n }\n }", "public function stop()\n {\n }", "public function stopTimer($id)\n {\n $timer = Timer::find($id);\n $timer->stopped_at = new Carbon();\n $timer->total_time = (new Carbon($timer->started_at))->diffInSeconds(new Carbon($timer->stopped_at));\n $timer->save();\n return redirect()->route('tasks.index');\n }", "public function stop()\r\n {\r\n\r\n }", "public function onStop();", "public function stop()\n {\n }", "public static function timer($timer)\n {\n // Starts the timer\n if (!isset(self::$timers[$timer]))\n {\n self::$timers[$timer] = microtime(true);\n\n self::Log('timer', [\n 'action' => 'start',\n 'name' => $timer\n ]);\n }\n // Ends the timer\n else\n {\n self::Log('timer', [\n 'action' => 'stop',\n 'name' => $timer,\n 'elapsed_time' => (microtime(true) - self::$timers[$timer])\n ]);\n\n unset(self::$timers[$timer]);\n }\n }", "public function stop() {\n\t\t$this->invoke(\"stop\");\n\t}", "public function pause(Timer $timer);", "public function profilerStop()\n {\n if (extension_loaded('xhprof')) {\n $xhprofData = xhprof_disable();\n $xhprofRuns = new XHProfRuns_Default();\n $runId = $xhprofRuns->save_run($xhprofData, $this->xhprofNamespace);\n $profilerUrl = sprintf($this->xhprofHtmlPath . 'index.php?run=%s&source=%s', $runId, $this->xhprofNamespace);\n $styles = ' style=\"display: block; position: absolute; left: 5px; bottom: 5px; background: red; padding: 8px; z-index: 10000; color: #fff;\"';\n echo '<a href=\"' . $profilerUrl . '\" target=\"_blank\" ' . $styles . '>Profiler output</a>';\n }\n }", "public function stop()\n {\n $this->mark('__stop');\n }", "public function stop()\n {\n\n }", "public static function stopAll () {\n\t\tforeach (self::$timeArray as $label => $value)\n\t\t\tself::stop ($label);\n\t}", "public function stop()\n {\n if (!$this->isOn) {\n return;\n }\n\n $this->dataset[$this->namespace] = xhprof_disable();\n $this->isOn = false;\n }", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "private function finishTimer()\n {\n if (!$this->activeCalls && !count($this->queue) && $this->timer) {\n $this->loop->cancelTimer($this->timer);\n // Don't use unset(), it completely removes property from the object!\n $this->timer = null;\n }\n }", "public function startTimer(): void;", "public function stop()\n {\n // TODO: Implement stop() method.\n }", "public function stop()\n {\n $this->gamerounds[] = $this->roundsum;\n $this->roundsum = 0;\n $this->dice->reset();\n }", "function loggy_stop($name = 'Measurement')\n {\n return Loggy::stopMeasurement($name);\n }", "public function Destroy() \n\t{\n\t\tparent::Destroy();\n\t\t$this->SetTimerInterval(\"Timer_1\", 0);\n\t}", "public function stop(): bool {}", "function stop() {\n $this->endMicrotime = microtime(true);\n return $this;\n }", "public function stop()\n\t{\n\t\t$this->data->directSet(\"state\", self::STATE_STOPPED);\n\t}", "public function stop()\n {\n // Put your code here;\n }", "function timer_start()\n {\n }", "private static function microtimeStop(string $label): void\n {\n if (self::$status[$label]) {\n self::$microtimeStop[$label] = microtime(true);\n }\n }", "private function isStopped($timer = 'default')\r\n\t{\r\n\t\treturn ! is_null(static::$stoppedAt[$timer]);\r\n\t}", "public function resume(Timer $timer);", "public function stop()\n {\n $this->loop->stop();\n }", "public function abort() {\n\t\t$this->timer->abortEvent( $this );\n\t}", "public function stop() {\n $this->stoppedAt = microtime(true);\n return $this;\n }", "public function stop()\n {\n die;\n }", "public function stop($id = self::DEFAULT_ID, $display = true)\n {\n $stopped = microtime(true);\n $microtime = false;\n if (self::$enabled) {\n if (is_bool($id)) {\n $display = $id;\n $id = self::DEFAULT_ID;\n }\n $id = (!$id) ? self::DEFAULT_ID : (string)$id;\n if (!isset($this->start[$id])) {\n $this->toss(\n \"Profiling\",\n \"{me}::stop({0}) called without calling {me}::start({0}) first.\",\n $id\n );\n }\n \n $microtime = $stopped - $this->start[$id];\n unset($this->start[$id]);\n $message = sprintf(\n \"Time for profile '%s': %F\",\n $id,\n $microtime\n );\n $this->logger->info($message);\n if ($display) {\n echo $message, PHP_EOL;\n }\n }\n \n return $microtime;\n }", "public function stop()\n {\n $className = str_replace(__NAMESPACE__ . '\\\\', '', get_called_class());\n\n if (!$this->started) {\n return;\n }\n\n $this->destroy();\n $this->started = false;\n Log::d($className . ' stopped.');\n }", "public function tearDown()\n {\n $this->stop();\n }", "public function stop($name)\n {\n if ((isset($this->timersBag[$name])) && (isset($this->timersBag[$name][0]))) {\n $ds = array_shift($this->timersBag[$name]);\n $ds[\"time\"] = ($this->getMicrotime() - $ds[\"time\"])*1000;\n $this->storeInterface->storeLog($ds[\"time\"], $name, $ds[\"tag\"], $ds[\"version\"]);\n }\n\n }", "public function stop($id);", "function Stop($id = null) {\r\n\r\n\t# if no $id name is sent call it '~stopped'\r\n\tif ($id == null) $id = '~stopped';\r\n\r\n\t# enter a stop interval time\r\n\t$this->Interval($id);\r\n\r\n\t# sum all intervals\r\n\t$tot = 0;\r\n\tforeach ($this->intervals as $t) $tot += $t;\r\n\r\n\t# make a total time entry in the array\r\n\t$this->AddInterval(\"~total time\", $tot);\r\n\r\n\t# return the complete array\r\n\treturn $this->AllIntervals();\r\n\r\n# end function\r\n}", "protected function tearDown()\n {\n $this->clock = NULL;\n }", "public function testStart() {\n $timer = new timer( false );\n\n // It should return a starting number\n $this->assertGreaterThan( 0, $timer->start() );\n\t}", "function smallreset()\r\n{\r\n\tstart();\r\n\tstop();\r\n}", "public function stop($hook)\n {\n $time = microtime(true) - $hook['time'];\n\n // Общее время выполнения хука\n self::$hook_statistics[$hook['hook_name']]['time'] += $time;\n\n // Время выполнения точки\n if (!empty(self::$hook_statistics[$hook['hook_name']]['points'])) {\n $key = array_search($hook['point'], self::$hook_statistics[$hook['hook_name']]['points']);\n if ($key !== false) {\n self::$hook_statistics[$hook['hook_name']]['points_count'][$key]['time'] += $time;\n }\n }\n\n // Время выполнения вызова\n $caller_id = $hook['caller']['type'] . '-' . $hook['caller']['value'];\n if (!empty(self::$hook_statistics[$hook['hook_name']]['caller'][$caller_id])) {\n self::$hook_statistics[$hook['hook_name']]['caller'][$caller_id]['time'] += $time;\n self::$hook_statistics[$hook['hook_name']]['caller'][$caller_id]['calls'][$hook['point']][$hook['caller']['call_id']]['time'] += $time;\n }\n }", "function stopSurvey() {\n $this->autoRender = false;\n $type = ($this->Session->check('Survey.type')) ? $this->Session->read('Survey.type') : ''; // the type of survey being taken 'test' or 'user'\n $this->__clearEditSession(CLEAR_SURVEY); // delete the temporary session values associated with the survey\n switch ($type) {\n case 'test':\n $this->redirect(array('action' => 'index'));\n break;\n }\n $this->render('/Pages/stopped', 'survey');\n }", "public function noScript(string $url, int $timer = 0): void {\n echo \"<meta http-equiv=\\\"refresh\\\" content=\\\"{$timer};url={$url}\\\">\";\n }", "protected function _initTimer()\n {\n $this->_timer->reset();\n $timeout = $this->_options[self::OPT_FIRST_DIGIT_TIMEOUT];\n $this->_timer->setOptions( array( Streamwide_Engine_Timer_Timeout::OPT_DELAY => $timeout ) );\n }", "function stop ()\n{\n file_put_contents(config::CLIENT_BASE_DIR . '/act', 'idle');\n die();\n}" ]
[ "0.82626957", "0.80462563", "0.78904265", "0.78618807", "0.7822159", "0.78121567", "0.7329327", "0.72824585", "0.70958775", "0.7091259", "0.70744187", "0.69915396", "0.69699484", "0.6964881", "0.69547135", "0.69398564", "0.69155574", "0.68391716", "0.6802124", "0.6799462", "0.67861044", "0.66912186", "0.6679073", "0.664166", "0.66400003", "0.6583732", "0.64347416", "0.6408253", "0.6376141", "0.6370342", "0.6370342", "0.6370342", "0.6370342", "0.6370342", "0.635122", "0.6329401", "0.6320628", "0.6320628", "0.6320628", "0.6320628", "0.6320628", "0.6320628", "0.6320628", "0.6320628", "0.6313447", "0.63129085", "0.6305934", "0.6287436", "0.62699383", "0.62472904", "0.61427927", "0.60947543", "0.6087738", "0.60421705", "0.6032488", "0.6025805", "0.6024929", "0.60180235", "0.60082906", "0.59836197", "0.5982936", "0.5975373", "0.59527546", "0.59318817", "0.5894883", "0.5875037", "0.58661985", "0.58655685", "0.58534926", "0.5844183", "0.58269083", "0.5820609", "0.58202547", "0.5803757", "0.57913226", "0.5776951", "0.5758307", "0.5758083", "0.5693836", "0.56811243", "0.5663178", "0.5651769", "0.5634291", "0.56147546", "0.5604277", "0.55875576", "0.55773205", "0.55552644", "0.55381274", "0.5537029", "0.5535076", "0.55201656", "0.55118096", "0.5504463", "0.55006963", "0.5487692", "0.547528", "0.5473953", "0.54538095", "0.5442308" ]
0.6793159
20
Start Timer for Querys. Always use with query_stop()
public function query_start($query) { if (($this->mode > 0) and (!$this->sql_query_running)) { $this->sql_query_running = true; $this->sql_query_start = microtime(true); $this->sql_query_string = $query; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function queryStop()\n\t{\n\t\tif (static::isEnabled(static::DB_BENCHMARK))\n\t\t{\n\t\t\tstatic::$_query['time'] = microtime(true) - static::$_query['time'];\n\t\t\tstatic::$_queries[] = static::$_query;\n\t\t}\n\t}", "private function startTimer()\n\t{\n\t\t// Keep statistics\n\t\tself::$totalCallCount++;\n\n\t\t// Rough execution time\n\t\t$this->startMicroStamp = microtime(true);\n\t}", "public function stopQuery() : void\n {\n if ($_ENV['LOGGER_SQL'] === 'true') {\n \n // Logger.\n static::$logger->trace('EXECUTION TIME (in seconds):');\n static::$logger->trace(number_format(microtime(true) - $this->start, 4));\n static::$logger->trace('***************************************************************************');\n \n }//end if\n \n }", "function devlyQueries() {\n\t\n\techo 'ran ' . get_num_queries() . ' queries in ' . timer_stop(1) . ' seconds';\n\t\n}", "public function start()\n\t{\n\t\t$this->startTimer = microtime(TRUE);\n\t}", "public function stopQuery()\n {\n }", "function timequery() {\n static $querytime_begin;\n list($usec, $sec) = explode(' ', microtime());\n\n if (!isset($querytime_begin)) {\n $querytime_begin = ((float) $usec + (float) $sec);\n } else {\n $querytime = (((float) $usec + (float) $sec)) - $querytime_begin;\n echo sprintf('<br />La consulta tardó %01.5f segundos.- <br />', $querytime);\n }\n}", "protected function Start_Timer() {\n\t\tif (!empty($this->timer_name)) \n\t\t{\n\t\t\t$this->Get_Server()->timer->Timer_Start($this->timer_name);\n\t\t}\n\t}", "public function timer_start()\n {\n }", "public static function queryStart($dbname, $sql, $bindings)\n\t{\n\t\tif (static::isEnabled(static::DB_BENCHMARK))\n\t\t{\n\t\t\tstatic::$_query = array(\n\t\t\t\t'dbname' => $dbname,\n\t\t\t\t'sql' => $sql,\n\t\t\t\t'bindings' => $bindings,\n\t\t\t\t'time' => microtime(true),\n\t\t\t);\n\t\t}\n\t}", "public static function enableQueryLog()\n {\n }", "public function query($query, $time = 0)\n\t{\n\t\t$this->queries[] = compact('query', 'time');\n\t}", "public function enableQueryLog()\n {\n $this->loggingQueries = true;\n }", "function start(){\n\t\t$this->time_start = $this->microtime_float();\n\t}", "protected function startTimer()\r\n\t{\r\n\t\tlist($usec, $sec) = explode(\" \",$this->time);\r\n\t\t$this->startTime = ((float)$usec + (float)$sec);\r\n\t\treturn;\r\n\t}", "public function startTimer(): void;", "public function TimerStart()\r\n\t{\r\n\t\t$parts = explode( \" \", microtime() );\r\n\t\t$this->time_diff = 0;\r\n\t\t$this->time_start = $parts[1].substr( $parts[0],1 );\r\n\t}", "public function run()\n {\n DB::disableQueryLog();\n parent::run();\n }", "public static function flushQueryLog()\n {\n }", "function timer_start()\n {\n }", "public function clearQueries();", "function query($query_string)\n\t{\n\t\t$starttime = $starttime = explode(' ', microtime());\n\t\t$starttime = $starttime[1] + $starttime[0];\t\n\t\t\n\t\t$result = mysql_query($query_string, $this->conn) or $this->error(mysql_error(), __LINE__, __FILE__, $query_string);\n\t\t\n\t\t$endtime = explode(' ',microtime());\n\t\t$endtime = $endtime[1] + $endtime[0];\n\t\t$totaltime = $endtime - $starttime;\n\t\t\n\t\t$this->runtimes += $totaltime;\n\t\t$this->queries++;\n\t\t$this->query_debug .= round($totaltime, 5).': '.$query_string.'<br>';\n\t\t\n\t\treturn $result;\n\t}", "function RunQueries()\n\t{\n\t\tBenchmark::getInstance()->timingStart( 'search' );\n\n\t\t$answer = self::$instance->RunQueries();\n\n\t\t$query_time = Benchmark::getInstance()->timingCurrentToRegistry( 'search' );\n\n\t\tRegistry::push( 'searches', $answer );\n\n\t\treturn $answer;\n\t}", "public static function disableQueryLog()\n {\n }", "public function clearQueries(): void\n {\n $this->queries = [];\n }", "function tampilstartup($limit, $start){\n $query = $this->db->get('tbl_startup', $limit, $start);\n return $query;\n }", "public function updateQueryTime()\n\t{\n\t\t$this->setLastQueryTime(time());\n\t\t$this->save();\n\t}", "public function start()\n {\n $this->_timeStartInMicroSeconds = microtime(true);\n }", "function e107_db_debug() {\n\t\tglobal $eTimingStart;\n\n\t\t$this->aTimeMarks[0]=array(\n\t\t'Index' => 0,\n\t\t'What' => 'Start',\n\t\t'%Time' => 0,\n\t\t'%DB Time' => 0,\n\t\t'%DB Count' => 0,\n\t\t'Time' => ($eTimingStart),\n\t\t'DB Time' => 0,\n\t\t'DB Count' => 0\n\t\t);\n\t\t\n\t\tregister_shutdown_function('e107_debug_shutdown');\n\t}", "function addQuery() {}", "function basey_query_load_time() {\n\n\tif (current_user_can( 'manage_options' )) { ?>\n\t\t<div class=\"uk-container uk-margin-bottom\">\n\t\t\t<div class=\"uk-panel uk-panel-box\">\n\t\t\t\t<strong><?php echo get_num_queries(); ?></strong> queries in <strong><?php timer_stop(1); ?></strong> seconds\n\t\t\t</div>\n\t\t</div>\n\t<?php }\n}", "public static function resetQueryCount() {\n \tself::$queryCount = 0;\n }", "public function startQuery($sql, array|null $params = null, array|null $types = null) : void\n {\n // Get logger.\n if (empty(static::$logger)) {\n \n // Set logger.\n static::$logger = Logger::getRootLogger();\n \n }//end if\n \n if ($_ENV['LOGGER_SQL'] === 'true') {\n\n // Logger.\n static::$logger->trace('***************************************************************************');\n static::$logger->trace('SQL QUERY:');\n static::$logger->trace($sql);\n \n if (!empty($params)) {\n \n // Logger.\n static::$logger->trace('SQL PARAMETERS:');\n \n foreach ($params as $key => $param) {\n \n $keyAux = $key + 1;\n\n if ($param instanceof \\DateTime) {\n \n $formattedDate = $param->format('Y-m-d H:i:s');\n\n // Logger.\n static::$logger->trace(\"P$keyAux --> $formattedDate\");\n\n } else {\n \n // Logger.\n static::$logger->trace(\"P$keyAux --> $param\");\n \n }//end if\n \n }//end foreach\n \n }//end if\n \n // Set start time.\n $this->start = microtime(true);\n \n }//end if\n \n }", "private function initQuery()\n {\n // reset\n $this->result = false;\n \n $this->errorCode = 0;\n $this->errorMessage = '';\n }", "public function scopeStarted($query) {\n $query->where('start_date', '<=', Carbon::now());\n }", "function database_log_stats()\n {\n $query_timer_start = getmicrotime();\n \n // DO STUFF\n $time = time();\n $do_insert = FALSE;\n $insert_query = \"\n INSERT INTO se_debug_querylog\n (\n debug_querylog_query,\n debug_querylog_queryhash,\n debug_querylog_querylocation,\n debug_querylog_benchmark,\n debug_querylog_backtrace,\n debug_querylog_result,\n debug_querylog_count,\n debug_querylog_error,\n debug_querylog_time\n )\n VALUES\n \";\n \n foreach( $this->log_data as $log_index=>$log_data )\n {\n // LOG SINGLE QUERY\n if( $do_insert ) $insert_query .= \", \";\n \n $query_location = substr($log_data['backtrace'][0]['file_short'].\" [\".$log_data['backtrace'][0]['line'].\"]\", 0, 254);\n \n $insert_query .= \"(\n '\".$this->database_real_escape_string($log_data['query']).\"',\n '{$log_data['query_hash']}',\n '{$query_location}',\n '{$log_data['time']}',\n '', /* TODO */\n '\".( $log_data['result'] ? '1' : '0' ).\"',\n '{$log_data['count']}',\n '\".$this->database_real_escape_string($log_data['error']).\"',\n '{$time}'\n )\";\n \n $do_insert = TRUE;\n \n // LOG STATS\n $sql = \"\n INSERT INTO se_debug_querystats\n (\n debug_querystats_query_hash,\n debug_querystats_query_location,\n debug_querystats_query,\n debug_querystats_count,\n debug_querystats_count_failed,\n debug_querystats_count_slow,\n debug_querystats_time_total,\n debug_querystats_time_avg\n )\n VALUES\n (\n '{$log_data['query_hash']}',\n '{$query_location}',\n '\".$this->database_real_escape_string($log_data['query']).\"',\n '1',\n '\".( !$log_data['result'] ? '1' : '0' ).\"',\n '\".( $log_data['time']>$this->log_slow_threshold ? '1' : '0' ).\"',\n '{$log_data['time']}',\n '{$log_data['time']}'\n )\n ON DUPLICATE KEY UPDATE\n debug_querystats_count=debug_querystats_count+1,\n debug_querystats_count_failed=debug_querystats_count_failed+\".( !$log_data['result'] ? '1' : '0' ).\",\n debug_querystats_count_slow=debug_querystats_count_slow+\".( $log_data['time']>$this->log_slow_threshold ? '1' : '0' ).\",\n debug_querystats_time_total=debug_querystats_time_total+\".( $log_data['time'] ? $log_data['time'] : '0' ).\",\n debug_querystats_time_avg=(debug_querystats_count*debug_querystats_time_avg+\".( is_numeric($log_data['time']) ? $log_data['time'] : '0' ).\")/(debug_querystats_count+1)\n \";\n \n mysql_query($sql, $this->database_connection) or die(mysql_error($this->database_connection).\" \".$sql);\n }\n \n if( $do_insert ) mysql_query($insert_query, $this->database_connection) or die(mysql_error($this->database_connection).\" \".$insert_query);\n \n $query_timer_end = getmicrotime();\n $query_timer_total = round($query_timer_end-$query_timer_start, 7);\n\t}", "public function resetQuery(): void\n\t{\n\t\t$this->state = new State();\n\t\t$this->explain = FALSE;\n\t}", "function wpf_timer_start( $id = 0 ) {\n\tglobal $wpf_profiler;\n\n\t$mtime = explode( ' ', microtime() );\n\t$wpf_profiler[$id]['start'] = $mtime[1] + $mtime[0];\n\n\treturn true;\n}", "protected function resetQuery()\n {\n array_forget($this->query, ['start', 'end']);\n }", "public function benchmarkStart()\n\t{\n\t\t$this->startTime = round(microtime(true) * 1000);\n\t}", "protected function startTimer()\n {\n try {\n $timer = new Utils_Timer();\n $timer->start('page');\n Zend_Registry::set('timer', $timer);\n } catch (Exception $e) {\n throw new WrappedException('unable to start timer', $e);\n }\n }", "public function start()\n {\n $this->startTime = Carbon::now();\n }", "public function query($sql, $limit = 0, $start = 0)\n {\n }", "function query($query=\"\")\n\t{\n\t\t$start = $this->getTime();\n\t\tif($query)\n\t\t{\n // debug(\"query\",$query);\n\t\t\t$this->_result_id=mysql_query($query,$this->_link_id);\n\t\t\t$this->_mysql_errno=mysql_errno($this->_link_id);\n\t\t\tif(!$this->_mysql_errno)\n\t\t\t{\n\t\t\t\tif(ereg(\"^insert\", strtolower($query)))\n\t\t\t\t{\n\t\t\t\t\t// twas an insert type query\n\t\t\t\t\t$this->_query_type=4;\n\t\t\t\t}\n\t\t\t\telseif(ereg(\"^select\", strtolower($query)) || ereg(\"^show\",strtolower($query)))\n\t\t\t\t{\n\t\t\t\t\t// twas a select or show query type\n\t\t\t\t\t$this->_query_type=1;\n\t\t\t\t}\n\t\t\t\telseif(ereg(\"^delete\", strtolower($query)))\n\t\t\t\t{\n\t\t\t\t\t// twas a delete query type\n\t\t\t\t\t$this->_query_type=3;\n\t\t\t\t}\n\t\t\t\telseif(ereg(\"^update\", strtolower($query)))\n\t\t\t\t{\n\t\t\t\t\t// twas a update query type\n\t\t\t\t\t$this->_query_type=2;\n\t\t\t\t}\n elseif(ereg(\"^create\",strtolower($query)))\n {\n $this->_query_type=5;\n }\n elseif(ereg(\"^drop\",strtolower($query)))\n {\n $this->_query_type=6;\n }\n\n\t\t\t\tif($this->_query_type>0)\n\t\t\t\t{\n\t\t\t\t\tif($this->_query_type>1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_num_rows=mysql_affected_rows();\n\t\t\t\t\t}elseif($this->_query_type<5){\n if(is_resource($this->_result_id)){\n $this->_num_rows=mysql_num_rows($this->_result_id);\n }else{\n $this->_num_rows=0;\n }\n\t\t\t\t\t}\n\t\t\t\t\tif($this->_query_type==4)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_insert_id=mysql_insert_id();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->_mysql_error=mysql_error();\n\t\t\t}\n\t\t}\n if($this->error_text()){\n Debug(\"Query\",$query);\n Debug(\"Error\",$this->error_text());\n }\n $this->logquery($query,$start);\n\t\treturn $this->_query_type;\n\t}", "public function flushQueryLog()\n {\n $this->queryLog = array();\n }", "public function query_stop($error = null)\n {\n if (($this->mode > 0) and ($this->sql_query_running)) {\n $this->sql_query_running = false;\n $sql_query_end = microtime(true);\n $this->sql_query_list[] = array(round(($sql_query_end - $this->sql_query_start) *1000, 4),$this->sql_query_string, $error);\n }\n }", "public function startQuestion($questionId, $time)\n\t{\n\t\t$sql = \"UPDATE questions SET start_time = $time WHERE id = $questionId\";\n\t\t$conn = mysqli_connect(SERVER_ADDRESS,USER_NAME,PASSWORD,DATABASE);\n\t\t$result = mysqli_query($conn,$sql);\n\t}", "function timer_start(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$this->time_start = $mtime[1] + $mtime[0];\n\t\treturn true;\n\t}", "public function runQuery($type='execute',$sql='',$time=0) {\n\t\t\n\t\t$this->setDB();\n\t\tif(!$this->db) {\n\t\t\t\t$this->setDB();\n\t\t\t\t# In order to pull foreign characters from the database and display\n\t\t\t\t# at this time, these 2 queries must be run\n\t\t\t\t$this->runQuery('execute','SET NAMES utf8');\n\t\t\t\t$this->runQuery('execute','SET CHARACTER_SET utf8');\n\t\t}\n\t\tswitch($type) {\n\t\t\t\tcase 'execute':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t $results = $this->db->Execute($sql);\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t\t\tcase 'count':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t $results = $this->db->Execute($sql);\n\t\t\t\t\t $results = $results->RecordCount();\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t\t\tcase 'getAll':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t $results = $this->db->getAll($sql);\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t\t\tcase 'getAssoc':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t $results = $this->db->GetAssoc($sql);\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t\t\tcase 'cache':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t //$results \t= $db->CacheExecute($time,$sql);\n\t\t\t\t\t $results = $this->db->Execute($sql);\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t}\n\t\t$this->q++;\n\t\t$this->queries['all']['queries'] += 1;\n\t\t$this->queries['all']['time'] += number_format($qend,6,'.','');\n\t\t$this->queries[$this->q]['query'] = $sql;\n\t\t$this->queries[$this->q]['time'] = number_format($qend,6,'.','');\n\t\treturn $results;\n\t}", "function start_cache()\r\n\t{\r\n\t\t$this->db->start_cache();\r\n\t}", "public function startQuery($sql, array $params = null, array $types = null)\n {\n }", "function start() {\n\t\tif ($this->Time->hasAny(\"Time.user_id = '\" . $this->userid . \"' AND Time.stop = '0000-00-00 00:00:00'\")) {\n\t\t\t$this->flash('Du arbeitest doch schon', '/times/index');\n\t\t\texit();\n\t\t}\n\n\t\t$this->request->data['Time']['user_id'] = $this->userid;\n\t\t$this->request->data['Time']['start'] = date('Y-m-d H:i:s');\n\t\t$this->request->data['Time']['break'] = 0;\n\n\t\tif ($this->Time->save($this->request->data)) {\n\t\t\t$this->Session->setFlash('Started, Wohoo!', 'message_ok');\n\t\t\t$this->redirect('/times/index');\n\t\t} else {\n\t\t\t$this->Session->setFlash('Please correct errors below.', 'message_error');\n\t\t\t$this->set('users', $this->Time->User->find('list'));\n\t\t\t$this->set('customers', $this->Time->Customer->find('list'));\n\t\t\t$this->redirect('/times/index');\n\t\t}\n\t}", "function start($event) {\n Timer::setStartTime($event, Timer::getMicroTime());\n }", "function query() {\n }", "function queryRun() {\n $action = $this ->widget_vars[\"args\"][1];\n $query = $this ->widget_vars[\"args\"][2];\n //dump($query);\n switch ($action) {\n case \"delete\":\n deleteQuery( $query );\n break;\n case \"run\":\n runQuery( $query );\n break;\n }\n cli_text(\"Ending parse at \".formatDate(null,\"pretty\"),\"blue\",\"white\");\n \n }", "public function timer_start($caption)\n {\n if ($this->mode > 0) {\n // Diverse Ueberpruefungen, evtl mehrfach start/stop erlauben\n }\n }", "function ajan_core_print_generation_time() {\n?>\n\n<!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->\n\n\t<?php\n}", "abstract protected function initQuery(): void;", "private function recordQuerySpan($query, $time): void\n {\n $parentSpan = Integration::currentTracingSpan();\n\n $context = new SpanContext();\n $context->setOp('sql.query');\n $context->setDescription($query);\n $context->setStartTimestamp(microtime(true) - $time / 1000);\n $context->setEndTimestamp($context->getStartTimestamp() + $time / 1000);\n\n $parentSpan->startChild($context);\n }", "function Start($id = null, $microseconds=false ) {\r\n\r\n\t# reset the interval array\r\n\t$this->intervals = array();\r\n\r\n\t# if no $id name is sent call it '~start'\r\n\tif ($id == null) $id = '~start';\r\n\r\n\t# set or clear the microsecond flag\r\n\t$this->microsec = $microseconds;\r\n\r\n\t# make the starting entry in the interval array\r\n\t$this->startTime = false;\r\n\t$this->Interval($id);\r\n\r\n# end function\r\n}", "function start()\n\t{\n\t\tif( ! $this->is_running ){\n\t\t\t$this->is_running = TRUE;\n\t\t\t$this->running_since = self::timeMillisecondsAsFloat();\n\t\t}\n\t}", "function StartTimer() {\n\tglobal $timestart;\n\t$mtime = microtime();\n\t$mtime = explode(\" \",$mtime);\n\t$mtime = $mtime[1] + $mtime[0];\n\t$timestart = $mtime;\n\treturn true;\n}", "public function enableQueryLog()\n\t{\n\t\t$this->neoeloquent->enableQueryLog();\n\t}", "function query() {\n $this->ensure_my_table();\n switch ($this->options['granularity']) {\n case 'second':\n default:\n $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']);\n return;\n case 'minute':\n $formula = views_date_sql_format('YmdHi', \"$this->table_alias.$this->real_field\");\n break;\n case 'hour':\n $formula = views_date_sql_format('YmdH', \"$this->table_alias.$this->real_field\");\n break;\n case 'day':\n $formula = views_date_sql_format('Ymd', \"$this->table_alias.$this->real_field\");\n break;\n case 'month':\n $formula = views_date_sql_format('Ym', \"$this->table_alias.$this->real_field\");\n break;\n case 'year':\n $formula = views_date_sql_format('Y', \"$this->table_alias.$this->real_field\");\n break;\n }\n\n // Add the field.\n $this->query->add_orderby(NULL, $formula, $this->options['order'], $this->table_alias . '_' . $this->field . '_' . $this->options['granularity']);\n }", "public function query($query = \"NONEE\"){\n\t\t\n\t\tif($update = $query === \"NONEE\")\n\t\t\t$query = $this->query; \t\t\t\t\t\n\t\t\n\t\t$this->query_total++;\n\t\t\n\t\t$query_check = trim($query);\n\t\t\n\t\tif($this->debug){\n\t\t\techo \"<br/><strong style=\\\"color:#E4C100\\\">&lt;DEBUG&gt;</strong><br/>\";\n\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#D3C26E;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : \"\";\n\t\t\techo \"<span style=\\\"color:#E4C100\\\">\".$query.\"</span><br/><strong style=\\\"color:#E4C100\\\">&lt;/DEBUG&gt;</strong><br/>\";\n\t\t}\n\t\t\n\t\t$resultset = $this->showErrors ? mysqli_query($this->connection,$query) : @mysqli_query($this->connection,$query);\n\t\t\n\t\t$proceed_log = $this->log && ( \n\t\t(stripos($query_check,\"INSERT\") === 0 && $this->log_options{0} === '1')\n\t\t||\n\t\t(stripos($query_check,\"DELETE\") === 0 && $this->log_options{1} === '1')\n\t\t||\n\t\t(stripos($query_check,\"UPDATE\") === 0 && $this->log_options{2} === '1')\n\t\t||\n\t\t(stripos($query_check,\"SELECT\") === 0 && $this->log_options{3} === '1'));\n\t\t\n\t\tif(stripos($query_check,\"INSERT\") === 0 || stripos($query_check,\"DELETE\") === 0 || stripos($query_check,\"UPDATE\") === 0)\n\t\t\tif(!$resultset)\n\t\t\t\t$this->transaction = false;\n\t\t\n\t\tif($proceed_log){\n\t\t\t$log_fields = \"query,date,user\";\n\t\t\t$log_values=\"'\".$this->secure($query).\"',NOW(),\".$this->log_user;\n\t\t}\n\t\t\n\t\tif(!$resultset){\n\t\t\tif($this->showErrors){ \n\t\t\t\techo \"<br/><strong style=\\\"color:red\\\">&lt;QERROR&gt;</strong><br/>\";\n\t\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#E88888;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : $this->comment.\"nada\";\n\t\t\t\techo \"<span style=\\\"color:red\\\">\".mysqli_error($this->connection).\" at \".$query_check.\"</span><br/><strong style=\\\"color:red\\\">&lt;/QERROR&gt;</strong><br/>\";\n\t\t\t}\n\t\t\tif($proceed_log){\n\t\t\t\t$log_fields .= \",error\";\n\t\t\t\t$log_values .= \",'\".mysqli_error($this->connection).\"'\";\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($proceed_log){\t\t\t\n\t\t\t@mysqli_query($this->connection,\"INSERT INTO \".$this->log_table.\"($log_fields) VALUES($log_values)\");\n\t\t}\n\t\t\n\t\tif(!$resultset && $this->closeOnError) \n\t\t\texit;\n\t\t\n\t\tif($update)\n\t\t\t$this->resultset = $resultset;\n\t\t\n\t\treturn $resultset; \n\t}", "public function scopeIsTimed($query)\n\t{\n\n\t\t$date = date(\"Y-m-d\");\n\t\treturn $query\n\t\t\t->where('is_timed', '=', 1)\n\t\t\t->where('publish_start', '<=', $date . \" 00:00:00\")\n\t\t\t->where('publish_end', '>=', $date . \" 23:59:59\");\n\n\t}", "function setStartTime($event, $time) {\n Timer::timers($event, array(\n 'start' => $time,\n 'stopped' => false\n ));\n }", "function database_query($database_query)\n {\n // EXECUTE QUERY\n $query_timer_start = getmicrotime();\n $query_result = mysql_query($database_query, $this->database_connection);\n $query_timer_end = getmicrotime();\n $query_timer_total = round($query_timer_end-$query_timer_start, 7);\n \n // LAST QUERY INFO\n $this->_last_query = $database_query;\n $this->_last_resource = $query_result;\n\t \n // RETURN IF NOT LOGGING STATS\n switch( TRUE )\n {\n case (!$this->log_stats):\n case ( $query_result && (SE_DATABASE_LOG_SUCCESS & ~ $this->log_trigger)):\n case (!$query_result && (SE_DATABASE_LOG_FAIL & ~ $this->log_trigger)):\n case ($query_timer_total< $this->log_slow_threshold && (SE_DATABASE_LOG_FAST & ~ $this->log_trigger)):\n case ($query_timer_total>=$this->log_slow_threshold && (SE_DATABASE_LOG_SLOW & ~ $this->log_trigger)):\n return $query_result;\n break;\n }\n \n \n // STATS\n $log_data = array('index' => count($this->log_data));\n $this->log_data_totals['total']++;\n \n // QUERY\n if( $this->log_options & SE_DATABASE_LOGOPTS_QUERY )\n {\n // When making hash, remove timestamps\n $log_data['query_hash'] = md5(preg_replace('/\\d{10}/', '', $database_query));\n $log_data['query'] = $database_query;\n }\n \n // TIME\n if( $this->log_options & SE_DATABASE_LOGOPTS_TIME )\n {\n $log_data['time'] = $query_timer_total;\n $this->log_data_totals['time'] += $query_timer_total;\n }\n \n // BACKTRACE\n if( $this->log_options & SE_DATABASE_LOGOPTS_BACKTRACE )\n {\n $backtrace = debug_backtrace();\n foreach( $backtrace as $backtrace_index=>$single_backtrace )\n if( !empty($backtrace[$backtrace_index]['file']) )\n $backtrace[$backtrace_index]['file_short'] = str_replace($this->root_folder, '', $backtrace[$backtrace_index]['file']);\n \n $log_data['backtrace'] = &$backtrace;\n }\n \n // RESULT\n if( $this->log_options & SE_DATABASE_LOGOPTS_RESULT )\n {\n $log_data['result'] = ( $query_result ? TRUE : FALSE );\n \n if( $query_result )\n $this->log_data_totals['success']++;\n else\n $this->log_data_totals['failed']++;\n }\n \n // COUNT\n if( $this->log_options & SE_DATABASE_LOGOPTS_COUNT )\n {\n $result_count = 0;\n \n if( $query_result && !$result_count )\n $result_count = $this->database_affected_rows();\n \n if( $query_result && !$result_count )\n $result_count = $this->database_num_rows($query_result);\n \n $log_data['count'] = $result_count;\n }\n \n // GET ERROR\n if( $this->log_options & SE_DATABASE_LOGOPTS_ERROR )\n {\n $log_data['error'] = ( $query_result ? FALSE : $this->database_error() );\n }\n \n // GET THRESHOLD COLOR\n foreach( $this->query_thresholds as $threshold_time=>$threshold_color )\n {\n if( (float)$query_timer_total>(float)$threshold_time )\n continue;\n \n $log_data['color'] = $threshold_color;\n break;\n }\n \n // ADD TO LOG\n $this->log_data[] = $log_data;\n \n // RETURN\n\t return $query_result;\n\t}", "private function startCountingSelectQueries(): void\n {\n if ($this->showQueries !== self::SHOW_QUERIES_RESET) {\n throw new LogicException('showQueries wasnt reset, you did something wrong');\n }\n $this->showQueries = $_REQUEST['showqueries'] ?? null;\n // force showqueries on to count the number of SELECT statements via output-buffering\n // if this approach turns out to be too brittle later on, switch to what debugbar\n // does and use tractorcow/proxy-db which should be installed as a dev-dependency\n // https://github.com/lekoala/silverstripe-debugbar/blob/master/code/Collector/DatabaseCollector.php#L79\n $_REQUEST['showqueries'] = 1;\n ob_start();\n echo '__START_ITERATE__';\n }", "function query() {}", "protected function _initTimer()\n {\n $this->_timer->reset();\n $timeout = $this->_options[self::OPT_FIRST_DIGIT_TIMEOUT];\n $this->_timer->setOptions( array( Streamwide_Engine_Timer_Timeout::OPT_DELAY => $timeout ) );\n }", "public function startTimer($name = null) {\n\n //Name Provided?\n if ($name != \"\" && $name != null) {\n $this->name = $name;\n }\n\n $this->time_start = microtime(true);\n static::$number_timers++;\n }", "public function start_timer() {\n global $USER, $DB;\n $USER->startlesson[$this->properties->id] = true;\n $startlesson = new stdClass;\n $startlesson->lessonid = $this->properties->id;\n $startlesson->userid = $USER->id;\n $startlesson->starttime = time();\n $startlesson->lessontime = time();\n $DB->insert_record('languagelesson_timer', $startlesson);\n if ($this->properties->timed) {\n $this->add_message(get_string('maxtimewarning', 'languagelesson', $this->properties->maxtime), 'center');\n }\n return true;\n }", "function start() {\n if ($this->isLogging) {\n $this->tStart = gettimeofday();\n $this->tLast = $this->tStart;\n $this->log = \"<h1>Log: \" . $this->name . \"</h1>\\n<pre>Started: \" . gmdate(\"D, d M Y H:i:s T\", $this->tStart['sec']) . \"\\n &#916; Start ; &#916; Last ;\";\n\t\t\t$this->logLine(\"Start\");\n\t\t}\n }", "function StartRun()\n {\n $this->transaction_in_progress =true;\n $this->db->StartTrans();\n }", "function pantomime_num_queries(){\n\techo '<p id=\"footer-num-queries\">';\n\t_e('Generated from '. get_num_queries() .' queries in '. timer_stop(0,3) .' seconds.', 'pantomime');\n\techo '</p>';\n}", "public function __construct()\n {\n DB::enableQueryLog();\n }", "public function test_queries()\n\t{\n\t\t$this->setup_options_obj($input);\n\t\t$rpt = new Reports_Model($this->options);\n\t\t$rpt->set_option('start_time', 0);\n\t\t$rpt->set_option('end_time', time());\n\t\t$result = $rpt->test_summary_queries();\n\t\techo \"<pre>\\n\";\n\t\t$cnt = count($result);\n\t\techo $cnt . \" total different queries\\n\";\n\t\t$total_rows = 0.0;\n\t\tforeach ($result as $query => $ary) {\n\t\t\techo $query . \"\\n\";\n\t\t\tprint_r($ary);\n\t\t\t$total_rows += $ary['rows'];\n\t\t}\n\t\t$avg_rows = $total_rows / $cnt;\n\t\techo \"Average row-count: $avg_rows\\n\";\n\t\techo \"</pre>\\n\";\n\t\tdie;\n\t}", "public function __construct(){\n DB::enableQueryLog();\n }", "public static function query()\n {\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM timesheet';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function _timerStart($key){\n\tglobal $_gTimers;\n\n\tif (!$_gTimers) $_gTimers = array();\n\n\tif (empty($_gTimers[$key]))\n\t\t$_gTimers[$key] = array(microtime(true),0, 1);\n\telse{\n\t\t$_gTimers[$key][0] = microtime(true);\n\t\t$_gTimers[$key][2] = 1;\n\t}\n\n\treturn $_gTimers[$key][0];\n}", "public function check_queries() {\r\n\t\tQueryManager::check_queries();\r\n\t}", "public function LogQueries($q){\n\t\t$this->queries = $q;\n\t\treturn $this;\n\t}", "public function LogQueries($q){\n\t\t$this->queries = $q;\n\t\treturn $this;\n\t}", "private function addTimer(array &$request) {\n $request['timer'] = microtime(true); //start time\n $request['time'] = false; //default if not overridden by time later\n }", "public function getAllQueriesTime(){\n return Db::getAllQueriesEstimatedTime();\n }", "protected function realQuery(string $query): void\n {\n if ($this->logQueries)\n {\n $time0 = microtime(true);\n\n $tmp = $this->mysqli->real_query($query);\n if ($tmp===false)\n {\n throw new DataLayerException($this->mysqli->errno, $this->mysqli->error, $query);\n }\n\n $this->queryLog[] = ['query' => $query,\n 'time' => microtime(true) - $time0];\n }\n else\n {\n $tmp = $this->mysqli->real_query($query);\n if ($tmp===false)\n {\n throw new DataLayerException($this->mysqli->errno, $this->mysqli->error, $query);\n }\n }\n }", "public static function timer_start() {\n $mtime = microtime();\n $mtime = explode(' ', $mtime);\n self::$time_start = $mtime[1] + $mtime[0];\n return true;\n }", "public function flushQuery();", "public function gatherSQLQueryData()\n {\n $queryTotals = array();\n\n $queryTotals['count'] = 0;\n $queryTotals['time'] = 0;\n\n $queries = array();\n\n if(isset($this->connection)) {\n $queryLog = $this->connection->getQueryLog();\n\n $queryTotals['count'] += count($queryLog);\n\n foreach($queryLog as $query) {\n if(isset($query['bindings']) && ! empty($query['bindings'])) {\n $query['sql'] = PdoDebugger::show($query['query'], $query['bindings']);\n } else {\n $query['sql'] = $query['query'];\n }\n\n $query = $this->attemptToExplainQuery($query);\n\n $queryTotals['time'] += $query['time'];\n\n $query['time'] = $this->getReadableTime($query['time']);\n\n //\n $queries[] = $query;\n }\n }\n\n $queryTotals['time'] = $this->getReadableTime($queryTotals['time']);\n\n $this->output['queries'] = $queries;\n $this->output['queryTotals'] = $queryTotals;\n }", "public function init_save_queries()\n {\n }", "public static function getQueryLog()\n {\n }", "function query($q)\r\n {\r\n if($this->link)\r\n {\r\n $start = microtime(true);\r\n $this->res_id = mysql_query($q, $this->link);\r\n $end = microtime(true);\r\n $query->sql = $q;\r\n $query->exec_time = $end-$start;\r\n $this->queries[] = $query;\r\n \r\n }else\r\n {\r\n $this->error_msg = \"Could not execute query to $this->db_name database, wrong database link\";\r\n return 0;\r\n }\r\n if(!$this->res_id)\r\n {\r\n $this->error_msg = \"Could not execute query to $this->db_name database, wrong result id\";\r\n return 0;\r\n }\r\n return $this->res_id;\r\n }", "private function initQuery()\n {\n $this->_lastSql = null;\n $this->_limit = null;\n $this->_offset = null;\n $this->_order = array();\n $this->_group = array();\n $this->_table = null;\n $this->_stmt = null;\n\n $this->fromStates = array();\n $this->selectFields = array();\n $this->whereStates = array();\n $this->havingStates = array();\n $this->values = array();\n $this->joinStates = array();\n }", "public function query()\n {\n }", "public function query()\n {\n }", "private static function startTimer(): bool\n {\n self::$TimerBegin = microtime(true);\n return true;\n }", "function queries_run(){\n\t\tglobal $database_sql_queries;\n\t\treturn($database_sql_queries);\n\t}", "function start()\n{\n global $STATE_FILE, $LOG_FILE;\n\n $start_time = time();\n \n // log the timer in STATE_FILE\n $fp = fopen($STATE_FILE, 'w');\n fwrite($fp, $start_time);\n fclose($fp);\n}" ]
[ "0.6650986", "0.6330967", "0.6266227", "0.6233954", "0.6141267", "0.61263764", "0.6123928", "0.60613054", "0.60442555", "0.6020866", "0.6005213", "0.5919651", "0.58706206", "0.5841991", "0.58296907", "0.5811369", "0.5794595", "0.5710497", "0.55242586", "0.55224067", "0.55128616", "0.55078787", "0.546274", "0.5462304", "0.5456808", "0.54545015", "0.5439536", "0.5431431", "0.5424209", "0.5417294", "0.5383893", "0.53741574", "0.53678966", "0.53574944", "0.5354161", "0.5342785", "0.532817", "0.5318393", "0.5312989", "0.5312361", "0.5304115", "0.52918714", "0.5282621", "0.52706254", "0.52701825", "0.52665156", "0.5264747", "0.5261775", "0.5253332", "0.5227899", "0.52265024", "0.5219596", "0.52014124", "0.51807684", "0.51777303", "0.51667774", "0.5162452", "0.515872", "0.5158219", "0.5158179", "0.5142864", "0.5137872", "0.51377904", "0.5117692", "0.51036686", "0.5090713", "0.50810456", "0.50804037", "0.50769025", "0.5072021", "0.5070199", "0.50655514", "0.5059121", "0.5032417", "0.5032345", "0.50316644", "0.50020325", "0.49966598", "0.49961105", "0.49891618", "0.49884474", "0.4985032", "0.49715647", "0.49630356", "0.49630356", "0.49626797", "0.49618903", "0.49569422", "0.49548092", "0.49494913", "0.49450573", "0.4931331", "0.4927811", "0.4923173", "0.49188277", "0.4909087", "0.4909087", "0.49005166", "0.48970926", "0.48960012" ]
0.7223225
0
Stop Timer for Querys. Always use with query_start()
public function query_stop($error = null) { if (($this->mode > 0) and ($this->sql_query_running)) { $this->sql_query_running = false; $sql_query_end = microtime(true); $this->sql_query_list[] = array(round(($sql_query_end - $this->sql_query_start) *1000, 4),$this->sql_query_string, $error); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function queryStop()\n\t{\n\t\tif (static::isEnabled(static::DB_BENCHMARK))\n\t\t{\n\t\t\tstatic::$_query['time'] = microtime(true) - static::$_query['time'];\n\t\t\tstatic::$_queries[] = static::$_query;\n\t\t}\n\t}", "public function stopQuery()\n {\n }", "public function stopQuery() : void\n {\n if ($_ENV['LOGGER_SQL'] === 'true') {\n \n // Logger.\n static::$logger->trace('EXECUTION TIME (in seconds):');\n static::$logger->trace(number_format(microtime(true) - $this->start, 4));\n static::$logger->trace('***************************************************************************');\n \n }//end if\n \n }", "private function stopTimer()\n\t{\n\t\t// Measure how many seconds it took to execute\n\t\t$this->executionSeconds = microtime(true) - $this->startMicroStamp;\n\n\t\t// Keep statistics\n\t\tself::$totalExecutionSeconds += $this->executionSeconds;\n\t}", "public function timer_stop()\n {\n }", "public function stop(){\n if($this->_id) $this->times[$this->_id] += microtime(true) - $this->_start;\n $this->_id = null;\n }", "public function clearQueries();", "public static function disableQueryLog()\n {\n }", "public function TimerStop()\r\n\t{\r\n\t\t$parts = explode( \" \", microtime() );\r\n\t\t$time_stop = $parts[1].substr( $parts[0],1 );\r\n\t\t$this->time_diff = ( $time_stop - $this->time_start );\r\n\t\t$this->time_start = 0;\r\n\t}", "function stop_timing() {\n $this->time = number_format(microtime(true) - $this->start_time, 3);\n }", "public function stop()\n {\n $this->_timeStopInMicroSeconds = microtime(true);\n }", "protected function resetQuery()\n {\n array_forget($this->query, ['start', 'end']);\n }", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "protected function Stop_Timer() {\n\t\tif (!empty($this->timer_name)) \n\t\t{\n\t\t\t$this->Get_Server()->timer->Timer_Stop($this->timer_name);\n\t\t}\n\t}", "public function onStop();", "public function stopTime(){\n\t\treturn disposeTime();\n\t}", "function devlyQueries() {\n\t\n\techo 'ran ' . get_num_queries() . ' queries in ' . timer_stop(1) . ' seconds';\n\t\n}", "public function dispatchLoopShutdown() {\n $slowQueryLimit = Zend_Registry::get('monitor')->getSlowQueryLimit();\n $slowQueryLimitSeconds = $slowQueryLimit / 1000;\n\n // Log slow queries using Doctrine SQL logger\n try {\n $sqlLogger = Zend_Registry::get('sqlLogger');\n $queries = $sqlLogger->getQueries();\n foreach($queries as $query) {\n if($query['executionMs'] > $slowQueryLimit) {\n $this->_logMessage($query['executionMs'], $query['query'], $query['params']);\n }\n }\n } catch(Zend_Exception $e) {\n }\n\n // Log slow queries using Zend_Db profilers\n try{\n $profilers = Zend_Registry::get('profilers');\n foreach($profilers as $profiler) {\n if($profiler->getTotalNumQueries()) {\n $queryProfiles = $profiler->getQueryProfiles();\n foreach($queryProfiles as $queryProfile) {\n if($queryProfile->getElapsedSecs() > $slowQueryLimitSeconds) {\n $this->_logMessage($queryProfile->getElapsedSecs() * 1000, $queryProfile->getQuery(), $queryProfile->getQueryParams());\n }\n }\n $profiler->clear();\n }\n }\n } catch(Zend_Exception $e) {\n }\n }", "function discardQuery() {}", "public function stop() {}", "function stop(){\n\t\tif($this->time_end==0){\n\t\t\t $this->time_end = $this->microtime_float();\n\t\t\t $this->time_spend = $this->time_end - $this->time_start;\n\t\t}\n\t}", "public function endTimer() {\n $this->time_end = microtime(true);\n $this->time = number_format(($this->time_end - $this->time_start), 5);\n static::$total_exec += $this->time;\n }", "public function clearQueries(): void\n {\n $this->queries = [];\n }", "public static function stop()\n {\n self::$executionTime = round(abs(microtime(true) - $_ENV['W']['START_TIME']) * 1000, 0);\n }", "public function stop(): void\n {\n $this->end = microtime(true);\n }", "public static function flushQueryLog()\n {\n }", "public function stop_timer() {\n global $USER, $DB;\n unset($USER->startlesson[$this->properties->id]);\n return $this->update_timer(false, false);\n }", "static function stopTimer() {\n if(self::$timer) {\n self::$timer->cancel();\n self::$timer = null;\n }\n }", "public function resetQuery(): void\n\t{\n\t\t$this->state = new State();\n\t\t$this->explain = FALSE;\n\t}", "public static function stop()\n {\n if (self::$_sessionBenchmarkOn) {\n self::$_sessionBenchmarkFinish = microtime(TRUE);\n }\n }", "abstract public function stop();", "public function run()\n {\n DB::disableQueryLog();\n parent::run();\n }", "public static function resetQueryCount() {\n \tself::$queryCount = 0;\n }", "function stop();", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "function stop()\n\t{\n\t\tif( $this->is_running ){\n\t\t\t$this->counter += (int) (self::timeMillisecondsAsFloat() - $this->running_since + 0.5);\n\t\t\t$this->is_running = FALSE;\n\t\t}\n\t}", "protected function resetLastQuery(): void\n {\n $this->lastQuery = null;\n }", "Public function end()\n\t{\n\t\t$this->endTimer = microtime(TRUE);\n\t}", "public static function stop() {\n\t\tself::$con->close();\n\t}", "function stop_cache()\r\n\t{\r\n\t\t$this->db->stop_cache();\r\n\t}", "public function stop($index = null) {\n\t\tif ($index === null) {\n\t\t\t$index = count($this->items) - 1;\n\t\t}\n\t\n\t\t$this->items[$index]['after'] = self::getMicrotime();\n\t\t$this->items[$index]['use'] = $this->compareMicrotimes($this->items[$index]['before'], $this->items[$index]['after']);\n\t\t$this->items[$index]['end'] = $this->compareMicrotimes($this->startTime, $this->items[$index]['after']);\n\t\tif ($this->items[$index]['type'] == 1) {\n\t\t\t$this->queryCount++;\n\t\t\t$this->queryTime += $this->items[$index]['use'];\n\t\t}\n\t}", "public static function stop()\n {\n }", "public function stop(): void\n {\n if ($this->conn->inTransaction()) {\n $this->conn->rollBack();\n }\n }", "public function stop()\n {\n }", "function timer_stop(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$time_end = $mtime[1] + $mtime[0];\n\t\t$time_total = $time_end - $this->time_start;\n\t\treturn $time_total;\n\t}", "public function queryEnd($queryId)\n {\n\n $state = parent::queryEnd($queryId);\n\n if (!$this->getEnabled() || $state == self::IGNORED) {\n return;\n }\n\n // get profile of the current query\n $profile = $this->getQueryProfile($queryId);\n\n // update totalElapsedTime counter\n $this->_totalElapsedTime += $profile->getElapsedSecs();\n\n // create the message to be logged\n $message = \"\\r\\n Elapsed Secs: \" . round($profile->getElapsedSecs(), 5) . \"\\r\\n\";\n $message .= \" Query: \" . $profile->getQuery() . \"\\r\\n\";\n $message .= \"\\r\\n************************************************************\\r\\n\";\n\n // log the message as INFO message\n $this->_log->info($message);\n\n }", "public function stop()\n {\n }", "function database_log_stats_cleanup($not_slow=TRUE)\n {\n $age_limit = time() - 7200;\n //$age_limit = time() - 86400;\n \n $sql = \"DELETE FROM se_debug_querylog WHERE debug_querylog_time<$age_limit\";\n if( $not_slow ) $sql .= \" && debug_querylog_benchmark<{$this->log_slow_threshold}\";\n \n $resource = mysql_query($sql, $this->database_connection) or die(mysql_error($this->database_connection).\" \".$sql);\n }", "public function stop()\n {\n // Put your code here;\n }", "public function stop()\r\n {\r\n\r\n }", "public function flushQueryLog()\n {\n $this->queryLog = array();\n }", "function tideways_span_timer_stop($span)\n{\n}", "private function finishTimer()\n {\n if (!$this->activeCalls && !count($this->queue) && $this->timer) {\n $this->loop->cancelTimer($this->timer);\n // Don't use unset(), it completely removes property from the object!\n $this->timer = null;\n }\n }", "public function stop()\n {\n $this->mark('__stop');\n }", "private static function _stop()\n {\n $adapter = self::$_transaction->_stored;\n \n if (is_null($adapter)) {\n Config::clearDataAdapter();\n } else {\n Config::setDataAdapter($adapter);\n }\n }", "public function stop()\n {\n\n }", "public function clearConnection($mysql) {\n while ($mysql->more_results()) {\n $mysql->next_result();\n $mysql->use_result();\n }\n }", "public function delTimer(): bool {}", "public function __destruct() {\n\t\tif ($this->_debug && $this->_logger) {\n\t\t\t$this->logQueryStats();\n\t\t}\n\t}", "public static function stopAll () {\n\t\tforeach (self::$timeArray as $label => $value)\n\t\t\tself::stop ($label);\n\t}", "public function stop()\n {\n // TODO: Implement stop() method.\n }", "public function cancel()\n {\n $this->_statement =null;\n }", "function clearSQL() {}", "public function queryEnd($queryId) {\n\t\t$state = parent::queryEnd($queryId);\n\n\t\tif (!$this->getEnabled() || $state == self::IGNORED) {\n\t\t\treturn;\n\t\t}\n\n\t\t// get profile of the current query\n\t\t$profile = $this->getQueryProfile($queryId);\n\n\t\t// update totalElapsedTime counter\n\t\t$this->_totalElapsedTime += $profile->getElapsedSecs();\n\n\t\t// create the message to be logged\n\t\t$message = \"\\r\\nElapsed Secs: \" . round($profile->getElapsedSecs(), 5) . \"\\r\\n\";\n\t\t$message .= \"Query: \" . $profile->getQuery() . \"\\r\\n\";\n\t\t$message .= \"Query Params: \" . var_export($profile->getQueryParams(), true) . \"\\r\\n\";\n\n\t\tif( strpos($profile->getQuery(), '?') !== false )\n\t\t{\n\t\t\t$message .= \"Query Full: \" . $this->bindParamValue($profile->getQuery(), $profile->getQueryParams()) . \"\\r\\n\";\n\t\t}\n\n\t\t// log the message as INFO message\n\t\t$this->_log->info($message);\n\t}", "public function cancelTimer($timer): void;", "function timequery() {\n static $querytime_begin;\n list($usec, $sec) = explode(' ', microtime());\n\n if (!isset($querytime_begin)) {\n $querytime_begin = ((float) $usec + (float) $sec);\n } else {\n $querytime = (((float) $usec + (float) $sec)) - $querytime_begin;\n echo sprintf('<br />La consulta tardó %01.5f segundos.- <br />', $querytime);\n }\n}", "public function resetTimer()\r\n\t{\r\n\t\t$this->last = microtime(true);\r\n\t}", "public function disableQueryLog()\n\t{\n\t\t$this->neoeloquent->disableQueryLog();\n\t}", "public function flushQuery();", "public function after($query);", "public function query_start($query)\n {\n if (($this->mode > 0) and (!$this->sql_query_running)) {\n $this->sql_query_running = true;\n $this->sql_query_start = microtime(true);\n $this->sql_query_string = $query;\n }\n }", "private function prep_stop_node_query()\n {\n require_library('connectors/CypherQueryAPI');\n $resource_id = 'eol';\n $func = new CypherQueryAPI($resource_id);\n $input = array();\n $input[\"params\"] = array();\n $input[\"type\"] = \"traits_stop_at\";\n $input[\"per_page\"] = 500; // 500 worked ok\n $this->stop_node_query = $func->get_traits_stop_at($input);\n echo \"\\nstop_node_query: \".count($this->stop_node_query).\"\\n\"; //exit;\n unset($func);\n // exit(\"\\n-end-\\n\");\n }", "function timer_stop($display = 0, $precision = 3)\n {\n }", "function clearConnection($mysql) {\n while ($mysql->more_results()) {\n $mysql->next_result();\n $mysql->use_result();\n }\n}", "public function stop()\n {\n if (!$this->isOn) {\n return;\n }\n\n $this->dataset[$this->namespace] = xhprof_disable();\n $this->isOn = false;\n }", "public function timer_stop($caption)\n {\n if ($this->mode > 0) {\n }\n }", "public function testStop() {\n // It should return the elapse timed (not testing yet)\n $this->assertGreaterThan( 0, $this->timer->stop() );\n }", "public function stop() {\n\t\t$this->invoke(\"stop\");\n\t}", "private function finalize() {\n $this->_log_queries[] = $this->_active_query;\n $this->_active_query = empty($this->_hold_queries) ? NULL : array_pop($this->_hold_queries);\n }", "public function stop()\n {\n // nop\n }", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function cancel(Timer $timer);", "public function flushQuery()\n\t{\n\t\t$this->cur_query = \"\";\n\t}", "abstract protected function query_and_clear_cache($sql);", "public function runQuery($type='execute',$sql='',$time=0) {\n\t\t\n\t\t$this->setDB();\n\t\tif(!$this->db) {\n\t\t\t\t$this->setDB();\n\t\t\t\t# In order to pull foreign characters from the database and display\n\t\t\t\t# at this time, these 2 queries must be run\n\t\t\t\t$this->runQuery('execute','SET NAMES utf8');\n\t\t\t\t$this->runQuery('execute','SET CHARACTER_SET utf8');\n\t\t}\n\t\tswitch($type) {\n\t\t\t\tcase 'execute':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t $results = $this->db->Execute($sql);\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t\t\tcase 'count':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t $results = $this->db->Execute($sql);\n\t\t\t\t\t $results = $results->RecordCount();\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t\t\tcase 'getAll':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t $results = $this->db->getAll($sql);\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t\t\tcase 'getAssoc':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t $results = $this->db->GetAssoc($sql);\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t\t\tcase 'cache':\n\t\t\t\t\t $qstart = $this->getStartTime();\n\t\t\t\t\t //$results \t= $db->CacheExecute($time,$sql);\n\t\t\t\t\t $results = $this->db->Execute($sql);\n\t\t\t\t\t $qend = $this->getEndTime($qstart);\n\t\t\t\t\t break;\n\t\t}\n\t\t$this->q++;\n\t\t$this->queries['all']['queries'] += 1;\n\t\t$this->queries['all']['time'] += number_format($qend,6,'.','');\n\t\t$this->queries[$this->q]['query'] = $sql;\n\t\t$this->queries[$this->q]['time'] = number_format($qend,6,'.','');\n\t\treturn $results;\n\t}", "public function stop($id);", "public function cancel()\n\t{\n\t\t$this->pdoStatement = null;\n\t}", "public function stop()\n {\n $this->gamerounds[] = $this->roundsum;\n $this->roundsum = 0;\n $this->dice->reset();\n }", "public function stop() {\n\t\tforeach ( $this->connections as $id => $conn ) {\n\t\t\tif ($this->connections [$id]->isAlive ())\n\t\t\t\t$this->connections [$id]->stop ();\n\t\t}\n\t\t$this->active = null;\n\t}" ]
[ "0.8173542", "0.7950426", "0.7900933", "0.6701242", "0.64741987", "0.6226296", "0.6222761", "0.6074264", "0.5974751", "0.59283715", "0.5905258", "0.58818257", "0.58715713", "0.58715713", "0.58715713", "0.58715713", "0.58715713", "0.58715713", "0.58715713", "0.58715713", "0.58621097", "0.5844155", "0.5819782", "0.5805813", "0.57990324", "0.5783127", "0.5779766", "0.5776574", "0.5775367", "0.5771344", "0.57334787", "0.57306206", "0.5727215", "0.5686447", "0.56758887", "0.566579", "0.5659621", "0.5658395", "0.55809414", "0.5571896", "0.5569589", "0.5564288", "0.5564288", "0.5564288", "0.5564288", "0.5564288", "0.5553159", "0.55430937", "0.5527917", "0.5524935", "0.5492136", "0.546588", "0.54411876", "0.54385376", "0.5395936", "0.5369837", "0.53596246", "0.5350264", "0.53501344", "0.5346314", "0.5342107", "0.5327909", "0.5317643", "0.5317021", "0.53102106", "0.5309306", "0.52793396", "0.52790076", "0.52780163", "0.5270049", "0.52512306", "0.52446574", "0.52383286", "0.5237148", "0.52321565", "0.5224461", "0.52184093", "0.52154887", "0.5198865", "0.5189992", "0.5185549", "0.51786417", "0.51708585", "0.51656836", "0.51542985", "0.515423", "0.5147436", "0.5137354", "0.5128856", "0.5102729", "0.50987804", "0.50914115", "0.5087728", "0.5085884", "0.5083074", "0.5081291", "0.5059644", "0.5053911", "0.50494444", "0.50430274" ]
0.69128525
3
Generate and Sort Querylist
public function query_fetchlist() { if (($this->mode > 0) and is_array($this->sql_query_list)) { $this->sql_query_list = $this->sort_array_by_col($this->sql_query_list); foreach ($this->sql_query_list as $debug_query) { $sql_query_debug .= debug::row_double(sprintf("<b>%8.4f ms</b>", $debug_query[0]), $debug_query[1]); if (!($debug_query[2]=="")) { $sql_query_debug .= debug::row_double("", "<span style=\"color:red\"><b>Error : ".$debug_query[2]."</b></span>"); } } return $sql_query_debug; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function sortQueryOrders() {\n foreach ($this->queryResult as $index => $order) {\n $order = $this->injectKitData($order);\n $this->statusOutputOrder[$order['Order']['status']][$order['Order']['id']] = $order;\n }\n }", "public function buildSortQuery()\n\t\t\t{\n\t\t\t\t$this->sql_sort = $this->fields_arr['orderby_field'].' '.$this->fields_arr['orderby'];\n\t\t\t}", "public function getSorting();", "protected function applySorting()\n\t{\n\t\t$i = 1;\n\t\tparse_str($this->order, $list);\n\t\tforeach ($list as $field => $dir) {\n\t\t\t$this->dataSource->sort($field, $dir === 'a' ? IDataSource::ASCENDING : IDataSource::DESCENDING);\n\t\t\t$list[$field] = array($dir, $i++);\n\t\t}\n\t\treturn $list;\n\t}", "function order_list($where, $query)\n {\n }", "abstract public function prepareSort();", "public function buildSortQuery()\n\t\t\t{\n\t\t\t\t$this->sql_sort = '';\n\t\t\t\t$sort = $this->fields_arr['orderby_field'];\n\t\t\t\t$orderBy = $this->fields_arr['orderby'];\n\t\t\t\tif ($sort AND $orderBy)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->sql_sort = ' '.$sort.' '.$orderBy;\n\t\t\t\t\t}\n\t\t\t}", "protected function prepareOrderByStatement() {}", "public function &getOrderBy();", "private function addSorts($query)\n {\n\n $def_constant = isset($this->urlData->settings['default']['sorts_const']) ? $this->urlData->settings['default']['sorts_const'] : [];\n $def_changeable = isset($this->urlData->settings['default']['sorts']) ? $this->urlData->settings['default']['sorts'] : [];\n $active = $this->urlData->params['sorts'];\n\n //sorts that can't be replased by user\n foreach ($def_constant as $def_value) {\n $this->addSortCase($query, $def_value['source'], $def_value['value'], $def_value['order']);\n }\n\n //set def value for sorts that can be changed by user\n if (!empty($def_changeable)) {\n $sort_by = $def_changeable['value'];\n $sort_order = $def_changeable['order'];\n $sort_case = $def_changeable['source'];\n }\n\n //replace def values by values from url\n if (isset($active['sort_order'])) {\n $sort_order = $active['sort_order'];\n }\n if (isset($active['sort_item'])) {\n $sort_by = $active['sort_item']['sort_by'];\n $sort_case = $active['sort_item']['type'];\n }\n\n if (isset($sort_by)) {\n $this->addSortCase($query, $sort_case, $sort_by, $sort_order);\n }\n $query->orderBy($this->getBaseColumnName('id'), 'asc');\n }", "protected function getListQuery() {\n // Create a new query object.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n $userid = JFactory::getUser()->id;\n\n // Select the required fields from the table.\n $query\n ->select(\n $this->getState(\n 'list.select', 'DISTINCT a.id, a.title, a.time_created, a.category_id, a.state'\n )\n );\n\n $query->from('`#__adverts79_adverts` AS a');\n\n $query->select('userApproval.link AS link');\n $query->join('INNER', '#__auto79_articles AS userApproval ON a.id = userApproval.postid');\n //$query->where('userApproval.user_approval = ' . $userid);\n \n $query->where('a.state = 0');\n \n $app = JFactory::getApplication();\n $getTemplate = $app->getTemplate('template');\n\n $province = $getTemplate->params['province'];\n if ($province) {\n $query->where('a.add_province = ' . $province);\n }\n\n // Add the list ordering clause.\n $orderCol = $this->state->get('list.ordering');\n $orderDirn = $this->state->get('list.direction');\n if ($orderCol == '') {\n $orderCol = \"a.time_updated\";\n }\n if ($orderDirn == '') {\n $orderDirn = \"DESC\";\n }\n if ($orderCol && $orderDirn) {\n $query->order($db->escape($orderCol . ' ' . $orderDirn));\n }\n// echo $query;\n// exit();\n return $query;\n }", "private function makeQuerySplit(){\n\t\t\n\t\t$this->searchQ['select'] = array('l.name','l.level_id AS levelId','l.summary','l.sum_approach','l.sum_problems','l.address_line_1','l.address_line_2','l.town','l.county','l.postcode','l.country','l.phone','l.image','l.latitude','l.longitude','l.publish_address','l.publish_phone','l.approved','p.uri','p.urlname','e.level','y.listing_type');\n\t\t$this->searchQ['orderby'][] = 'levelId DESC';\n\t\t$this->searchQ['from'] = 'listing l, listing_level e, listing_type y, pages p'; //should always be the same...\n\t\t$this->searchQ['where'] = array('e.level_id = l.level_id','y.listing_type_id = l.listing_type_id','l.page_id = p.page_id','l.publish = 1');//,'p.publish = 1');\n\t\t\n\t\t\n\t\t//! freetext\n\t\tif( strlen($this->vars['term']) ){\n\t\t\t$this->searchQ['select'][] = \"MATCH(\" . $this->ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE) AS score\";\n\t\t\t//$this->searchQ['where'][] = \"MATCH(\" . $ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE)\";\n\t\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"score > 0\";\n\t\t\t$this->searchQ['orderby'][] = 'score DESC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t\n\t\t//! **** FILTERS ****\n\t\t//! profession\n\t\tif( isset($this->vars['profession']) && strlen($this->vars['profession']) ){\n\t\t\n\t\t\t//$this->searchQ['where'][] = \" l.listing_type_id IN (\" . implode(',', $this->vars['profession']) . \") \";\n\t\t\t$this->searchQ['where'][] = \" l.listing_type_id = \" . (int)$this->vars['profession'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! max price\n\t\tif( isset($this->vars['maxprice']) && is_numeric($this->vars['maxprice']) ){\n\t\t\n\t\t\t$this->searchQ['where'][] = \" l.hourly_rate <= \" . (int)$this->vars['maxprice'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! gender\n\t\tif( isset($this->vars['gender']) && in_array($this->vars['gender'] , array('M','F')) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_gender ltg';\n\t\t\t$this->searchQ['where'][] = \" ltg.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltg.gender = '\" . $this->vars['gender'] . \"' \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\n\t\t//! speciality\n\t\tif( isset($this->vars['speciality']) && is_numeric($this->vars['speciality']) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_age ltag';\n\t\t\t$this->searchQ['where'][] = \" ltag.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltag.age_id = \" . (int)$this->vars['speciality'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\tif( strlen($this->vars['location']) ){\n\t\t\t//! ** build the location query **\n\t\t\t\n\t\t\t$this->Geocode = new Geolocation( $this->vars['location']. ', UK' );\n\t\t\t$this->Geocode->lookup();\n\t\t\t$union = array();\n\t\t\t\n\t\t\t$this->doSearch = true;\n\t\t\t$this->searchQ['orderby'][] = 'distance ASC';\n\t\t\t$c = 1;\t\n\t\t\tforeach($this->searchLevels as $level_id => $distance){\n\t\t\t// set up the initial search variables\t\t\n\t\t\t//! location\n\t\t\t\t\n\t\t\t\t//load in current other query info for this level\n\t\t\t\t$l_select = $this->searchQ['select'];\n\t\t\t\t$l_where = $this->searchQ['where'];\n\t\t\t\t$l_having = $this->searchQ['having'];\n\t\t\t\t\n\t\t\t\t// using the OS grid as makes calculation simpler than using lng/lat - can use simple pythag rather than calculus functions\n\t\t\t\t// we shorten the list of rows needing the calculation by the greater / less than in the where\n\t\t\t\t\n\t\t\t\t$calculation = ' SQRT(POW(( l.easting - ' . round($this->Geocode->getOSEast()) . '),2) + POW((l.northing - ' . round($this->Geocode->getOSNorth()) . '),2)) ';\n\t\t\t\t$l_select[] = $calculation . \" AS distance\";\n\t\t\t\t$l_where[] = \"l.level_id = \" . $level_id;\n\t\t\t\t$l_where[] = \"northing < \" . round( $this->Geocode->getOSNorth() + $distance ) ; \n\t\t\t\t$l_where[] = \"northing > \" . round( $this->Geocode->getOSNorth() - $distance ) ;\n\t\t\t\t$l_where[] = \"easting < \" . round( $this->Geocode->getOSEast() + $distance ) ;\n\t\t\t\t$l_where[] = \"easting > \" . round( $this->Geocode->getOSEast() - $distance ) ;\n\t\t\t//\t$this->searchQ['where'][] = \"(\" . $calculation . \") <= \" . $this->searchDistance ;\n\t\t\t// use having rather than where\n\t\t\t\t$l_having[] = \"distance <= \" . $distance;\n\t\t\t\t//$this->searchQ['orderby'][] = 'distance ASC';\n\t\t\t\t\n\t\t\t\t$l_q = \"SELECT \" . (($this->numRows) && 1 == $c ?' SQL_CALC_FOUND_ROWS ':'') . implode(',', $l_select). \"\n\t\t\t\t\tFROM \" . $this->searchQ['from'] . \"\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t\" . implode(' AND ', $l_where) ;\n\t\n\t\t\t\tif( count($l_having) ){\n\t\t\t\t\t$l_q .= \" HAVING \" . implode(' AND ' , $l_having);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$union[] = $l_q;\n\t\t\t\t$c++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$q = '(' . implode(' ) UNION ALL (', $union) . ') ';\n\t\t\t\n\t\t\t$q .= \"\tORDER BY \" . implode(',', $this->searchQ['orderby']) . \" \";\n\t\t\t$q .= \"\tLIMIT \" . ( ($this->page-1)* $this->limit) . \",\" . $this->limit . \" \";\n\t\t\n\t\t\n\t\t}else{\n\t\t\n\t\t\n\t\t\t//! ** build the non-location query **\n\t\t\t$q = \"SELECT \" . (($this->numRows)?' SQL_CALC_FOUND_ROWS ':'') . implode(',', $this->searchQ['select']). \"\n\t\t\t\t\tFROM \" . $this->searchQ['from'] . \"\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t\" . implode(' AND ', $this->searchQ['where']) ;\n\t\t\t\t\t\t\n\t\t\tif( isset($this->searchQ['having']) && count($this->searchQ['having']) ){\n\t\t\t\t$q .= \" HAVING \" . implode(' AND ' , $this->searchQ['having']);\n\t\t\t}\n\t\t\t\n\t\t\t$q .= \"\tORDER BY \" . implode(',', $this->searchQ['orderby']) . \" \";\n\t\n\t\t\t$q .= \"\tLIMIT \" . ( ($this->page-1)* $this->limit) . \",\" . $this->limit . \" \"; \n\t\t}\n\t\t//echo $q;\t\t\n\t\treturn $q;\n\t\t\n\t}", "protected function getOrderByQuery()\n {\n\t\t$isWhat = $this->model->isWhat();\n\t\t$remoteTable = $this->model->tableName();\n\t\t$localOrderBy = [];\n\t\t$relations = [\n\t\t\t\\nitm\\widgets\\models\\Vote::tableName() => [\n\t\t\t\t'select' => new Expression('COUNT(*)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Issues::tableName() => [\n\t\t\t\t'select' => new Expression('COALESCE(created_at, updated_at)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Replies::tableName() => [\n\t\t\t\t'select' => new Expression('COALESCE(created_at, updated_at)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Revisions::tableName() => [\n\t\t\t\t'select' => ['COUNT(*)'],\n\t\t\t]\n\t\t];\n\t\tforeach($relations as $table=>$relation){\n\t\t\t$localOrderBy[serialize(new Expression('('.(new Query)\n\t\t\t\t->from($table)\n\t\t\t\t->select($relation['select'])\n\t\t\t\t->where([\n\t\t\t\t\t\"$table.parent_id\" => \"$remoteTable.id\",\n\t\t\t\t\t\"$table.parent_type\" => $isWhat\n\t\t\t\t])->createCommand()->getRawSql().')'))] = SORT_DESC;\n\t\t}\n $localOrderBy = array_merge($localOrderBy, [\n serialize(new Expression(\"(CASE $remoteTable.status\n\t\t\t\tWHEN 'normal' THEN 0\n\t\t\t\tWHEN 'important' THEN 1\n\t\t\t\tWHEN 'critical' THEN 2\n\t\t\tEND)\")) => SORT_DESC,\n ]);\n\n return array_merge($localOrderBy, \\nitm\\helpers\\QueryFilter::getOrderByQuery($this->model));\n }", "public function getListQuery();", "public function sort()\n {\n $this->repository->sort(Input::all());\n }", "protected function getListQuery()\n\t{\n\t\t$db = $this->getDbo();\n\n\t\t$query = $db->getQuery(true)\n\t\t\t// Select the required fields from the table.\n\t\t\t->select(\n\t\t\t\t$this->getState(\n\t\t\t\t\t'list.select',\n\t\t\t\t\t'a.*'\n\t\t\t\t)\n\t\t\t)\n\t\t\t->from($db->quoteName('#__snippets', 'a'));\n\n\t\t// Filter by published state\n\t\t$state = $this->getState('filter.state');\n\t\tif (is_numeric($state))\n\t\t{\n\t\t\t$query->where($db->quoteName('a.published') . ' = ' . ( int ) $state);\n\t\t}\n\t\telse if ($state == '')\n\t\t{\n\t\t\t$query->where('( ' . $db->quoteName('a.published') . ' IN ( 0,1,2 ) )');\n\t\t}\n\n\t\t$category = $this->getState('filter.category');\n\t\tif ($category != '')\n\t\t{\n\t\t\t$query->where($db->quoteName('a.category') . ' = ' . $db->quote($category));\n\t\t}\n\n\t\t// Filter the list over the search string if set.\n\t\t$search = $this->getState('filter.search');\n\t\tif ( ! empty($search))\n\t\t{\n\t\t\tif (stripos($search, 'id:') === 0)\n\t\t\t{\n\t\t\t\t$query->where($db->quoteName('a.id') . ' = ' . ( int ) substr($search, 3));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$search = $db->quote('%' . $db->escape($search, true) . '%');\n\t\t\t\t$query->where(\n\t\t\t\t\t'( ' . $db->quoteName('a.name') . ' LIKE ' . $search .\n\t\t\t\t\t' OR ' . $db->quoteName('a.alias') . ' LIKE ' . $search .\n\t\t\t\t\t' OR ' . $db->quoteName('a.description') . ' LIKE ' . $search .\n\t\t\t\t\t' OR ' . $db->quoteName('a.category') . ' LIKE ' . $search . ' )'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Add the list ordering clause.\n\t\t$ordering = $this->state->get('list.ordering', 'a.ordering');\n\t\t$direction = $this->state->get('list.direction', 'ASC');\n\n\t\tif ( ! in_array($ordering, $this->filter_fields))\n\t\t{\n\t\t\t$ordering = 'a.ordering';\n\t\t}\n\n\t\tif ($ordering == 'a.ordering')\n\t\t{\n\t\t\t$query->order($db->quoteName('a.category') . ' ' . $db->escape($direction));\n\t\t}\n\n\t\t$query->order($db->quoteName($db->escape($ordering)) . ' ' . $db->escape($direction));\n\n\t\treturn $query;\n\t}", "function getOrderingAndPlaygroundQuery()\n\t{\n\t\treturn 'SELECT ordering AS value,name AS text FROM #__joomleague_playground ORDER BY ordering';\n\t}", "protected function getListQuery() {\r\n $db = $this->getDbo();\r\n $query = $db->getQuery(true);\r\n $user = JFactory::getUser();\r\n \r\n // Select the required field from the table.\r\n $query->select(\r\n $this->getState(\r\n 'list.select',\r\n 'a.id, a.hospital, a.turno'.\r\n ', a.created, a.created_by'\r\n )\r\n );\r\n $query->from('#__auditoria AS a');\r\n \r\n // Join over the users for the author.\r\n $query->select('ua.name AS author_name');\r\n $query->join('LEFT', '#__users AS ua ON ua.id = a.created_by');\r\n \r\n // Join over the hospitals.\r\n $query->select('h.name AS hospital_name');\r\n $query->join('LEFT', '#__hospitals AS h ON h.id = a.hospital');\r\n \r\n // Join over the turnos.\r\n $query->select('t.name AS turno_name');\r\n $query->join('LEFT', '#__hospital_shifts AS t ON t.id = a.turno');\r\n \r\n // Filter by author\r\n\t$authorId = $this->getState('filter.author_id');\r\n\tif (is_numeric($authorId)) {\r\n $type = $this->getState('filter.author_id.include', true) ? '= ' : '<>';\r\n $query->where('a.created_by '.$type.(int) $authorId);\r\n\t}\r\n \r\n // Filter by hospital\r\n $hospitalId = $this->getState('filter.hospital_id');\r\n if (is_numeric($hospitalId)) {\r\n $query->where('a.hospital ='.(int) $hospitalId);\r\n }\r\n \r\n // Filter by turno\r\n $turnoId = $this->getState('filter.turno_id');\r\n if (is_numeric($turnoId)) {\r\n $query->where('a.turno ='.(int) $turnoId);\r\n }\r\n \r\n // Add the list ordering clause.\r\n $orderCol = $this->state->get('list.ordering');\r\n $orderDirn = $this->state->get('list.direction');\r\n \r\n $query->order($db->getEscaped($orderCol.' '.$orderDirn));\r\n \r\n return $query;\r\n }", "public function order();", "protected function getListQuery()\t{\n\t\t\n\t\t\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t\n\t\t// Select all fields from the table.\n\t\t$query->select($this->getState('list.select', 'ct.*'));\n\t\t$query->from($db->quoteName('#__content').' AS ct');\n\t\t\n\t\t$query->join('INNER', $db->quoteName('#__jbusinessdirectory_company_articles').' AS ca on ct.id = ca.article_id');\n\t\t\n\t\t$query->select(\"c.name as company_name\");\n\t\t$query->join('INNER', $db->quoteName('#__jbusinessdirectory_companies').' AS c on c.id = ca.company_id');\n\t\t\n\t\t// Join over the users for the author.\n\t\t$query->select('ua.name AS author_name')\n\t\t->join('LEFT', '#__users AS ua ON ua.id = ct.created_by');\n\t\t\n\t\t$user = JFactory::getUser();\n\t\t$query->where(\"c.userId = \".$user->id);\n\t\t\n\t\t// Filter by search in title.\n\t\t$search = $this->getState('filter.search');\n\t\tif (!empty($search)) {\n\t\t $query->where(\"ct.title LIKE '%\".trim($db->escape($search)).\"%' or c.name LIKE '%\".trim($db->escape($search)).\"%'\");\n\t\t}\n\t\t\n\t\t$query->group('ct.id');\n\t\t\n\t\t// Add the list ordering clause.\n\t\t$query->order($db->escape($this->getState('list.ordering', 'ct.id')).' '.$db->escape($this->getState('list.direction', 'DESC')));\n\t\t\n\t\treturn $query;\n\t}", "private function formedCatalogParamatterSortQuery($parametter_array = array()) {\n // $this->db->order_by('site_catalog.in_stock', 'DESC');\n // $this->db->order_by('site_catalog.position', 'aSC');\n\n if (!is_array($parametter_array) || empty($parametter_array)) return false;\n\n if (isset($parametter_array['sort'][0])) {\n\n switch($parametter_array['sort'][0]) {\n\n case 'cheap': {\n\n $this->db\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('price', 'ASC')\n ;\n\n } break;\n\n case 'news': {\n\n $this->db\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('site_catalog.shareid', 'DESC')\n ;\n\n } break;\n\n case 'discounts': {\n\n $this->db\n \n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('site_catalog.old_price', 'ASC')\n\n ;\n\n } break;\n\n case 'popular': {\n\n $this->db\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('site_catalog.countwatch', 'DESC')\n ;\n\n } break;\n\n case 'expansiv': {\n\n $this->db\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('price', 'DESC')\n // ->order_by('site_catalog.countwatch', 'DESC')\n ;\n\n } break;\n\n default: {\n\n $this->db\n ->order_by('site_catalog.product-visible', 'DESC')\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('site_catalog.position', 'ASC')\n ;\n\n } break;\n\n }\n\n }\n\n }", "public function getOrderedListAction()\r\n {\r\n // merge filter and tFilter\r\n $jsonFilter = $this->params()->fromQuery('filter', '[]');\r\n $jsonTFilter = $this->params()->fromQuery('tFilter', '[]');\r\n $filterArray = Json::decode($jsonFilter, Json::TYPE_ARRAY);\r\n $tFilterArray = Json::decode($jsonTFilter, Json::TYPE_ARRAY);\r\n $filters = array_merge($tFilterArray, $filterArray);\r\n $sort = Json::decode($this->params()->fromQuery('sort', null), Json::TYPE_ARRAY);\r\n $start = Json::decode($this->params()->fromQuery('start', null), Json::TYPE_ARRAY);\r\n $limit = Json::decode($this->params()->fromQuery('limit', null), Json::TYPE_ARRAY);\r\n $mongoFilters = $this->_buildFilter($filters);\r\n return new JsonModel($this->_dataService->getOrderedList($mongoFilters, $sort, $start, $limit, false));\r\n }", "function absenrich_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\r\n\t\t$result=$this->m_absensi_enrichment->absenrich_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "public function sort();", "public function sortQuery(): static\n {\n return new static($this->uri->withQuery(\n static::normalizeComponent(\n Query::fromUri($this->uri)->sort()->value(),\n $this->uri\n )\n ));\n }", "public function getSortBy();", "protected function getListQuery()\n {\n // Create a new query object\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n // Select required fields\n $query->select(\n $this->getState(\n 'list.select',\n 'k.id, k.key, k.user_id, k.daily_requests, k.expiration_date, k.comment, k.hits, k.last_visit, DATE_FORMAT(k.current_day, \"%Y-%m-%d\") as current_day, k.current_hits, k.ordering, k.published, k.checked_out, k.checked_out_time'\n )\n );\n\n // From the table\n $query->from('#__jbackend_keys AS k');\n\n // Join with the user\n $query->join('LEFT', $db->quoteName('#__users') . ' ku ON ku.id=k.user_id')\n ->select('ku.name as user_name, ku.username as user_username, ku.email as user_email');\n\n // Join over the users for the checked out user\n $query->select('uc.name AS editor');\n $query->join('LEFT', '#__users AS uc ON uc.id = k.checked_out');\n\n // Filter by state\n $state = $this->getState('filter.state');\n if (is_numeric($state)) {\n $query->where('(k.published = '.(int) $state.')');\n } else if ($state === '') {\n $query->where('(k.published IN (0, 1))'); // By default only published and unpublished\n }\n\n // Filter by search\n $search = $this->getState('filter.search');\n if (!empty($search)) {\n $query->where('(LOWER(k.key) LIKE '.$db->quote('%'.$db->escape($search, true).'%').' OR LOWER(k.comment) LIKE '.$db->quote('%'.$db->escape($search, true).'%').')');\n }\n\n // Add the list ordering clause\n $orderCol = $this->state->get('list.ordering', 'k.ordering');\n $orderDirn = $this->state->get('list.direction', 'asc');\n $query->order($db->escape($orderCol.' '.$orderDirn));\n\n return $query;\n }", "public function buildQuery() {\n\t\t\tif (isset($this->postTypes[$this->postType])) {\n\t\t\t\t$this->SetFilter('type', array($this->postTypes[$this->postType] + 1));\n\t\t\t}\n\t\t\t$this->SetFilter('status', array(1));\n\t\t\tswitch ($this->matchMode) {\n\t\t\t\tcase 'any';\n\t\t\t\tdefault:\n\t\t\t\t\t$this->SetMatchMode(SPH_MATCH_ALL);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tswitch ($this->sortMode) {\n\t\t\t\tcase 'posted':\n\t\t\t\t\t$this->SetSortMode(SPH_SORT_EXTENDED, 'posted DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'relevance':\n\t\t\t\t\t$this->SetSortMode(SPH_SORT_EXTENDED, '@relevance DESC, posted DESC');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'top':\n\t\t\t\tdefault:\n\t\t\t\t\t$this->SetSortMode(SPH_SORT_EXPR, 'upvotes - downvotes + @weight + LN(posted) * 1000');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$this->SetLimits((int) $this->currentPage, (int) $this->pageLimit, (int) $this->resultLimit);\n\t\t}", "protected function getListQuery()\n\t{\n\t\t// Create a new query object.\t\t\n\t\t$db = JFactory::getDBO();\n\t\t$query = $db->getQuery(true);\n\t\t$user\t= JFactory::getUser();\n\t\t// Select some fields\n\t\t$query->select('a.*');\n\t\t// From the Avail_Calendar table\n\t\t$query->from('#__avail_calendar AS a');\n\t\t\n\t\t// Filter by search in title.\n\t\t$search = $this->getState('filter.search');\n\t\tif (!empty($search)) {\n\t\t\tif (stripos($search, 'id:') === 0) {\n\t\t\t\t$query->where('a.id = '.(int) substr($search, 3));\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t$search = $db->Quote('%'.$db->getEscaped($search, true).'%');\n\t\t\t\t\n\t\t\t\t$query->where('a.name LIKE '.$search );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add the list ordering clause.\n\t\t$orderCol\t= $this->state->get('list.ordering');\n\t\t$orderDirn\t= $this->state->get('list.direction');\n\t\t\n\t\t$query->order($db->getEscaped($orderCol.' '.$orderDirn));\n\t\t//echo nl2br(str_replace('#__','jos_',$query));\n\t\treturn $query;\n\t}", "private function makeQuery(){\n\t\t\n\t\t$this->searchQ['select'] = array('l.name','l.summary','l.sum_approach','l.sum_problems','l.address_line_1','l.address_line_2','l.town','l.county','l.postcode','l.country','l.phone','l.latitude','l.longitude','l.publish_address','l.publish_phone','l.approved','p.uri','p.urlname','e.level','y.listing_type');\n\t\t$this->searchQ['select'][] = '(SELECT i.image FROM listing_images i WHERE l.listing_id=i.listing_id ORDER BY i.sort_order ASC LIMIT 1) AS image';\n\t\t$this->searchQ['from'] = 'listing_level e, listing_type y, pages p, listing l '; //should always be the same...\n\t\t$this->searchQ['where'] = array('e.level_id = l.level_id','y.listing_type_id = l.listing_type_id','l.page_id = p.page_id','l.publish = 1');//,'p.publish = 1');\n\t\t\n\t\t// set up the initial search variables\t\t\n\t\t//! location\n\t\tif( strlen($this->vars['location']) ){\n\t\t\n\t\t\t$this->Geocode = new Geolocation( $this->vars['location']. ', UK' );\n\t\t\t$this->Geocode->lookup();\n\t\t\t// using the OS grid as makes calculation simpler than using lng/lat - can use simple pythag rather than calculus functions\n\t\t\t// we shorten the list of rows needing the calculation by the greater / less than in the where\n\t\t\t\n\t\t\t$calculation = ' SQRT(POW(( l.easting - ' . round($this->Geocode->getOSEast()) . '),2) + POW((l.northing - ' . round($this->Geocode->getOSNorth()) . '),2)) ';\n\t\t\t$this->searchQ['select'][] = $calculation . \" AS distance\";\n\t\t\t$this->searchQ['where'][] = \"northing < \" . round( $this->Geocode->getOSNorth() + $this->searchDistance ) ; \n\t\t\t$this->searchQ['where'][] = \"northing > \" . round( $this->Geocode->getOSNorth() - $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting < \" . round( $this->Geocode->getOSEast() + $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting > \" . round( $this->Geocode->getOSEast() - $this->searchDistance ) ;\n\t\t//\t$this->searchQ['where'][] = \"(\" . $calculation . \") <= \" . $this->searchDistance ;\n\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"distance <= \" . $this->searchDistance;\n\t\t\t//$this->searchQ['orderby'][] = '(distance - ((l.level_id-1)*16000)) ASC'; // (x^3 -400^3)^(1/3)\n\t\t\t\n\t\t\t// using a exponential function to order distances based on the listing level and multiplying by 16000 m = 16km = 10 miles\n\t\t\t// then raising to power 3, deleteing the distance cubed and then 1/3 (cube root), so only makes a diffenrce within that area\n\t\t\t\n\t\t\t$this->searchQ['orderby'][] = ' POW( (POW( distance ,3) - POW(((l.level_id-1)*' . $this->levelMultiplier. '),3)),(1/3)) ASC ';\n\t\t\t$this->searchQ['orderby'][] = 'l.level_id DESC';\n\t\t\t$this->doSearch = true;\n\t\t}else{\n\t\t\t$this->searchQ['orderby'][] = 'l.level_id DESC';\n\t\t}\n\t\t\n\t\t//! freetext\n\t\tif( strlen($this->vars['term']) ){\n\t\t\t$this->searchQ['select'][] = \"MATCH(\" . $this->ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE) AS score\";\n\t\t\t//$this->searchQ['where'][] = \"MATCH(\" . $ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE)\";\n\t\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"score > 0\";\n\t\t\t$this->searchQ['orderby'][] = 'score DESC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t\n\t\t//! **** FILTERS ****\n\t\t//! profession\n\t\tif( isset($this->vars['profession']) && strlen($this->vars['profession']) ){\n\t\t\n\t\t\t//$this->searchQ['where'][] = \" l.listing_type_id IN (\" . implode(',', $this->vars['profession']) . \") \";\n\t\t\t$this->searchQ['where'][] = \" l.listing_type_id = \" . (int)$this->vars['profession'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! max price\n\t\tif( isset($this->vars['maxprice']) && is_numeric($this->vars['maxprice']) ){\n\t\t\n\t\t\t$this->searchQ['where'][] = \" l.hourly_rate <= \" . (int)$this->vars['maxprice'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! gender\n\t\tif( isset($this->vars['gender']) && in_array($this->vars['gender'] , array('M','F')) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_gender ltg';\n\t\t\t$this->searchQ['where'][] = \" ltg.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltg.gender = '\" . $this->vars['gender'] . \"' \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\n\t\t//! speciality\n\t\tif( isset($this->vars['speciality']) && is_numeric($this->vars['speciality']) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_age ltag';\n\t\t\t$this->searchQ['where'][] = \" ltag.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltag.age_id = \" . (int)$this->vars['speciality'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! ** build the query **\n\t\t$q = \"SELECT \" . (($this->numRows)?' SQL_CALC_FOUND_ROWS ':'') . implode(',', $this->searchQ['select']). \"\n\t\t\t\tFROM \" . $this->searchQ['from'] . \"\n\t\t\t\tWHERE\n\t\t\t\t\t\" . implode(' AND ', $this->searchQ['where']) ;\n\n\t\tif( isset($this->searchQ['having']) && count($this->searchQ['having']) ){\n\t\t\t$q .= \" HAVING \" . implode(' AND ' , $this->searchQ['having']);\n\t\t}\n\t\t\n\t\t$q .= \"\tORDER BY \" . implode(',', $this->searchQ['orderby']) . \" \";\n\t\t\n\t\t$q .= \"\tLIMIT \" . ( ($this->page-1)* $this->limit) . \",\" . $this->limit . \" \"; \n\t\n\t\treturn $q;\n\t\t\n\t}", "function SetUpSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$fs_multijoin_v->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$fs_multijoin_v->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->id); // id\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->mount); // mount\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->path); // path\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->parent); // parent\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->deprecated); // deprecated\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->name); // name\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->snapshot); // snapshot\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->tapebackup); // tapebackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->diskbackup); // diskbackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->type); // type\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT); // CONTACT\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT2); // CONTACT2\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->RESCOMP); // RESCOMP\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "private function buildQuery()\n {\n $params = JComponentHelper::getParams('com_easybookreloaded');\n\n // If type is feed, then the order has to be DESC to get the latest entries in the feed reader\n $document = JFactory::getDocument();\n\n if($document->getType() == 'feed')\n {\n $order = 'DESC';\n }\n else\n {\n $order = $params->get('entries_order', 'DESC');\n }\n\n // Check whether limit is already set - e.g. from feed function\n $limit = JFactory::getApplication()->input->getInt('limit', 0);\n\n if(empty($limit))\n {\n $limit = (int)$params->get('entries_perpage', 5);\n }\n\n $start = JFactory::getApplication()->input->getInt('limitstart', 0);\n\n if(_EASYBOOK_CANEDIT)\n {\n $query = \"SELECT * FROM \".$this->_db->quoteName('#__easybook').\" ORDER BY \".$this->_db->quoteName('gbdate').\" \".$order.\" LIMIT \".$start.\", \".$limit;\n }\n else\n {\n $query = \"SELECT * FROM \".$this->_db->quoteName('#__easybook').\" WHERE \".$this->_db->quoteName('published').\" = 1 ORDER BY \".$this->_db->quoteName('gbdate').\" \".$order.\" LIMIT \".$start.\", \".$limit;\n }\n\n return $query;\n }", "public function shortlisted_property_list($post_data){\n $loginUserId = $post_data['loginUserId'];\n $userId = $post_data['userId'];\n $searchId = $post_data['searchId'];\n $keyword = $post_data['keyword'];\n $latitude = $post_data['latitude'];\n $longitude = $post_data['longitude'];\n $limit = $post_data['limit'];\n $offset = $post_data['offset'];\n $sortBy = array_key_exists(\"sortBy\",$post_data);\n if($sortBy){ \n $sortBy = $post_data['sortBy']; //rate/commuteTime/price\n unset($post_data['sortBy']);\n }else{\n $sortBy = \"\";\n }\n $orderBy = array_key_exists(\"orderBy\",$post_data);\n if($orderBy){ \n $orderBy = $post_data['orderBy']; //ASC/DESC\n unset($post_data['orderBy']);\n }else{\n $orderBy = \"DESC\";\n }\n\n //$sortBy = $post_data['sortBy']; //rate/commuteTime/\n // $filter = $post_data['filter']; //fav_teacher/all\n // $type = $post_data['type']; // upcoming/past\n \n\n if(!empty($keyword)){\n $keyword = \"AND (s.searchName LIKE '%$keyword%' OR s.idealMovingDate LIKE '%$keyword%' OR s.houseType LIKE '%$keyword%' OR s.priceRange LIKE '%$keyword%' OR s.bedroom LIKE '%$keyword%')\";\n }\n\n if(!empty($latitude) && !empty($longitude))\n {\n $distance_in_km = \"( 6371 * acos( cos( radians($latitude) ) * cos( radians( lc.latitude) ) \n * cos( radians( lc.longitude ) - radians($longitude) ) + \n sin( radians($latitude) ) * sin( radians( lc.latitude ) ) ) ) \n AS distance_in_km\";\n }\n\n if($sortBy == \"rating\"){ \n $sortBy = \"ORDER BY s.avgPropertyRating $orderBy\";\n }else if($sortBy == \"commuteTime\"){\n $sortBy = \"ORDER BY s.commuteTime $orderBy\";\n }else if($sortBy == \"price\"){\n $sortBy = \"ORDER BY s.price $orderBy\";\n }\n else{\n $sortBy = \"ORDER BY s.createdAt DESC\";\n }\n\n if (!empty($latitude) && !empty($longitude)) {\n\n $sql = \"SELECT s.*,u.userId,u.firstName,u.lastName,((SELECT COUNT(*) FROM comments c where c.shortlistedId = s.shortlistedId AND c.searchId = s.searchId AND c.deleteFlag !=1) - (SELECT COUNT(*) FROM commentsread r where r.shortlistedId = s.shortlistedId AND r.userId = $loginUserId)) as new_comment_count,\n (SELECT COUNT(*) FROM comments c where c.shortlistedId = s.shortlistedId AND c.searchId = s.searchId AND c.deleteFlag !=1) as total_comments_count\n FROM shortlistedproperty s \n left join users u on s.userId = u.userId\n where s.searchId= $searchId AND s.userId = $userId AND s.deleteFlag != 1\n $keyword $sortBy LIMIT $offset, $limit\";\n }else{\n\n $sql = \"SELECT s.*,u.userId,u.firstName,u.lastName,((SELECT COUNT(*) FROM comments c where c.shortlistedId = s.shortlistedId AND c.searchId = s.searchId AND c.deleteFlag !=1) - (SELECT COUNT(*) FROM commentsread r where r.shortlistedId = s.shortlistedId AND r.userId = $loginUserId)) as new_comment_count,\n (SELECT COUNT(*) FROM comments c where c.shortlistedId = s.shortlistedId AND c.searchId = s.searchId AND c.deleteFlag !=1) as total_comments_count\n FROM shortlistedproperty s \n left join users u on s.userId = u.userId\n where s.searchId= $searchId AND s.userId = $userId AND s.deleteFlag != 1\n $keyword $sortBy LIMIT $offset, $limit\";\n }\n\n //echo $sql;exit();\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n return $record->result_array();\n } \n }", "public function executeSort(sfWebRequest $request)\n {\n $this->objects = $this->getTableForSorting()->queryOrdered()->execute();\n }", "function master_jual_rawat_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$result=$this->m_master_jual_rawat->master_jual_rawat_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "function query() {\n $this->ensure_my_table();\n switch ($this->options['granularity']) {\n case 'second':\n default:\n $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']);\n return;\n case 'minute':\n $formula = views_date_sql_format('YmdHi', \"$this->table_alias.$this->real_field\");\n break;\n case 'hour':\n $formula = views_date_sql_format('YmdH', \"$this->table_alias.$this->real_field\");\n break;\n case 'day':\n $formula = views_date_sql_format('Ymd', \"$this->table_alias.$this->real_field\");\n break;\n case 'month':\n $formula = views_date_sql_format('Ym', \"$this->table_alias.$this->real_field\");\n break;\n case 'year':\n $formula = views_date_sql_format('Y', \"$this->table_alias.$this->real_field\");\n break;\n }\n\n // Add the field.\n $this->query->add_orderby(NULL, $formula, $this->options['order'], $this->table_alias . '_' . $this->field . '_' . $this->options['granularity']);\n }", "protected function getListQuery() {\n // Create a new query object.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select(\n $this->getState('DISTINCT ' .\n 'list.select', ' a.id,a.guid,a.ordering,a.name,a.alias,a.ordertype_id,a.orderstate_id,a.archived,a.user_id,a.sent,a.completed,a.created_by,a.created'\n )\n );\n\n $query->from('#__sdi_order AS a');\n\n // Join over the users for the checked out user.\n $query->select('uc.name AS editor');\n $query->join('LEFT', '#__users AS uc ON uc.id=a.checked_out');\n\n // Join over the user field 'user'\n $query->select($db->quoteName('users2.name', 'user'))\n ->select($db->quoteName('users2.username', 'username'))\n ->innerJoin('#__sdi_user AS sdi_user ON sdi_user.id = a.user_id')\n ->innerJoin('#__users AS users2 ON users2.id = sdi_user.user_id');\n\n // Join over the orderstate field 'orderstate'\n $query->select('orderstate.value AS orderstate')\n ->innerJoin('#__sdi_sys_orderstate AS orderstate ON orderstate.id = a.orderstate_id');\n\n $query->group('orderstate.value');\n\n // Join over the ordertype field 'ordertype'\n $query->select('ordertype.value AS ordertype')\n ->innerJoin('#__sdi_sys_ordertype AS ordertype ON ordertype.id = a.ordertype_id');\n\n $query->group('ordertype.value');\n // Filter by ordertype type\n $ordertype = $this->getState('filter.ordertype');\n if (is_numeric($ordertype)) {\n $query->where('a.ordertype_id = ' . (int) $ordertype);\n }\n\n // Filter by orderstate state\n $orderstate = $this->getState('filter.orderstate');\n if (is_numeric($orderstate)) {\n $query->where('a.orderstate_id = ' . (int) $orderstate);\n }\n\n // Filter by order archived state\n $orderarchived = $this->getState('filter.orderarchived');\n if (is_numeric($orderarchived)) {\n $query->where('a.archived = ' . (int) $orderarchived);\n }\n\n // Filter by order user\n $orderuser = $this->getState('filter.orderuser');\n if (is_numeric($orderuser)) {\n $query->where('a.user_id = ' . (int) $orderuser);\n }\n\n // Filter by order user's organism\n $orderuserorganism = $this->getState('filter.orderuserorganism');\n if (is_numeric($orderuserorganism)) {\n $query->innerJoin('#__sdi_user_role_organism AS uro ON sdi_user.id = uro.user_id AND uro.role_id = 1');\n $query->where('uro.organism_id = ' . (int) $orderuserorganism);\n }\n\n // Filter by orderprovider state\n $orderprovider = $this->getState('filter.orderprovider');\n if (is_numeric($orderprovider)) {\n $query\n ->innerJoin('#__sdi_order_diffusion AS order_diffusion2 ON order_diffusion2.order_id = a.id')\n ->innerJoin('#__sdi_diffusion AS diffusion2 ON diffusion2.id = order_diffusion2.diffusion_id')\n ->innerJoin('#__sdi_version AS version2 ON version2.id = diffusion2.version_id')\n ->innerJoin('#__sdi_resource AS resource2 ON resource2.id = version2.resource_id')\n ->where('resource2.organism_id = ' . (int) $orderprovider);\n }\n\n // Filter by orderdiffusion state\n $orderdiffusion = $this->getState('filter.orderdiffusion');\n if (is_numeric($orderdiffusion)) {\n $query\n ->innerJoin('#__sdi_order_diffusion AS order_diffusion3 ON order_diffusion3.order_id =a.id')\n ->where('order_diffusion3.diffusion_id = ' . (int) $orderdiffusion);\n }\n\n // Filter by ordersent state\n $ordersent = $this->getState('filter.ordersent');\n if ($ordersent !== '') {\n // Get UTC for now.\n $dNow = new JDate;\n $dStart = clone $dNow;\n\n switch ($ordersent) {\n case 'past_week':\n $dStart->modify('-7 day');\n break;\n\n case 'past_1month':\n $dStart->modify('-1 month');\n break;\n\n case 'past_3month':\n $dStart->modify('-3 month');\n break;\n\n case 'past_6month':\n $dStart->modify('-6 month');\n break;\n\n case 'post_year':\n case 'past_year':\n $dStart->modify('-1 year');\n break;\n\n case 'today':\n // Ranges that need to align with local 'days' need special treatment.\n $app = JFactory::getApplication();\n $offset = $app->getCfg('offset');\n\n // Reset the start time to be the beginning of today, local time.\n $dStart = new JDate('now', $offset);\n $dStart->setTime(0, 0, 0);\n\n // Now change the timezone back to UTC.\n $tz = new DateTimeZone('GMT');\n $dStart->setTimezone($tz);\n break;\n }\n\n if ($ordersent == 'post_year') {\n $query->where(\n 'a.sent < ' . $db->quote($dStart->format('Y-m-d H:i:s'))\n );\n } else {\n $query->where(\n 'a.sent >= ' . $db->quote($dStart->format('Y-m-d H:i:s')) .\n ' AND a.sent <=' . $db->quote($dNow->format('Y-m-d H:i:s'))\n );\n }\n }\n\n // Filter by ordercompleted state\n $ordercompleted = $this->getState('filter.ordercompleted');\n if ($ordercompleted !== '') {\n // Get UTC for now.\n $dNow = new JDate;\n $dStart = clone $dNow;\n\n switch ($ordercompleted) {\n case 'past_week':\n $dStart->modify('-7 day');\n break;\n\n case 'past_1month':\n $dStart->modify('-1 month');\n break;\n\n case 'past_3month':\n $dStart->modify('-3 month');\n break;\n\n case 'past_6month':\n $dStart->modify('-6 month');\n break;\n\n case 'post_year':\n case 'past_year':\n $dStart->modify('-1 year');\n break;\n\n case 'today':\n // Ranges that need to align with local 'days' need special treatment.\n $app = JFactory::getApplication();\n $offset = $app->getCfg('offset');\n\n // Reset the start time to be the beginning of today, local time.\n $dStart = new JDate('now', $offset);\n $dStart->setTime(0, 0, 0);\n\n // Now change the timezone back to UTC.\n $tz = new DateTimeZone('GMT');\n $dStart->setTimezone($tz);\n break;\n }\n\n if ($ordercompleted == 'post_year') {\n $query->where(\n 'a.completed < ' . $db->quote($dStart->format('Y-m-d H:i:s'))\n );\n } else {\n $query->where(\n 'a.completed >= ' . $db->quote($dStart->format('Y-m-d H:i:s')) .\n ' AND a.completed <=' . $db->quote($dNow->format('Y-m-d H:i:s'))\n );\n }\n }\n\n // Filter by search in title\n $search = $this->getState('filter.search');\n if (!empty($search)) {\n $searchOnId = '';\n if (is_numeric($search)) {\n $searchOnId = ' OR (a.id = ' . (int) $search . ')';\n }\n $search = $db->Quote('%' . $db->escape($search, true) . '%');\n $query->where('(( a.name LIKE ' . $search . ' ) ' . $searchOnId . ' )');\n }\n\n // Add the list ordering clause.\n $orderCol = $this->state->get('list.ordering');\n $orderDirn = $this->state->get('list.direction');\n if ($orderCol && $orderDirn) {\n $query->order($db->escape($orderCol . ' ' . $orderDirn));\n }\n\n //group by order_id\n $query->group('a.id');\n $query->group('a.guid');\n $query->group('a.alias');\n $query->group('a.created_by');\n $query->group('a.created');\n $query->group('a.name');\n $query->group('users2.name');\n $query->group('uc.name');\n $query->group('users2.username');\n\n return $query;\n }", "public static function GetList($aSort=array(), $arFilter=Array())\n\t{\n\t\tglobal $DB;\n\n\t\t$arSqlSearch = Array();\n\t\t$strSqlSearch = \"\";\n\t\t$err_mess = (CRatingRule::err_mess()).\"<br>Function: GetList<br>Line: \";\n\n\t\tif (is_array($arFilter))\n\t\t{\n\t\t\t$filter_keys = array_keys($arFilter);\n\t\t\tfor ($i=0; $i<count($filter_keys); $i++)\n\t\t\t{\n\t\t\t\t$val = $arFilter[$filter_keys[$i]];\n\t\t\t\tif ((string)$val == '' || $val==\"NOT_REF\") continue;\n\t\t\t\tswitch(mb_strtoupper($filter_keys[$i]))\n\t\t\t\t{\n\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\t$arSqlSearch[] = GetFilterQuery(\"PR.ID\", $val, \"N\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"ACTIVE\":\n\t\t\t\t\t\tif(in_array($val, Array('Y', 'N')))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arSqlSearch[] = \"PR.ACTIVE = '\".$val.\"'\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"NAME\":\n\t\t\t\t\t\t$arSqlSearch[] = GetFilterQuery(\"PR.NAME\", $val);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"ENTITY_ID\":\n\t\t\t\t\t\t$arSqlSearch[] = GetFilterQuery(\"PR.ENTITY_ID\", $val);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$sOrder = \"\";\n\t\tforeach($aSort as $key=>$val)\n\t\t{\n\t\t\t$ord = (mb_strtoupper($val) <> \"ASC\"? \"DESC\":\"ASC\");\n\t\t\tswitch(mb_strtoupper($key))\n\t\t\t{\n\t\t\t\tcase \"ID\":\n\t\t\t\t\t$sOrder .= \", PR.ID \".$ord;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"NAME\":\n\t\t\t\t\t$sOrder .= \", PR.NAME \".$ord;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CREATED\":\n\t\t\t\t\t$sOrder .= \", PR.CREATED \".$ord;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"LAST_MODIFIED\":\n\t\t\t\t\t$sOrder .= \", PR.LAST_MODIFIED \".$ord;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"LAST_APPLIED\":\n\t\t\t\t\t$sOrder .= \", PR.LAST_APPLIED \".$ord;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ACTIVE\":\n\t\t\t\t\t$sOrder .= \", PR.ACTIVE \".$ord;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CALCULATION_METHOD\":\n\t\t\t\t\t$sOrder .= \", PR.CALCULATION_METHOD \".$ord;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ENTITY_TYPE_ID\":\n\t\t\t\t\t$sOrder .= \", PR.ENTITY_TYPE_ID \".$ord;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ($sOrder == '')\n\t\t\t$sOrder = \"PR.ID DESC\";\n\n\t\t$strSqlOrder = \" ORDER BY \".TrimEx($sOrder,\",\");\n\n\t\t$strSqlSearch = GetFilterSqlSearch($arSqlSearch);\n\t\t$strSql = \"\n\t\t\tSELECT\n\t\t\t\tPR.ID, PR.NAME, PR.ACTIVE, PR.ENTITY_TYPE_ID,\n\t\t\t\t\".$DB->DateToCharFunction(\"PR.CREATED\").\" CREATED,\n\t\t\t\t\".$DB->DateToCharFunction(\"PR.LAST_APPLIED\").\" LAST_APPLIED,\n\t\t\t\t\".$DB->DateToCharFunction(\"PR.LAST_MODIFIED\").\" LAST_MODIFIED\n\t\t\tFROM\n\t\t\t\tb_rating_rule PR\n\t\t\tWHERE\n\t\t\t\".$strSqlSearch.\"\n\t\t\t\".$strSqlOrder;\n\t\t$res = $DB->Query($strSql, false, $err_mess.__LINE__);\n\n\t\treturn $res;\n\t}", "function select_list($query,$order_by,$order_is,$limits){\n\t\t// Checking order data\n\t\tif($order_by==''){\n\t\t\t$ord='';\n\t\t} else {\n\t\t\tif($order_is==''){\n\t\t\t\t$ord_is='ASC';\n\t\t\t} else {\n\t\t\t\tif($order_is=='asc'){\n\t\t\t\t\t$ord_is='ASC';\n\t\t\t\t} elseif($order_is=='desc') {\n\t\t\t\t\t$ord_is='DESC';\n\t\t\t\t} else {\n\t\t\t\t\t$ord_is='ASC';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$ord=' ORDER BY `'.$order_by.'` '.$ord_is.'';\n\t\t}\n\t\t// Checking limits data\n\t\tif($limits==''){\n\t\t\t$lim='';\n\t\t} else {\n\t\t\t$lim=' LIMIT '.$limits;\n\t\t}\n\t\t// Running query\n\t\t$r=mysql_query($query.$ord.$lim);\n\t\t$arr=array();\n\t\tfor($i=0;$i<mysql_num_rows($r);$i++){\n\t\t\t$f=mysql_fetch_array($r);\n\t\t\t\t$arr[$i]=$f;\n\t\t}\n\t\treturn $arr;\n\t}", "protected function addSortQuery($query)\n {\n $query->addOrderBy('root_id, lft');\n }", "function create_list_query($order_by, $where)\r\n\t{\r\n\t\t//$custom_join = $this->custom_fields->getJOIN();\r\n $custom_join = null;\r\n\t\t$query = \"\r\n\t\t\tSELECT DISTINCT \r\n\t\t\t\tmain_contract.contract_no as main_contract_name,\r\n\t\t\t\tmain_contract.created_by as main_contract_name_owner,\r\n\t\t\t\taccounts.id as account_id, accounts.name as account_name,\r\n\t\t\t\tcon_type.name as contract_type_name, '-1' AS contract_type_name_owner,\r\n\t\t\t\tCONCAT_WS(' ', if(employee.first_name = '', NULL, employee.first_name), employee.last_name) employee_contact_name,\r\n\t\t\t\temployee.user_name as employee_contact_user_name,\r\n\t\t\t\tCONCAT_WS(' ', if(customer.first_name = '', NULL, customer.first_name), customer.last_name) customer_contact_name,\r\n\t\t\t\tcustomer.assigned_user_id as customer_contact_name_owner,\r\n\t\t\t\tcustomer.phone_work as customer_contact_phone,\r\n\t\t\t\t\r\n\t\t\t\tCASE\r\n\t\t\t\t\tWHEN `$this->table_name`.is_active = 'no'\r\n\t\t\t\t\t\tTHEN 'grey'\r\n\t\t\t\t\tWHEN `$this->table_name`.date_expire = 0\r\n\t\t\t\t\t OR `$this->table_name`.date_expire > DATE_ADD(CURDATE(),INTERVAL 30 DAY)\r\n\t\t\t\t\t\tTHEN 'green'\r\n\t\t\t\t\tWHEN `$this->table_name`.date_expire > CURDATE()\r\n\t\t\t\t\t\tTHEN 'yellow'\r\n\t\t\t\t\tELSE\r\n\t\t\t\t\t\t'red'\r\n\t\t\t\tEND as status_colour,\r\n\r\n\t\t\t\t`\".$this->table_name.\"`.*,\r\n\t\t\t\tSUM(assets.purchase_usdollar * assets.quantity) AS total_purchase,\r\n\t\t\t\tSUM(assets.unit_support_price * assets.quantity) AS total_support_cost\r\n\t\t\";\r\n\t\tif($custom_join) $query .= $custom_join['select'];\r\n\t\t$query .= \" FROM `\".$this->table_name.\"` \";\r\n\t\tif($custom_join) $query .= $custom_join['join'];\r\n\t\t$query .= \"\r\n\t\t\tLEFT JOIN users employee ON (employee.id = employee_contact_id)\r\n\t\t\tLEFT JOIN contacts customer ON (customer.id = customer_contact_id)\r\n\t\t\tLEFT JOIN $this->types_table_name con_type ON (con_type.id = contract_type_id)\r\n\t\t\tLEFT JOIN service_maincontracts main_contract ON (main_contract.id = main_contract_id)\r\n\t\t\tLEFT JOIN accounts ON (accounts.id = main_contract.account_id)\r\n\t\t\tLEFT OUTER JOIN assets ON (`\".$this->table_name.\"`.id = assets.service_subcontract_id)\r\n\t\t\";\r\n\r\n\t\t$where_auto = \" \r\n\t\t\t`\".$this->table_name.\"`.deleted != 1\r\n\t\t\";\r\n\r\n\t\tif($where != \"\")\r\n\t\t\t$query .= \"WHERE $where AND \".$where_auto;\r\n\t\telse\r\n\t\t\t$query .= \"WHERE \".$where_auto;\r\n\r\n\t\t$query .= \"GROUP BY `\".$this->table_name.\"`.id\";\r\n\t\t\t\r\n\t\tif($order_by != \"\")\r\n\t\t\t$query .= \" ORDER BY $order_by\";\r\n\t\telse\r\n\t\t\t$query .= \" ORDER BY vendor_contract\";\r\n\t\t\t\r\n\t\treturn $query;\r\n\t\t\r\n\t}", "function renderSkyscraperListSort() {\n\n\t// query string that will be used to retain other GET variables in searches\n\tinput()->whitelist->remove('sort');\n\t$queryString = input()->whitelist->queryString();\n\tif($queryString) $queryString = sanitizer('entities', \"&$queryString\");\n\n\t// get the 'sort' property, if it's present\n\t$sort = input()->get('sort');\n\t$validSorts = getValidSorts();\n\t\n\t// validate the 'sort' pulled from input\n\tif(!$sort || !isset($validSorts[$sort])) $sort = 'name';\n\n\t$options = array();\n\t$selectedLabel = '';\n\n\t// generate options\n\tforeach($validSorts as $key => $label) {\n\t\tif($key === $sort) $selectedLabel = $label;\n\t\t$options[\"./?sort=$key$queryString\"] = $label;\n\t}\n\n\t// render output\n\t$out = files()->render('./includes/skyscraper-list-sort.php', array(\n\t\t'options' => $options, \n\t\t'selectedLabel' => $selectedLabel\n\t));\n\t\n\treturn $out;\n}", "function listInOrder()\n {\n global $BD3;\n global $BD1;\n global $ANO_REF;\n $res_sql=\"select $BD3.final.id,\n $BD3.final.matr,\n $BD1.empregados.nome,\n $BD3.final.cargo,\n $BD3.final.agrup\n from $BD3.final,$BD1.empregados\n where $BD1.empregados.matr=$BD3.final.matr\n AND $BD3.final.ano='$ANO_REF'\n order by $BD1.empregados.nome;\";\n return sql(\"$BD3\",$res_sql);\n }", "private function makeQueryNoSplit(){\n\t\t\n\t\t$this->searchQ['select'] = array('l.name','l.summary','l.sum_approach','l.sum_problems','l.address_line_1','l.address_line_2','l.town','l.county','l.postcode','l.country','l.phone','l.image','l.latitude','l.longitude','l.publish_address','l.publish_phone','l.approved','p.uri','p.urlname','e.level','y.listing_type');\n\t\t$this->searchQ['orderby'][] = 'l.level_id DESC';\n\t\t$this->searchQ['from'] = 'listing l, listing_level e, listing_type y, pages p'; //should always be the same...\n\t\t$this->searchQ['where'] = array('e.level_id = l.level_id','y.listing_type_id = l.listing_type_id','l.page_id = p.page_id','l.publish = 1');//,'p.publish = 1');\n\t\t\n\t\t// set up the initial search variables\t\t\n\t\t//! location\n\t\tif( strlen($this->vars['location']) ){\n\t\t\n\t\t\t$this->Geocode = new Geolocation( $this->vars['location']. ', UK' );\n\t\t\t$this->Geocode->lookup();\n\t\t\t// using the OS grid as makes calculation simpler than using lng/lat - can use simple pythag rather than calculus functions\n\t\t\t// we shorten the list of rows needing the calculation by the greater / less than in the where\n\t\t\t\n\t\t\t$calculation = ' SQRT(POW(( l.easting - ' . round($this->Geocode->getOSEast()) . '),2) + POW((l.northing - ' . round($this->Geocode->getOSNorth()) . '),2)) ';\n\t\t\t$this->searchQ['select'][] = $calculation . \" AS distance\";\n\t\t\t$this->searchQ['where'][] = \"northing < \" . round( $this->Geocode->getOSNorth() + $this->searchDistance ) ; \n\t\t\t$this->searchQ['where'][] = \"northing > \" . round( $this->Geocode->getOSNorth() - $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting < \" . round( $this->Geocode->getOSEast() + $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting > \" . round( $this->Geocode->getOSEast() - $this->searchDistance ) ;\n\t\t//\t$this->searchQ['where'][] = \"(\" . $calculation . \") <= \" . $this->searchDistance ;\n\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"distance <= \" . $this->searchDistance;\n\t\t\t$this->searchQ['orderby'][] = 'distance ASC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! freetext\n\t\tif( strlen($this->vars['term']) ){\n\t\t\t$this->searchQ['select'][] = \"MATCH(\" . $this->ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE) AS score\";\n\t\t\t//$this->searchQ['where'][] = \"MATCH(\" . $ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE)\";\n\t\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"score > 0\";\n\t\t\t$this->searchQ['orderby'][] = 'score DESC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t\n\t\t//! **** FILTERS ****\n\t\t//! profession\n\t\tif( isset($this->vars['profession']) && strlen($this->vars['profession']) ){\n\t\t\n\t\t\t//$this->searchQ['where'][] = \" l.listing_type_id IN (\" . implode(',', $this->vars['profession']) . \") \";\n\t\t\t$this->searchQ['where'][] = \" l.listing_type_id = \" . (int)$this->vars['profession'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! max price\n\t\tif( isset($this->vars['maxprice']) && is_numeric($this->vars['maxprice']) ){\n\t\t\n\t\t\t$this->searchQ['where'][] = \" l.hourly_rate <= \" . (int)$this->vars['maxprice'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! gender\n\t\tif( isset($this->vars['gender']) && in_array($this->vars['gender'] , array('M','F')) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_gender ltg';\n\t\t\t$this->searchQ['where'][] = \" ltg.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltg.gender = '\" . $this->vars['gender'] . \"' \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\n\t\t//! speciality\n\t\tif( isset($this->vars['speciality']) && is_numeric($this->vars['speciality']) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_age ltag';\n\t\t\t$this->searchQ['where'][] = \" ltag.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltag.age_id = \" . (int)$this->vars['speciality'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! ** build the query **\n\t\t$q = \"SELECT \" . (($this->numRows)?' SQL_CALC_FOUND_ROWS ':'') . implode(',', $this->searchQ['select']). \"\n\t\t\t\tFROM \" . $this->searchQ['from'] . \"\n\t\t\t\tWHERE\n\t\t\t\t\t\" . implode(' AND ', $this->searchQ['where']) ;\n\t\t\t\t\t\n\t\tif( isset($this->searchQ['having']) && count($this->searchQ['having']) ){\n\t\t\t$q .= \" HAVING \" . implode(' AND ' , $this->searchQ['having']);\n\t\t}\n\t\t\n\t\t$q .= \"\tORDER BY \" . implode(',', $this->searchQ['orderby']) . \" \";\n\n\t\t$q .= \"\tLIMIT \" . ( ($this->page-1)* $this->limit) . \",\" . $this->limit . \" \"; \n\t\t\t\n\t\treturn $q;\n\t\t\n\t}", "protected function getListQuery()\n\t{\n\t\t$user = JFactory::getUser();\n\t\t$db = JFactory::getDbo();\n\t\t$query = parent::getListQuery();\n\n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$this->getState(\n\t\t\t\t'list.select',\n\t\t\t\t'a.id, a.document_id, a.number, a.created, a.created_by, a.modified, a.modified_by'\n\t\t\t)\n\t\t);\n\t\t$query->from('#__document_version AS a');\n\t\t$query->where('a.document_id = ' . (int) $this->getState('document.id'));\n\n\t\t// Join over the document table\n\t\t$query->leftJoin('#__document as d ON d.id=a.document_id');\n\t\t$query->select('d.version=a.number as isdefault');\n\t\t$query->select('d.checked_out AS checked_out');\n\t\t$query->select('d.checked_out_time AS checked_out_time');\n\n\t\t// Join over the users for the creator.\n\t\t$query->select('ua.name AS creator');\n\t\t$query->join('LEFT', '#__users AS ua ON ua.id=a.created_by');\n\n\t\t// Join over the users for the modifier.\n\t\t$query->select('um.name AS modifier');\n\t\t$query->join('LEFT', '#__users AS um ON um.id=a.modified_by');\n\n\t\t// Add the list ordering clause.\n\t\t$orderCol\t= $this->state->get('list.ordering');\n\t\t$orderDirn\t= $this->state->get('list.direction');\n\t\t$query->order($db->getEscaped($orderCol.' '.$orderDirn));\n\n\t\t// echo nl2br(str_replace('#__','jos_',$query));\n\t\treturn $query;\n\t}", "function wp_list_sort($input_list, $orderby = array(), $order = 'ASC', $preserve_keys = \\false)\n {\n }", "public function index()\n {\n \n /* return *///$sort \n\n \n $articles = Article::query();\n\n /* foreach($sort as $sortcol)\n {\n $sortdir = starts_with($sortcol, '-') ? 'desc' : 'asc';\n\n $sortCol = ltrim($sortcol, '-');\n\n $articles->orderBy($sortCol, $sortdir);\n } */\n\n if(request()->has('filterBy'))\n {\n list($criteria, $value) = explode(':', request()->filterBy);\n\n $articles->where($criteria, $value);\n }\n\n return ArticleResource::collection($articles->paginate(15));\n }", "public function getShopperList($query)\n {\n $prevPeriod = $this->getPrevDatePeriod($query['startDate'], $query['endDate']);\n \n $granularity = $this->getGranularity($query['startDate'], $query['endDate']);\n if($granularity == 'month') {\n $dateQuery = 'to_char(orders.created_at, \\'YYYY-MM\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n } else if($granularity == 'day') {\n $dateQuery = 'to_char(orders.created_at, \\'YYYY-MM-DD\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n }\n\n if($query['sort'] == 'highest')\n $ratingOrder = 'rating desc, orders desc';\n else if ($query['sort'] == 'lowest')\n $ratingOrder = 'rating asc';\n // $ratingOrder .= ', name asc';\n\n DB::enableQueryLog();\n // execute\n $currentTransactionCount = DB::connection('virtual_market')\n ->table('orders')\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->whereNotNull('orders.rating')\n ->count();\n\n $prevTransactionCount = DB::connection('virtual_market')\n ->table('orders')\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->whereNotNull('orders.rating')\n ->count();\n\n $currentAvgRating = DB::connection('virtual_market')\n ->table('orders')\n ->select(DB::raw('round(avg(orders.rating), 2) as rating'))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->whereNotNull('orders.rating')\n ->get();\n\n $prevAvgRating = DB::connection('virtual_market')\n ->table('orders')\n ->select(DB::raw('round(avg(orders.rating), 2) as rating'))\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->whereNotNull('orders.rating')\n ->get();\n\n $ratingTrend = DB::connection('virtual_market')\n ->table('orders')\n ->select(DB::raw('round(avg(orders.rating), 2) as rating,'.$dateQuery))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->whereNotNull('orders.rating')\n ->groupBy($dateGroupBy)\n ->orderByRaw($dateOrder)\n ->get();\n\n $currentShopperData = DB::connection('virtual_market')\n ->table('orders')\n ->join('garendongs', 'garendongs.id', '=', 'orders.garendong_id')\n ->leftJoin('user_feedbacks', 'orders.id', '=', 'user_feedbacks.order_id')\n ->select(DB::raw('garendongs.id, garendongs.user_id, count(orders.rating) as orders, round(avg(orders.rating), 2) as rating, count(user_feedbacks) as feedbacks'))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->whereNotNull('orders.rating')\n ->groupBy('garendongs.id')\n ->orderByRaw($ratingOrder);\n $currentShopperCount = $currentShopperData->get()->count();\n $shoppers = $currentShopperData->get();\n \n $shopperName = DB::connection('user')\n ->table('users')\n ->join('roles', 'users.role_id', '=', 'roles.id')\n ->select(DB::raw('users.id, users.name'))\n ->where('roles.name', '=', 'garendong')\n ->orderByRaw('users.id asc')\n ->get();\n // convert shopperName to associative array\n $names = array();\n for($i=0; $i<count($shopperName); $i++){\n $names[$shopperName[$i]->id] = $shopperName[$i];\n }\n $shopperChanges = array();\n foreach ($shoppers as $shopper) {\n $result = DB::connection('virtual_market')\n ->table('orders')\n ->join('garendongs', 'garendongs.id', '=', 'orders.garendong_id')\n ->select(DB::raw('count(orders.rating) as orders, round(avg(orders.rating), 2) as rating'))\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->where('garendongs.id', '=', $shopper->id)\n ->whereNotNull('orders.rating')\n ->groupBy('garendongs.id')\n ->get();\n array_push($shopperChanges, $result);\n }\n for($i=0; $i<count($shoppers); $i++){\n $prevOrder = count($shopperChanges[$i]) > 0 ? $shopperChanges[$i][0]->orders : $shoppers[$i]->orders;\n $prevRating = count($shopperChanges[$i]) > 0 ? $shopperChanges[$i][0]->rating : $shoppers[$i]->rating;\n $shoppers[$i]->orders_change = $shoppers[$i]->orders - $prevOrder;\n $shoppers[$i]->rating_change = round((float)($shoppers[$i]->rating - $prevRating), 2);\n $shoppers[$i]->name = $names[$shoppers[$i]->user_id]->name;\n }\n\n $prevShopperData = DB::connection('virtual_market')\n ->table('orders')\n ->join('garendongs', 'garendongs.id', '=', 'orders.garendong_id')\n ->select(DB::raw('garendongs.id, garendongs.user_id as name, count(orders.rating) as orders, round(avg(orders.rating), 2) as rating'))\n ->where('orders.created_at', '>=', $prevPeriod['startDate'])\n ->where('orders.created_at', '<=', $prevPeriod['endDate'])\n ->whereNotNull('orders.rating')\n ->groupBy('garendongs.id');\n $prevShopperCount = $prevShopperData->get()->count();\n \n\n\n $data = array();\n $data['transaction_count'] = array();\n $data['transaction_count']['current'] = $currentTransactionCount;\n $data['transaction_count']['prev'] = $prevTransactionCount;\n $data['shopper_count'] = array();\n $data['shopper_count']['current'] = $currentShopperCount;\n $data['shopper_count']['prev'] = $prevShopperCount;\n $data['avg_rating'] = array();\n $data['avg_rating']['current'] = $currentAvgRating[0]->rating;\n $data['avg_rating']['prev'] = $prevAvgRating[0]->rating;\n $data['avg_rating']['trend'] = array();\n $data['avg_rating']['trend']['granularity'] = $granularity;\n $data['avg_rating']['trend']['trend'] = $ratingTrend;\n $data['shopper'] = $shoppers;\n $status = $this->setStatus();\n\n return response()->json([\n 'status' => $status,\n 'data' => $data\n ]); \n }", "function _buildContentOrderBy($q = false)\n\t{\n\t\t$filter_order = $this->getState('filter_order');\n\t\t$filter_order_Dir = $this->getState('filter_order_Dir');\n\n\t\tif ($filter_order=='a.filename_displayed') $filter_order = ' CASE WHEN a.filename_original<>\"\" THEN a.filename_original ELSE a.filename END ';\n\t\t$orderby \t= ' ORDER BY '.$filter_order.' '.$filter_order_Dir.', a.filename';\n\n\t\treturn $orderby;\n\t}", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "function pi_list_query($table,$count=0,$addWhere='',$mm_cat='',$groupBy='',$orderBy='',$query='',$returnQueryArray=FALSE)\t{\n\n \t\t\t// Begin Query:\n\t\tif (!$query)\t{\n\t\t\t\t// Fetches the list of PIDs to select from.\n\t\t\t\t// TypoScript property .pidList is a comma list of pids. If blank, current page id is used.\n\t\t\t\t// TypoScript property .recursive is a int+ which determines how many levels down from the pids in the pid-list subpages should be included in the select.\n\t\t\t$pidList = 2;\n \n\t\t\tif (is_array($mm_cat))\t{\n\t\t\t\t$query='FROM '.$table.','.$mm_cat['table'].','.$mm_cat['mmtable'].chr(10).\n\t\t\t\t\t\t' WHERE '.$table.'.uid='.$mm_cat['mmtable'].'.uid_local AND '.$mm_cat['table'].'.uid='.$mm_cat['mmtable'].'.uid_foreign '.chr(10).\n\t\t\t\t\t\t(strcmp($mm_cat['catUidList'],'')?' AND '.$mm_cat['table'].'.uid IN ('.$mm_cat['catUidList'].')':'').chr(10).\n\t\t\t\t\t\t' AND '.$table.'.pid IN ('.$pidList.')';\n\t\t\t} else {\n\t\t\t\t$query='FROM '.$table.' WHERE pid IN ('.$pidList.')';\n\t\t\t}\n\t\t}\n\n\t\t\t// Split the \"FROM ... WHERE\" string so we get the WHERE part and TABLE names separated...:\n\t\tlist($TABLENAMES,$WHERE) = spliti('WHERE', trim($query), 2);\n\t\t$TABLENAMES = trim(substr(trim($TABLENAMES),5));\n\t\t$WHERE = trim($WHERE);\n\n\t\t\t// Add '$addWhere'\n\t\tif ($addWhere)\t{$WHERE.=' '.$addWhere.chr(10);}\n\n\t\t\t// Search word:\n\t\tif ($this->piVars['sword'] && $this->internal['searchFieldList'])\t{\n\t\t\t$WHERE.=$this->cObj->searchWhere($this->piVars['sword'],$this->internal['searchFieldList'],$table).chr(10);\n\t\t}\n\n\t\tif ($count) {\n\t\t\t$queryParts = array(\n\t\t\t\t'SELECT' => 'count(*)',\n\t\t\t\t'FROM' => $TABLENAMES,\n\t\t\t\t'WHERE' => $WHERE,\n\t\t\t\t'GROUPBY' => '',\n\t\t\t\t'ORDERBY' => '',\n\t\t\t\t'LIMIT' => ''\n\t\t\t);\n\t\t} else {\n\t\t\t\t// Order by data:\n\t\t\tif (!$orderBy && $this->internal['orderBy'])\t{\n\t\t\t\tif (t3lib_div::inList($this->internal['orderByList'],$this->internal['orderBy']))\t{\n\t\t\t\t\t$orderBy = 'ORDER BY '.$table.'.'.$this->internal['orderBy'].' '.$this->internal['descFlag'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t// Limit data:\n\t\t\t$pointer = intval($this->ter_pointer);\n\t\t\t\n \t\t$results_at_a_time = t3lib_div::intInRange($this->internal['results_at_a_time'],1,1000);\n\t\t\t$LIMIT = ($pointer*$results_at_a_time).','.$results_at_a_time;\n\n\t\t\t\t// Add 'SELECT'\n\t\t\t$queryParts = array(\n\t\t\t\t'SELECT' => $this->pi_listFields,\n\t\t\t\t'FROM' => $TABLENAMES,\n\t\t\t\t'WHERE' => $WHERE,\n\t\t\t\t'GROUPBY' => $GLOBALS['TYPO3_DB']->stripGroupBy($groupBy),\n\t\t\t\t'ORDERBY' => $GLOBALS['TYPO3_DB']->stripOrderBy($orderBy),\n\t\t\t\t'LIMIT' => $LIMIT\n\t\t\t);\n\t\t}\n\n\t\t$query = $GLOBALS['TYPO3_DB']->SELECTquery (\n\t\t\t\t\t$queryParts['SELECT'],\n\t\t\t\t\t$queryParts['FROM'],\n\t\t\t\t\t$queryParts['WHERE'],\n\t\t\t\t\t$queryParts['GROUPBY'],\n\t\t\t\t\t$queryParts['ORDERBY'],\n\t\t\t\t\t$queryParts['LIMIT']\n\t\t\t\t);\n\t\treturn $returnQueryArray ? $queryParts : $query;\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "function build_query($user_search, $sort) {\n $search_query = \"SELECT * FROM stocktypes\";\n\n // Extract the search keywords into an array\n $clean_search = str_replace(',', ' ', $user_search);\n $search_words = explode(' ', $clean_search);\n $final_search_words = array();\n if (count($search_words) > 0) {\n foreach ($search_words as $word) {\n if (!empty($word)) {\n $final_search_words[] = $word;\n }\n }\n }\n\n // Generate a WHERE clause using all of the search keywords\n $where_list = array();\n if (count($final_search_words) > 0) {\n foreach($final_search_words as $word) {\n $where_list[] = \"description LIKE '%$word%' OR stockname LIKE '%$word%'\";\n }\n }\n $where_clause = implode(' OR ', $where_list);\n\n // Add the keyword WHERE clause to the search query\n if (!empty($where_clause)) {\n $search_query .= \" WHERE $where_clause\";\n }\n\n // Sort the search query using the sort setting\n switch ($sort) {\n // Ascending by Stock Name\n case 1:\n $search_query .= \" ORDER BY stockname\";\n break;\n // Descending by Stock Name\n case 2:\n $search_query .= \" ORDER BY stockname DESC\";\n break;\n // Ascending by Category\n case 2.5:\n $search_query .= \" ORDER BY category\";\n break;\n // Ascending by Category\n case 2.6:\n $search_query .= \" ORDER BY category DESc\";\n break;\n // Ascending by Subcategory\n case 3:\n $search_query .= \" ORDER BY subcategory\";\n break;\n // Descending by Subcategory\n case 4:\n $search_query .= \" ORDER BY subcategory DESC\";\n break;\n // Ascending by date posted (oldest first)\n case 5:\n $search_query .= \" ORDER BY creationdate\";\n break;\n // Descending by date posted (newest first)\n case 6:\n $search_query .= \" ORDER BY creationdate DESC\";\n break;\n default:\n // No sort setting provided, so don't sort the query\n }\n\n return $search_query;\n }", "function KM_getDataList($limit,$offset,$sort_by,$sort_order)\n\t {\n\t \t//result query\n\t\t$sort_order=($sort_order=='desc')?'desc':'asc';\n\t\t$sort_columns=array('id','name'); \n\t\t//table columns\n\t\t$sort_by=(in_array($sort_by,$sort_columns))?$sort_by:'id';\n\t $sql=\"SELECT * from $table order by $sort_by $sort_order limit $offset, $limit \"; \t \n\t \t$query = $this->db->query($sql);\t \n\t \t$result['rows']= $query->result();\t \n\t\t \n\t \t//count query\n\t \t$this-> db -> select(\"COUNT(*) AS count\",FALSE);\n\t \t$this-> db -> from($table);\n\t \t$query = $this -> db -> get();\t\t \t \n\t \t$tmp = $query->result();\t \n\t \n\t \t$result['num_rows'] = $tmp[0] -> count;\t\t\n\t \treturn $result;\t \n\t }", "protected function getListQuery()\n\t{\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$this->getState(\n\t\t\t\t'list.select',\n\t\t\t\t'a.id AS id,'\n\t\t\t\t. 'u.name AS name,' \n\t\t\t\t. 'a.checked_out AS checked_out,'\n\t\t\t\t. 'a.checked_out_time AS checked_out_time, '\n\t\t\t\t. 'a.state AS state' \n\t\t\t)\n\t\t);\n\n\t\t$query->from($db->quoteName('#__test_profiles') . ' AS a'); \n\t\t$query->select($db->quoteName('u.name'))\n\t\t\t->join('LEFT', $db->quoteName('#__users', 'u') . ' ON u.id = a.user_id');\n\n\t\t// Filter by published state\n\t\t$published = (string) $this->getState('filter.state');\n\n\t\tif (is_numeric($published))\n\t\t{\n\t\t\t$query->where('a.state = ' . (int) $published);\n\t\t}\n\t\telseif ($published === '')\n\t\t{\n\t\t\t$query->where('(a.state IN (0, 1))');\n\t\t}\n\n\t\t$query->group('a.id, u.name, a.checked_out, a.checked_out_time, a.state');\n\n\t\t// Filter by search in title\n\t\t$search = $this->getState('filter.search');\n\n\t\tif (!empty($search))\n\t\t{\n\t\t\tif (stripos($search, 'id:') === 0)\n\t\t\t{\n\t\t\t\t$query->where('a.id = ' . (int) substr($search, 3));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%'));\n\t\t\t\t$query->where('u.name LIKE ' . $search);\n\t\t\t}\n\t\t}\n\n\t\t// Add the list ordering clause.\n\t\t$query->order($db->escape($this->getState('list.ordering', 'u.name')) . ' ' . $db->escape($this->getState('list.direction', 'ASC')));\n\n\t\treturn $query;\n\t}", "function getTableList(){\n\t\t// Process the query string and exclude querystring named \"p\"\n\t\tif (!empty($_SERVER['QUERY_STRING'])) {\n\t\t\t$qrystr = explode(\"&\",$_SERVER['QUERY_STRING']);\n\t\t\tforeach ($qrystr as $value) {\n\t\t\t\t$qstr = explode(\"=\",$value);\n\t\t\t\tif ($qstr[0]!=\"p\") {\n\t\t\t\t\t$arrQryStr[] = implode(\"=\",$qstr);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$aQryStr = $arrQryStr;\n\t\t\t$aQryStr[] = \"p=@@\";\n\t\t\t$queryStr = implode(\"&\",$aQryStr);\n\t\t}\n\n\t\t//bby: search module\n\t\t$qry = array();\n\t\tif (isset($_REQUEST['search_field'])) {\n\n\t\t\t// lets check if the search field has a value\n\t\t\tif (strlen($_REQUEST['search_field'])>0) {\n\t\t\t\t// lets assign the request value in a variable\n\t\t\t\t$search_field = $_REQUEST['search_field'];\n\n\t\t\t\t// create a custom criteria in an array\n\t\t\t\t$qry[] = \"mnu_name like '%$search_field%'\";\n\n\t\t\t}\n\t\t}\n\n\t\t// put all query array into one criteria string\n\t\t$criteria = (count($qry)>0)?\" where \".implode(\" and \",$qry):\"\";\n\n\t\t// Sort field mapping\n\t\t$arrSortBy = array(\n\t\t \"viewdata\"=>\"viewdata\"\n\t\t,\"mnu_name\"=>\"mnu_name\"\n\t\t,\"mnu_link\"=>\"mnu_link\"\n\t\t,\"mnu_ord\"=>\"mnu_ord\"\n\t\t);\n\n\t\tif(isset($_GET['sortby'])){\n\t\t\t$strOrderBy = \" order by \".$arrSortBy[$_GET['sortby']].\" \".$_GET['sortof'];\n\t\t}\n\n\t\t// Add Option for Image Links or Inline Form eg: Checkbox, Textbox, etc...\n\t\t$viewLink = \"\";\n\t\t$editLink = \"<a href=\\\"?statpos=tax&edit=',am.mnu_id,'\\\"><img src=\\\"\".SYSCONFIG_DEFAULT_IMAGES_INCTEMP.\"icons/edited/edit.png\\\" title=\\\"Edit\\\" hspace=\\\"2px\\\" border=0 width=\\\"16\\\" height=\\\"16\\\"></a>\";\n\t\t$delLink = \"<a href=\\\"?statpos=tax&delete=',am.mnu_id,'\\\" onclick=\\\"return confirm(\\'Are you sure, you want to delete?\\');\\\"><img src=\\\"\".SYSCONFIG_DEFAULT_IMAGES_INCTEMP.\"icons/edited/delete.png\\\" title=\\\"Delete\\\" hspace=\\\"2px\\\" border=0 width=\\\"16\\\" height=\\\"16\\\"></a>\";\n\n\t\t// SqlAll Query\n\t\t$sql = \"select am.*, CONCAT('$viewLink','$editLink','$delLink') as viewdata\n\t\t\t\t\t\tfrom app_modules am\n\t\t\t\t\t\t$criteria\n\t\t\t\t\t\t$strOrderBy\";\n\n\t\t// Field and Table Header Mapping\n\t\t$arrFields = array(\n\t\t \"viewdata\"=>\"Action\"\n\t\t,\"mnu_name\"=>\"Module Name\"\n\t\t,\"mnu_link\"=>\"Link\"\n\t\t,\"mnu_ord\"=>\"Order\"\n\t\t);\n\n\t\t// Column (table data) User Defined Attributes\n\t\t$arrAttribs = array(\n\t\t\"mnu_ord\"=>\" align='center'\",\n\t\t\"viewdata\"=>\"width='50' align='center'\"\n\t\t);\n\n\t\t// Process the Table List\n\t\t$tblDisplayList = new clsTableList($this->conn);\n\t\t$tblDisplayList->arrFields = $arrFields;\n\t\t$tblDisplayList->paginator->linkPage = \"?$queryStr\";\n\t\t$tblDisplayList->sqlAll = $sql;\n\t\t$tblDisplayList->sqlCount = $sqlcount;\n\n\t\treturn $tblDisplayList->getTableList($arrAttribs);\n\t}", "protected function prepareSortCategories()\n {\n $queries = array();\n $queries[] = \"UPDATE oxcategories set OXSORT = (OXSORT+500)\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 1 WHERE oxid = 'testcategory0'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 2 WHERE oxid = 'testcat3'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 3 WHERE oxid = 'testcat5'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 4 WHERE oxid = 'testcategory1'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 5 WHERE oxid = 'testcat1'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 6 WHERE oxid = 'testcat9'\";\n\n foreach ($queries as $query) {\n $this->executeSql($query);\n }\n }", "public function orderBy($sql);", "function insert_sort(array $q) {\r\n\t$len = count($q);\r\n\t$list = [];\r\n\tfor($i=0; $i < $len; $i++)\r\n\t{\r\n\t\t$list = insert($q[$i], $list); \r\n\t}\r\n\r\n\treturn $list;\r\n}", "protected function getListQuery()\n\t{\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$this->getState(\n\t\t\t\t'list.select', 'DISTINCT a.*'\n\t\t\t\t)\n\t\t\t);\n\t\t\t$query->from('`#__polyus_users` AS a');\n\t\t\t// Join over the users for the checked out user.\n\t\t\t$query->select('uc.name AS uEditor');\n\t\t\t$query->join('LEFT', '#__users AS uc ON uc.id=a.checked_out');\n\t\t\t// Join over the created by field 'created_by'\n\t\t\t$query->join('LEFT', '#__users AS created_by ON created_by.id = a.created_by');\n\t\t\t// Join over the created by field 'modified_by'\n\t\t\t$query->join('LEFT', '#__users AS modified_by ON modified_by.id = a.modified_by');\n\t\t\tif (!Factory::getUser()->authorise('core.edit', 'com_polyus_users'))\n\t\t\t{\n\t\t\t\t$query->where('a.state = 1');\n\t\t\t}\n\t\t\t// Filter by search in title\n\t\t\t$search = $this->getState('filter.search');\n\t\t\tif (!empty($search))\n\t\t\t{\n\t\t\t\tif (stripos($search, 'id:') === 0)\n\t\t\t\t{\n\t\t\t\t\t$query->where('a.id = ' . (int) substr($search, 3));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$search = $db->Quote('%' . $db->escape($search, true) . '%');\n\t\t\t\t\t$query->where('( a.name LIKE ' . $search . ' OR a.lastname LIKE ' . $search . ' OR a.email LIKE ' . $search . ' )');\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add the list ordering clause.\n\t\t\t$orderCol = $this->state->get('list.ordering', 'id');\n\t\t\t$orderDirn = $this->state->get('list.direction', 'ASC');\n\t\t\tif ($orderCol && $orderDirn)\n\t\t\t{\n\t\t\t\t$query->order($db->escape($orderCol . ' ' . $orderDirn));\n\t\t\t}\n\t\t\treturn $query;\n\t\t}", "function getListQuery() \n\t{\n\t\t$db = JFactory::getDBO();\n\t\t$query = $db->getQuery(true);\n\t\t\n\t\t$query->select('<#= Value(\"Task.tableAlias\") #>.*');\n\t\t$query->from('#__<#= Value(\"Task.table\") #> AS <#= Value(\"Task.tableAlias\") #>');\n\t\t\n\t\t// Filter by search in fields\n\t\t$search = $this->getState('filter.search');\n\t\t$search_filter = $this->getState('search.filter');\n\t\tif (!empty($search) && !empty($search_filter)) {\n\t\t\t$where = '((0=1) ';\n\t\t\t$search = $db->Quote('%'.$db->getEscaped($search, true).'%');\n\t\t\t$allowedSearch = explode(',', $search_filter);\n\t\t\tforeach($allowedSearch as $field) {\n\t\t\t\tif (!$field) continue;\n\t\t\t\t$where .= \" OR ( $field LIKE $search ) \";\n\t\t\t}\n\t\t\t$where .= ')';\n\t\t\t$query->where($where);\n\t\t}\n\t\t\t\n\t\t$form = $this->getForm(array(), false);\n\t\tforeach ($form->getFieldset('select_lists') as $field) {\n\t\t\t$select = $form->getFieldAttribute($field->name, 'select', null);\n\t\t\tif(!is_null($select)) {\n\t\t\t\t$query->select($select);\t\t\t\t\n\t\t\t}\n\t\t\t$join = $form->getFieldAttribute($field->name, 'join', null);\n\t\t\tif(!is_null($join)) {\n\t\t\t\t$query->join('LEFT',$join);\t\t\t\t\n\t\t\t}\n\t\t\t$field_value = $this->getState(str_replace('_', '.', $field->name), NULL);\n\t\t\t//Check that the field was set in the state variables and user has selected\n\t\t\t//a filter.\n\t\t\tif(!is_null($field_value) && $field_value !== '') {\n\t\t\t\t$field_where = $form->getFieldAttribute($field->name, 'where', null);\n\t\t\t\tif(!is_null($field_where)) {\n\t\t\t\t\t$query->where(str_replace('{0}', $db->quote($field_value), $field_where));\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$field_name = $form->getFieldAttribute($field->name, 'key_field', null);\n\t\t\t\t\t//Key field should always exist.\n\t\t\t\t\t$query->where(\"<#= Value(\"Task.tableAlias\") #>.$field_name = \" . $db->quote($field_value));\t\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t// Add the list ordering clause.\n\t\t$orderCol\t= $this->state->get('list.ordering');\n\t\t$orderDirn\t= $this->state->get('list.direction');\n\t\t$query->order($db->getEscaped($orderCol.' '.$orderDirn));\n\t\t\n\t\treturn $query;\n\t}", "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 add_buildgroup_sortlist($groupname)\n{\n // This information can be provided as a query string, otherwise we apply\n // some default ordering here. Default sort ordering for a group is based\n // on the groupname.\n //\n // Sort settings should probably be definable/overrideable by the user as wel\n // on the users page, or perhaps by the project admin on the project page.\n //\n $st = '';\n $xml = '';\n\n if(isset($_GET[\"sort\"]))\n {\n $xml .= add_XML_value(\"sortlist\", \"{sortlist: \" . $_GET[\"sort\"] . \"}\");\n return $xml;\n }\n\n $gn = strtolower($groupname);\n\n if (strpos($gn, 'nightly') !== FALSE)\n {\n $st = 'SortAsNightly';\n }\n else if ((strpos($gn, 'continuous') !== FALSE) || (strpos($gn, 'experimental') !== FALSE))\n {\n $st = 'SortByTime';\n }\n\n switch($st)\n {\n case 'SortAsNightly':\n $xml .= add_XML_value(\"sortlist\", \"{sortlist: [[4,1],[7,1],[11,1],[10,1],[5,1],[8,1]]}\");\n // Theoretically, most important to least important:\n // configure errors DESC, build errors DESC, tests failed DESC, tests not run DESC,\n // configure warnings DESC, build warnings DESC\n break;\n\n case 'SortByTime':\n $xml .= add_XML_value(\"sortlist\", \"{sortlist: [[14,1]]}\");\n // build time DESC\n break;\n\n // By default, no javascript-based sorting. Accept the ordering naturally as it came from\n // MySQL and the php processing code...\n }\n\n return $xml;\n}", "function simpleQSortExample($list): array\n{\n // if count less than 2, then no need to sort\n if(count($list) < 2){\n return $list;\n }\n\n $pivot = $list[0];\n $lessItems = [];\n $greaterItems = [];\n\n for ($i = 1; $i < count($list); $i++){\n if($list[$i] <= $pivot){\n $lessItems[] = $list[$i];\n }else {\n $greaterItems[] = $list[$i];\n }\n }\n\n return array_merge(simpleQSortExample($lessItems), [$pivot], simpleQSortExample($greaterItems));\n}", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id); // id\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->companyname); // companyname\n\t\t\t$this->UpdateSort($this->servicetime); // servicetime\n\t\t\t$this->UpdateSort($this->country); // country\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->skype); // skype\n\t\t\t$this->UpdateSort($this->website); // website\n\t\t\t$this->UpdateSort($this->linkedin); // linkedin\n\t\t\t$this->UpdateSort($this->facebook); // facebook\n\t\t\t$this->UpdateSort($this->twitter); // twitter\n\t\t\t$this->UpdateSort($this->active_code); // active_code\n\t\t\t$this->UpdateSort($this->identification); // identification\n\t\t\t$this->UpdateSort($this->link_expired); // link_expired\n\t\t\t$this->UpdateSort($this->isactive); // isactive\n\t\t\t$this->UpdateSort($this->google); // google\n\t\t\t$this->UpdateSort($this->instagram); // instagram\n\t\t\t$this->UpdateSort($this->account_type); // account_type\n\t\t\t$this->UpdateSort($this->logo); // logo\n\t\t\t$this->UpdateSort($this->profilepic); // profilepic\n\t\t\t$this->UpdateSort($this->mailref); // mailref\n\t\t\t$this->UpdateSort($this->deleted); // deleted\n\t\t\t$this->UpdateSort($this->deletefeedback); // deletefeedback\n\t\t\t$this->UpdateSort($this->account_id); // account_id\n\t\t\t$this->UpdateSort($this->start_date); // start_date\n\t\t\t$this->UpdateSort($this->end_date); // end_date\n\t\t\t$this->UpdateSort($this->year_moth); // year_moth\n\t\t\t$this->UpdateSort($this->registerdate); // registerdate\n\t\t\t$this->UpdateSort($this->login_type); // login_type\n\t\t\t$this->UpdateSort($this->accountstatus); // accountstatus\n\t\t\t$this->UpdateSort($this->ispay); // ispay\n\t\t\t$this->UpdateSort($this->profilelink); // profilelink\n\t\t\t$this->UpdateSort($this->source); // source\n\t\t\t$this->UpdateSort($this->agree); // agree\n\t\t\t$this->UpdateSort($this->balance); // balance\n\t\t\t$this->UpdateSort($this->job_title); // job_title\n\t\t\t$this->UpdateSort($this->projects); // projects\n\t\t\t$this->UpdateSort($this->opportunities); // opportunities\n\t\t\t$this->UpdateSort($this->isconsaltant); // isconsaltant\n\t\t\t$this->UpdateSort($this->isagent); // isagent\n\t\t\t$this->UpdateSort($this->isinvestor); // isinvestor\n\t\t\t$this->UpdateSort($this->isbusinessman); // isbusinessman\n\t\t\t$this->UpdateSort($this->isprovider); // isprovider\n\t\t\t$this->UpdateSort($this->isproductowner); // isproductowner\n\t\t\t$this->UpdateSort($this->states); // states\n\t\t\t$this->UpdateSort($this->cities); // cities\n\t\t\t$this->UpdateSort($this->offers); // offers\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "protected function getSortSearchQuery() {\n\n $index_fields = $this->index->getFields();\n $sort = [];\n $query_full_text_fields = $this->index->getFulltextFields();\n foreach ($this->query->getSorts() as $field_id => $direction) {\n $direction = Unicode::strtolower($direction);\n\n if ($field_id === 'search_api_relevance') {\n $sort['_score'] = $direction;\n }\n elseif ($field_id === 'search_api_id') {\n $sort['id'] = $direction;\n }\n elseif (isset($index_fields[$field_id])) {\n if (in_array($field_id, $query_full_text_fields)) {\n // Set the field that has not been analyzed for sorting.\n $sort[$field_id . '.keyword'] = $direction;\n }\n else {\n $sort[$field_id] = $direction;\n }\n }\n else {\n // TODO: no silly exceptions...\n throw new \\Exception(t('Incorrect sorting!.'));\n }\n\n }\n return $sort;\n }", "public function asort() {}", "private function set_query_components() {\n\t\n\t\t$start = (($this->page-1) * $this->rp);\n\t\t\n\t\tif($this->query) {\n\t\t\t$this->query_components['where'] = \" WHERE $qtype LIKE '%\".mysql_real_escape_string($query).\"%' \";\n\t\t}\n\t\telse {\n\t\t\t$this->query_componenets['where'] = \"\";\n\t\t}\n\t\t\n\t\t$this->query_components['sort'] = \"ORDER BY {$this->sortname} {$this->sortorder}\";\n\t\t$this->query_components['limit'] = \"LIMIT $start, {$this->rp}\";\n\t}", "public function lists(){\n\n $raw = $this->RxData;\n $head = C('PREURL');\n $ret = ['total' => 0, 'page_start' => 0, 'page_n' => 0, 'data' => []];\n\n $page = $raw['page_start']?$raw['page_start']:1;\n $num = $raw['page_limit']? $raw['page_limit']:10;\n $limit = $num*($page-1).','.$num;\n\n\n if(!$this->out['teacher_uid'])\n goto END;\n $time = time();\n\n $where['a.check']= PASS;\n $where['a.submit']= 1;\n\n $where['a.uid'] = $this->out['teacher_uid'];\n $where['a.suid'] = ['like','%,'.$this->out['uid'].',%'];\n\n\n if($raw['level_id'])\n $where['a.level_id']= $raw['level_id'];\n if(isset($raw['title']))\n $where['a.title']= ['like','%'.$raw['title'].'%'];\n\n if($raw['status_all'])\n $where['a.atime']= ['lt',$time];\n\n $raw['status'] = $raw['status_all']?$raw['status_all']:$raw['status_mine'];\n\n if(isset($raw['status'])){\n switch($raw['status']){\n case 1:\n $where['b.status']= HWK_DID;\n break;\n case 2:\n $where['b.status']= HWK_UNDO;\n break;\n case 3:\n $where['b.status']= HWK_UNCOT;\n break;\n case 4:\n $where['b.uid']= ['eq',$this->out['uid']];\n break;\n case 5:\n// $where['b.uid']= ['neq',$this->out['uid']];\n break;\n case 6:\n// $where['b.uid']= ['neq',$this->out['uid']];\n break;\n default:\n break;\n }\n }\n\n if($raw['time_start'] && $raw['time_end']){\n $where['a.atime'] = [\n ['egt',$raw['time_start']],\n ['lt',$raw['time_end']]\n ];\n }elseif($raw['time_start'] ) {\n $where['a.atime'] = ['egt', $raw['time_start']];\n }elseif($raw['time_end'] ){\n $where['a.atime'] = ['lt',$raw['time_end']];\n }\n\n $column = 'a.id,a.hwk_id,a.title,b.status as stu_status,c.name as level,a.mtime as atime';\n\n $order = 'a.mtime desc,id desc';\n\n\n if(isset($raw['status_mine'])){\n $join = 'RIGHT JOIN';\n $where['b.uid']= $this->out['uid'];\n\n $total = $this->model->selectHomeworkByRec('count(*) total',$where,'','');\n $res = $this->model->selectHomeworkByRec(\n $column,\n $where,\n $limit,\n $order\n\n );\n }else {\n //默认为作业池\n if ($raw['status_all'] == 5) {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n } elseif ($raw['status_all'] == 4) {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n } else {\n $total = $this->model->selectHomeworkForAll('count(*) total', $where, '', '',$this->out['uid']);\n $res = $this->model->selectHomeworkForAll(\n $column,\n $where,\n $limit,\n $order,$this->out['uid']\n );\n }\n }\n\n if(!$res)\n goto END;\n\n $result = [] ;\n $chk_sub = false;\n foreach($res as $k=>&$v){\n\n\n if($v['level_id'] > $this->out['level_id']){\n unset($res[$k]);\n continue;\n }\n $v['etime'] = $v['atime'] + C('EXPIRE_HWK');\n if($raw['status_all'] == 5){\n if($v['stu_status']){\n continue;\n }\n }\n $v['status'] = $v['stu_status']?$v['stu_status']:HWK_REV;\n if(isset($raw['status_all']) && $v['stu_status']){\n $v['status'] = HWK_NOT_REV;\n }\n//过期\n if(!$v['stu_status'] && time() > ($v['atime']+C('EXPIRE_HWK')))\n $v['status'] = HWK_EXIPRE;\n//逾期\n if($v['stu_status'] == HWK_UNDO && (time()>($v['atime']+C('EXPIRE_SUB'))))\n $chk_sub = true;\n\n $result[] = $v;\n }\n\n $ret['total'] = $total[0]['total'];\n $ret['page_n'] = count($result);\n $ret['page_start'] = $page;\n $ret['data'] = $result;\n $ret['expire'] = $chk_sub?HWK_EXPIRE:HWK_OK;\n\n //已完成列表 不提示\n if($raw['status'] == 1 )\n $ret['expire'] = HWK_OK;\n\n\nEND:\n\n $this->retReturn($ret);\n\n }", "protected function getListQuery()\n\t{\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Select the needed fields from the table.\n\t\t$query->select($this->getState('list.select', 'a.id, a.name, a.alias, a.published, a.language, a.checked_out, a.created_by'));\n\t\t$query->from($db->quoteName('#__podcastmanager_feeds', 'a'));\n\n\t\t// Join over the language\n\t\t$query->select($db->quoteName('l.title', 'language_title'));\n\t\t$query->join('LEFT', $db->quoteName('#__languages', 'l') . ' ON l.lang_code = a.language');\n\n\t\t// Filter by published state\n\t\t$published = $this->getState('filter.published');\n\n\t\tif (is_numeric($published))\n\t\t{\n\t\t\t$query->where($db->quoteName('a.published') . ' = ' . (int) $published);\n\t\t}\n\t\telseif ($published === '')\n\t\t{\n\t\t\t$query->where('(' . $db->quoteName('a.published') . ' IN (0, 1))');\n\t\t}\n\n\t\t// Filter on the language.\n\t\t$language = $this->getState('filter.language');\n\n\t\tif (!empty($language))\n\t\t{\n\t\t\t$query->where($db->quoteName('a.language') . ' = ' . $db->quote($language));\n\t\t}\n\n\t\t// Handle the list ordering.\n\t\t$ordering = $this->getState('list.ordering');\n\t\t$direction = $this->getState('list.direction');\n\n\t\tif (!empty($ordering))\n\t\t{\n\t\t\t$query->order($db->escape($ordering) . ' ' . $db->escape($direction));\n\t\t}\n\n\t\t$query->group('a.id, a.name, a.published, a.language, a.checked_out, a.created_by, l.title');\n\n\t\treturn $query;\n\t}", "function sorter($id, $parr, $start = 0, $onpage = 20)\n {\n global $TDB;\n \n if (!$parr[1])\n {\n $parr[1]='asc';\n }\n\n if ($parr[2])\n {\n $parr[2]='CAST(value AS ' . $parr[2] . ')';\n }\n else\n {\n $parr[2]='value';\n }\n\n $q='SELECT node_name FROM `_tree_catalog_container_param` WHERE `parameter`=\"' . $parr[0]\n . '\" and node_name in(\"' . implode('\",\"', $id) . '\") order by ' . $parr[2] . ' ' . $parr[1];\n\n if ($r=$TDB->get_results($q))\n {\n return XARRAY::askeyval($r, 'node_name');\n }\n }", "function getListQuery()\n\t{\n\t\tglobal $jlistConfig; \n \n // Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n $user = JFactory::getUser();\n $groups = implode (',', $user->getAuthorisedViewLevels());\n \n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$this->getState(\n\t\t\t\t'list.select',\n\t\t\t\t'a.file_id, a.file_title, a.file_alias, a.description, a.description_long, a.file_pic, a.images, a.price, a.release, a.file_language, a.system, '.\n 'a.license, a.url_license, a.license_agree, a.size, a.date_added, a.file_date, a.publish_from, a.publish_to, a.use_timeframe, a.url_download, a.preview_filename, '.\n 'a.other_file_id, a.md5_value, a.sha1_value, a.extern_file, a.extern_site, a.mirror_1, a.mirror_2, a.extern_site_mirror_1, a.extern_site_mirror_2, '.\n 'a.url_home, a.author, a.url_author, a.created_id, a.created_mail, a.modified_id, a.modified_date, a.submitted_by, a.set_aup_points, a.downloads, '.\n 'a.cat_id, a.changelog, a.password, a.password_md5, a.views, a.metakey, a.metadesc, a.robots, a.update_active, a.custom_field_1, '.\n 'a.custom_field_2, a.custom_field_3, a.custom_field_4, a.custom_field_5, a.custom_field_6, a.custom_field_7, a.custom_field_8, a.custom_field_9, '.\n 'a.custom_field_10, a.custom_field_11, a.custom_field_12, a.custom_field_13, a.custom_field_14, a.access, a.language, a.ordering, a.featured, '. \n 'a.published, a.checked_out, a.checked_out_time, ' .\n\t\t\t\t// use date_added if modified_date is 0\n // 'CASE WHEN a.modified_date = 0 THEN a.date_added ELSE a.modified_date END as modified, ' .\n 'a.modified_date as modified, ' .\n \t\t\t\t'a.modified_id,' .\n\t\t\t\t// use date_added if publish_from is 0\n\t\t\t\t'CASE WHEN a.publish_from = 0 THEN a.date_added ELSE a.publish_from END as publish_from,' .\n\t\t\t\t\t'a.publish_to, a.images, a.metakey, a.metadesc, a.access, ' .\n\t\t\t\t\t'a.downloads,'.' '.$query->length('a.description_long').' AS readmore'\n\t\t\t)\n\t\t);\n\n\t\t// Process an Archived Download layout\n\t\tif ($this->getState('filter.published') == 2) {\n\t\t\t// If badcats is not null, this means that the download is inside an archived category\n\t\t\t// In this case, the state is set to 2 to indicate Archived (even if the download state is Published)\n\t\t\t$query->select($this->getState('list.select', 'CASE WHEN badcats.id is null THEN a.published ELSE 2 END AS state'));\n\t\t}\n\t\telse {\n\t\t\t// Process non-archived layout\n\t\t\t// If badcats is not null, this means that the download is inside an unpublished category\n\t\t\t// In this case, the state is set to 0 to indicate Unpublished (even if the download state is Published)\n\t\t\t$query->select($this->getState('list.select', 'CASE WHEN badcats.id is not null THEN 0 ELSE a.published END AS state'));\n\t\t}\n\n\t\t$query->from('#__jdownloads_files AS a');\n \n // Join on files table.\n $query->select('aa.url_download AS filename_from_other_download');\n $query->join('LEFT', '#__jdownloads_files AS aa on aa.file_id = a.other_file_id'); \n\n\t\t// Join over the categories.\n\t\t$query->select('c.title AS category_title, c.access AS category_access, c.alias AS category_alias, c.cat_dir AS category_cat_dir, c.cat_dir_parent AS category_cat_dir_parent');\n\t\t$query->join('LEFT', '#__jdownloads_categories AS c ON c.id = a.cat_id');\n \n\t\t$query->join('LEFT', '#__users AS ua ON ua.id = a.created_id');\n\t\t$query->join('LEFT', '#__users AS uam ON uam.id = a.modified_id');\n\n // Join on user table.\n if ($jlistConfig['use.real.user.name.in.frontend']){\n $query->select('u.name AS creator');\n } else {\n $query->select('u.username AS creator');\n } \n $query->join('LEFT', '#__users AS u on u.id = a.created_id');\n \n if ($jlistConfig['use.real.user.name.in.frontend']){\n $query->select('u2.name AS modifier');\n } else {\n $query->select('u2.username AS modifier');\n } \n $query->join('LEFT', '#__users AS u2 on u2.id = a.modified_id'); \n \n // Join on license table.\n $query->select('l.title AS license_title, l.url AS license_url, l.description AS license_text, l.id as lid');\n $query->join('LEFT', '#__jdownloads_licenses AS l on l.id = a.license');\n \n // Join on ratings table.\n $query->select('ROUND(r.rating_sum / r.rating_count, 0) AS rating, r.rating_count as rating_count, r.rating_sum as rating_sum');\n $query->join('LEFT', '#__jdownloads_ratings AS r on r.file_id = a.file_id'); \n \n\t\t// Join over the categories to get parent category titles\n\t\t$query->select('parent.title as parent_title, parent.id as parent_id, parent.alias as parent_alias');\n\t\t$query->join('LEFT', '#__jdownloads_categories as parent ON parent.id = c.parent_id');\n \n // Join on menu table. We need the single download menu itemid when exist \n $query->select('menuf.id AS menuf_itemid');\n $query->join('LEFT', '(SELECT id, link, access, published from #__menu GROUP BY link) AS menuf on menuf.link LIKE CONCAT(\\'index.php?option=com_jdownloads&view=download&id=\\',a.file_id) AND menuf.published = 1 AND menuf.access IN ('.$groups.')') ;\n\n\t\t// Join to check for category published state in parent categories up the tree\n\t\t$query->select('c.published, CASE WHEN badcats.id is null THEN c.published ELSE 0 END AS parents_published');\n\t\t$subquery = 'SELECT cat.id as id FROM #__jdownloads_categories AS cat JOIN #__jdownloads_categories AS parent ';\n\t\t$subquery .= 'ON cat.lft BETWEEN parent.lft AND parent.rgt ';\n\t\t// Find any up-path categories that are not published\n\t\t// If all categories are published, badcats.id will be null, and we just use the download state\n\t\t$subquery .= ' AND parent.published != 1 GROUP BY cat.id ';\n\t\t// Select state to unpublished if up-path category is unpublished\n\t\t$publishedWhere = 'CASE WHEN badcats.id is null THEN a.published ELSE 0 END';\n \n\t\t$query->join('LEFT OUTER', '(' . $subquery . ') AS badcats ON badcats.id = c.id');\n\n\t\t// Filter by user id\n $query->where('a.created_id = '.$db->Quote($user->id)); \n \n // Filter by access level.\n\t\tif ($access = $this->getState('filter.access')) {\n\t\t\t$query->where('a.access IN ('.$groups.')');\n\t\t\t$query->where('c.access IN ('.$groups.')');\n\t\t}\n\n\t\t// Filter by published state\n\t\t$published = $this->getState('filter.published');\n\n\t\tif (is_numeric($published)) {\n\t\t\t// Use download state if badcats.id is null, otherwise, force 0 for unpublished\n\t\t\t$query->where($publishedWhere . ' = ' . (int) $published);\n\t\t}\n\t\telseif (is_array($published)) {\n\t\t\tArrayHelper::toInteger($published);\n\t\t\t$published = implode(',', $published);\n\t\t\t// Use download state if badcats.id is null, otherwise, force 0 for unpublished\n\t\t\t$query->where($publishedWhere . ' IN ('.$published.')');\n\t\t}\n \n // Filter by a single category\n $categoryId = $this->getState('filter.category_id');\n\n if (is_numeric($categoryId)) {\n $type = $this->getState('filter.category_id.include', true) ? '= ' : '<> ';\n\n $categoryEquals = 'a.cat_id '.$type.(int) $categoryId;\n $query->where($categoryEquals);\n } else { \n if (is_array($categoryId) && (count($categoryId) > 0)) {\n ArrayHelper::toInteger($categoryId);\n $categoryId = implode(',', $categoryId);\n if (!empty($categoryId)) {\n $type = $this->getState('filter.category_id.include', true) ? 'IN' : 'NOT IN';\n $query->where('a.cat_id '.$type.' ('.$categoryId.')');\n }\n } \n } \n\n\t\t// Filter by author\n\t\t$authorId = $this->getState('filter.author_id');\n\t\t$authorWhere = '';\n\n\t\tif (is_numeric($authorId)) {\n\t\t\t$type = $this->getState('filter.author_id.include', true) ? '= ' : '<> ';\n\t\t\t$authorWhere = 'a.created_id '.$type.(int) $authorId;\n\t\t}\n\t\telseif (is_array($authorId)) {\n\t\t\tArrayHelper::toInteger($authorId);\n\t\t\t$authorId = implode(',', $authorId);\n\n\t\t\tif ($authorId) {\n\t\t\t\t$type = $this->getState('filter.author_id.include', true) ? 'IN' : 'NOT IN';\n\t\t\t\t$authorWhere = 'a.created_id '.$type.' ('.$authorId.')';\n\t\t\t}\n\t\t}\n \n\t\tif (!empty($authorWhere)) {\n\t\t\t$query->where('('.$authorWhere.')');\n\t\t}\n\t\t\n\t\t// Filter by start and end dates.\n\t\t$nullDate\t= $db->Quote($db->getNullDate());\n\t\t$nowDate = $db->Quote(JFactory::getDate()->toSql()); // True to return the date string in the local time zone, false to return it in GMT.\n\n\t\t$query->where('(a.publish_from = '.$nullDate.' OR a.publish_from <= '.$nowDate.')');\n\t\t$query->where('(a.publish_to = '.$nullDate.' OR a.publish_to >= '.$nowDate.')');\n\n\t\t// Filter by Date Range or Relative Date\n\t\t$dateFiltering = $this->getState('filter.date_filtering', 'off');\n\t\t$dateField = $this->getState('filter.date_field', 'a.date_added');\n\n\t\tswitch ($dateFiltering)\n\t\t{\n\t\t\tcase 'range':\n\t\t\t\t$startDateRange = $db->Quote($this->getState('filter.start_date_range', $nullDate));\n\t\t\t\t$endDateRange = $db->Quote($this->getState('filter.end_date_range', $nullDate));\n\t\t\t\t$query->where('('.$dateField.' >= '.$startDateRange.' AND '.$dateField .\n\t\t\t\t\t' <= '.$endDateRange.')');\n\t\t\t\tbreak;\n\n\t\t\tcase 'relative':\n\t\t\t\t$relativeDate = (int) $this->getState('filter.relative_date', 0);\n\t\t\t\t$query->where($dateField.' >= DATE_SUB('.$nowDate.', INTERVAL ' .\n\t\t\t\t\t$relativeDate.' DAY)');\n\t\t\t\tbreak;\n\n\t\t\tcase 'off':\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// process the filter for list views with user-entered filters\n\t\t$params = $this->getState('params');\n\n\t\tif ((is_object($params)) && ($params->get('filter_field') != 'hide') && ($filter = $this->getState('list.filter'))) {\n\t\t\t// clean filter variable\n\t\t\t$filter = JString::strtolower($filter);\n\t\t\t$hitsFilter = intval($filter);\n\t\t\t$filter = $db->Quote('%'.$db->escape($filter, true).'%', false);\n\n\t\t\tswitch ($params->get('filter_field'))\n\t\t\t{\n\t\t\t\tcase 'author':\n\t\t\t\t\t$query->where(\n\t\t\t\t\t\t'LOWER(ua.name) LIKE '.$filter.' '\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hits':\n\t\t\t\t\t$query->where('a.downloads >= '.$hitsFilter.' ');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'title':\n\t\t\t\tdefault: // default to 'title' if parameter is not valid\n\t\t\t\t\t$query->where('LOWER( a.file_title ) LIKE '.$filter);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Filter by language\n\t\tif ($this->getState('filter.language')) {\n\t\t\t$query->where('a.language in ('.$db->quote(JFactory::getLanguage()->getTag()).','.$db->quote('*').')');\n\t\t}\n \n // Filter by uncategorised (cat_id = 1 for 'root')\n if ($this->getState('only_uncategorised')) {\n $query->where('a.cat_id = 1');\n }\n\n // Filter by featured state\n $featured = $this->getState('filter.featured');\n\n switch ($featured)\n {\n case 'hide':\n $query->where('a.featured = 0');\n break;\n\n case 'only':\n $query->where('a.featured = 1');\n break;\n\n case 'show':\n default:\n break;\n } \n \n\t\t// Add the list ordering clause.\n $order = $this->getState('list.ordering', 'a.ordering').' '.$this->getState('list.direction', 'ASC');\n $order = str_replace('DESC DESC','DESC', $order);\n $query->order($order);\n\t\t\n\t\treturn $query;\n\t}", "private function _getDatatablesQuery()\n {\n $this->query = DB::table($this->table);\n $this->query->leftJoin('categories', 'categories.id', '=', 'documents.category_id');\n $this->query->select('documents.stt', 'documents.id', 'documents.title','documents.updated_at');\n\n if (strpos(URL::current(), 'admin') < 0) {\n $this->query->where('categories.searchable', 1);\n }\n\n if (Input::get('cat'))\n $this->query->where('documents.category_id', Input::get('cat'));\n\n if (Input::get('isBuyed')) {\n $this->query->join('users_documents', 'users_documents.document_id', '=', 'documents.stt');\n $this->query->where('users_documents.user_id', Auth::user()->id);\n }\n\n if(Input::has('search.value')) {\n $this->_getSearchStringQuery();\n }\n\n // here order processing\n if (isset($_GET['order'])) {\n $this->query->orderBy(\n $this->column_order[$_GET['order']['0']['column']],\n $_GET['order']['0']['dir']\n );\n } else if (isset($this->order)) {\n $order = $this->order;\n $this->query->orderBy(key($order), $order[key($order)]);\n }\n }", "function generate_sort_links($user_search, $sort) {\n $sort_links = '';\n\n switch ($sort) {\n case 1:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 2.5:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.6\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 3:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=4\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 5:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=6\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n default:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n }\n\n return $sort_links;\n }", "public function testTableSortQuery() {\n $sorts = [\n ['field' => 'Task ID', 'sort' => 'desc', 'first' => 'perform at superbowl', 'last' => 'eat'],\n ['field' => 'Task ID', 'sort' => 'asc', 'first' => 'eat', 'last' => 'perform at superbowl'],\n ['field' => 'Task', 'sort' => 'asc', 'first' => 'code', 'last' => 'sleep'],\n ['field' => 'Task', 'sort' => 'desc', 'first' => 'sleep', 'last' => 'code'],\n // more elements here\n\n ];\n\n foreach ($sorts as $sort) {\n $this->drupalGet('database_test/tablesort/', ['query' => ['order' => $sort['field'], 'sort' => $sort['sort']]]);\n $data = json_decode($this->getSession()->getPage()->getContent());\n\n $first = array_shift($data->tasks);\n $last = array_pop($data->tasks);\n\n $this->assertEquals($sort['first'], $first->task, 'Items appear in the correct order.');\n $this->assertEquals($sort['last'], $last->task, 'Items appear in the correct order.');\n }\n }" ]
[ "0.6734575", "0.66294366", "0.63809276", "0.62878597", "0.6256276", "0.62541014", "0.62506497", "0.62256473", "0.61263484", "0.60640603", "0.6047258", "0.6041676", "0.5973055", "0.5920303", "0.59125245", "0.5891599", "0.58716315", "0.5865718", "0.5856988", "0.5828591", "0.5791572", "0.57630855", "0.57601315", "0.5756918", "0.5741378", "0.57310253", "0.5728635", "0.57283854", "0.57063496", "0.57005346", "0.5685413", "0.5674116", "0.5674057", "0.5667446", "0.5665619", "0.56629014", "0.5658409", "0.56489253", "0.56191605", "0.5614214", "0.5612585", "0.5604048", "0.5603134", "0.56025183", "0.559884", "0.55884206", "0.5569151", "0.5567384", "0.55652267", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55575466", "0.55498046", "0.554695", "0.5545652", "0.5533151", "0.55296403", "0.5527224", "0.5526971", "0.5520054", "0.550696", "0.5506164", "0.5505444", "0.55047023", "0.5502086", "0.5500241", "0.5499935", "0.5493323", "0.5492747", "0.5485727", "0.5483395", "0.54783547", "0.54749197", "0.54735994", "0.5472342", "0.54715014", "0.54681486" ]
0.55505574
75
Sort Array by first Column
public function sort_array_by_col($array) { function compare($wert_a, $wert_b) { // Sortierung nach dem zweiten Wert des Array (Index: 1) $a = $wert_a[0]; $b = $wert_b[0]; if ($a == $b) { return 0; } return ($a > $b) ? -1 : +1; } usort($array, 'compare'); return $array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _sortByArray($array) {}", "function array_sort_by(&$array_initial, $col, $order = SORT_ASC){\n\n $arrAux = array();\n\n foreach ($array_initial as $key=> $row){\n $arrAux[$key] = is_object($row) ? $arrAux[$key] = $row->$col : $row[$col];\n $arrAux[$key] = strtolower($arrAux[$key]);\n }\n\n array_multisort($arrAux, $order, $array_initial);\n }", "protected function sortDataArray() {}", "Private function array_sort_by_columnR(&$arr, $col, $dir = SORT_DESC) {\n $sort_col = array();\n foreach ($arr as $key=>$row) {\n $sort_col[$key] = $row[$col];\n }\narray_multisort($sort_col, $dir, $arr);\nreturn $arr;\n}", "public function asort() {}", "function array_sort_by_column(&$arr, $col, $dir = SORT_ASC) {\n\t$sort_col = array();\n\tforeach ($arr as $key=> $row) {\n\t\t$sort_col[$key] = $row[$col];\n\t}\n\n\tarray_multisort($sort_col, $dir, $arr);\n}", "public function sort();", "public function mySort(array $array);", "public function array_sort_by_column($array, $column)\r\n\t{\r\n\t\tif(!empty($array))\r\n\t\t{\r\n\t\t\tforeach($array as $key => $row)\r\n\t\t\t{\r\n\t\t\t\tif(isset($row[$column]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sort_values[$key] = $row[$column];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tasort($sort_values);\r\n\t\t\treset($sort_values);\r\n\r\n\t\t\twhile (list ($arr_key, $arr_val) = each ($sort_values))\r\n\t\t\t{\r\n\t\t\t\t$sorted_arr[] = $array[$arr_key];\r\n\t\t\t}\r\n\t\t\tunset($array);\r\n\t\t\treturn $sorted_arr;\r\n\t\t}\r\n\t}", "function md_multisort($arr, $col, $method = SORT_ASC)\n{\n\tif(!is_array($arr) || empty($arr)) return false;\n\tif($col === null) return $arr;\n\telseif($col == 'name') $tmp = array_keys($arr);\n\telse foreach($arr as $key => $row) $tmp[$key] = @$row[$col];\n\tarray_multisort($tmp, $method, $arr);\n\treturn $arr;\n}", "function array_multisort_2d($array,$column,$sortorder='',$base=1){\n\tglobal $array_multisort_2d;\n\tif(!$array)return $array;\n\n\tforeach($array as $n=>$v){\n\t\t//develop link based on column\n\t\t$ref[]=strtolower($v[$column]);\n\t\t$refb[]=$n;\n\t}\n\t//need to develop to arsort if called\n\tasort($ref);\n\t$base=$base-1;\n\tforeach($ref as $n=>$v){\n\t\t$base++;\n\t\t$buffer[$base]=$array[$refb[$n]];\n\t}\n\treturn $buffer;\n}", "function arraySortByColumn(&$arr, $col, $dir = SORT_ASC) {\n\t\t$sort_col = array();\n\t\tforeach ($arr as $key=> $row) {\n\t\t\t$sort_col[$key] = $row[$col];\n\t\t}\n\t\tarray_multisort($sort_col, $dir, $arr);\n\t}", "function arrayCSort($marray, $column, $sortflag) {\n\t\tforeach ($marray as $row) {\n\t\t\t$sortarr[] = strtolower($row[$column]);\n\t\t}\n\t\tif (isset($sortarr)) {\n\t\t\tif (!is_array($sortarr) ) {\n\t\t\t\treturn $marray;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $marray;\n\t\t}\n\t\tarray_multisort($sortarr, $sortflag, $marray, $sortflag);\n\t\treturn $marray;\n\t}", "function aasort(&$array, $key){ // Seu array e o campo a ser ordenado\r\n\t$sorter = array();\r\n\t$ret = array();\r\n\treset($array);\r\n\tforeach($array as $ii => $va){\r\n\t\t$sorter[$ii] = $va[$key];\r\n\t}\r\n\tasort($sorter);\r\n\tforeach($sorter as $ii => $va){\r\n\t\t$ret[$ii] = $array[$ii];\r\n\t}\r\n\treturn ($ret);\r\n}", "function rearrangePro_orderby(){\n\t\t$args = func_get_args();\n\t\t$data = array_shift($args);\n\t\tforeach ($args as $n => $field) {\n\t\t\tif (is_string($field)) {\n\t\t\t\t$tmp = array();\n\t\t\t\tforeach ($data as $key => $row)\n\t\t\t\t\t$tmp[$key] = $row[$field];\n\t\t\t\t$args[$n] = $tmp;\n\t\t\t}\n\t\t}\n\t\t$args[] = &$data;\n\t\tcall_user_func_array('array_multisort', $args);\n\t\treturn array_pop($args);\n\t}", "function array_sort($array, Closure $callback)\n\t{\n\t\treturn Illuminate\\Support\\Collection::make($array)->sortBy($callback)->all();\n\t}", "protected function _orderColumns(array $row)\n {\n $sortedColumns = array();\n foreach ($this->_columnOrder as $title) {\n $sortedColumns[$title] = $row[$title];\n }\n $row = array_merge($sortedColumns, $row);\n\n return $row;\n }", "public function getSortColumn();", "function sort_array($array, $key)\n {\n foreach ($array as $temp_list) {\n $sort_aux[] = ($temp_list[$key]);\n }\n array_multisort($sort_aux, SORT_ASC, $array);\n\n return $array;\n }", "function adleex_resource_list_column_sort($cols) {\nglobal $current_screen;\n\t\n\tif ($current_screen->post_type!='resource') return $cols;\n\n\t$order = array(\n 'post_title' => true, );\n\tforeach($order\tas $k => $v) $cols[$k]=true;\n\treturn $cols;\n}", "function array_qsort(&$array, $column, $order='SORT_ASC', $first=0, $last=0) {\r\n\t\t// $column - index (column) on which to sort. can be a string if using an associative array\r\n\t\t// $order - SORT_ASC (default) for ascending or SORT_DESC for descending\r\n\t\t// $first - start index (row) for partial array sort\r\n\t\t// $last - stop index (row) for partial array sort\r\n\t\t// $keys - array of key values for hash array sort\r\n\t\tif(is_array($array)) {\r\n\t\t\t$keys = array_keys($array);\r\n\t\t\tif($last == -2) {\r\n\t\t\t\t$last = count($array) - 1;\r\n\t\t\t}\r\n\t\t\tif($last > $first) {\r\n\t\t\t\t$alpha = $first;\r\n\t\t\t\t$omega = $last;\r\n\t\t\t\t$key_alpha = $keys[$alpha];\r\n\t\t\t\t$key_omega = $keys[$omega];\r\n\t\t\t\t$guess = $array[$key_alpha][$column];\r\n\t\t\t\twhile($omega >= $alpha) {\r\n\t\t\t\t\tif($order == 'SORT_ASC') {\r\n\t\t\t\t\t\twhile($array[$key_alpha][$column] < $guess) {\r\n\t\t\t\t\t\t\t$alpha++;\r\n\t\t\t\t\t\t\t$key_alpha = $keys[$alpha]; \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\twhile($array[$key_omega][$column] > $guess) {\r\n\t\t\t\t\t\t\t$omega--;\r\n\t\t\t\t\t\t\t$key_omega = $keys[$omega]; \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile($array[$key_alpha][$column] > $guess) {\r\n\t\t\t\t\t\t\t$alpha++;\r\n\t\t\t\t\t\t\t$key_alpha = $keys[$alpha]; \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\twhile($array[$key_omega][$column] < $guess) {\r\n\t\t\t\t\t\t\t$omega--;\r\n\t\t\t\t\t\t\t$key_omega = $keys[$omega]; \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($alpha > $omega) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$temporary = $array[$key_alpha];\r\n\t\t\t\t\t$array[$key_alpha] = $array[$key_omega];\r\n\t\t\t\t\t$alpha++;\r\n\t\t\t\t\t$key_alpha = $keys[$alpha];\r\n\t\t\t\t\t$array[$key_omega] = $temporary;\r\n\t\t\t\t\t$omega--;\r\n\t\t\t\t\t$key_omega = $keys[$omega];\r\n\t\t\t\t}\r\n\t\t\t\tReTidy::array_qsort ($array, $column, $order, $first, $omega);\r\n\t\t\t\tReTidy::array_qsort ($array, $column, $order, $alpha, $last);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "public function testSort()\n {\n $array = array(\n array('col1' => 20, 'col2' => 20),\n array('col1' => 20, 'col2' => 10),\n array('col1' => 10, 'col2' => 50),\n array('col1' => 10, 'col2' => 10),\n array('col1' => 10, 'col2' => 20),\n );\n\n $expected = array(\n array('col1' => 10, 'col2' => 50),\n array('col1' => 10, 'col2' => 10),\n array('col1' => 10, 'col2' => 20),\n array('col1' => 20, 'col2' => 20),\n array('col1' => 20, 'col2' => 10),\n );\n\n Sort::mergesort($array, function ($row1, $row2) {\n return strcmp($row1['col1'], $row2['col1']);\n });\n\n $this->assertEquals($expected, $array);\n }", "function fn_sort_md_array_by_value(&$array, $key)\n{\n\t//ref. http://stackoverflow.com/questions/2699086/sort-multi-dimensional-array-by-value\n $sorter=array();\n $ret=array();\n reset($array);\n foreach ($array as $ii => $va) {\n $sorter[$ii]=$va[$key];\n }\n asort($sorter);\n foreach ($sorter as $ii => $va) {\n $ret[$ii]=$array[$ii];\n }\n $array=$ret;\n}", "function sort_array_of_arrays( $array, $sort_by_key ) {\n\n usort( $array, function ( $item1, $item2 ) use ( $sort_by_key ) {\n\n if ($item1[ $sort_by_key ] == $item2[ $sort_by_key ]) return 0;\n return $item1[ $sort_by_key ] < $item2[ $sort_by_key ] ? -1 : 1;\n\n });\n\n return $array;\n\n}", "public function sort(array $array)\n {\n sort($array);\n $count = 0;\n foreach ($array as $key => $valor)\n {\n $arrayOrderecha[$key] = $valor;\n $count ++;\n }\n //retorno del resultado a la vista\n return $arrayOrderecha;\n }", "function sort_by_key($array, $index) {\n\t$sort = array();\n\n\t//préparation d'un nouveau tableau basé sur la clé à trier\n\tforeach ($array as $key => $val) {\n\t\t$sort[$key] = $val[$index];\n\t}\n\n\t//tri par ordre naturel et insensible à la casse\n\tnatcasesort($sort);\n\n\t//formation du nouveau tableau trié selon la clé\n\t$output = array();\n\tforeach($sort as $key => $val) {\n\t\t$output[] = $array[$key];\n\t}\nreturn $output;\n}", "function Ascending(Array $array, $field) {\n if (is_numeric($array[0][$field])) {\n usort($array, array(new MultiArraySorting($field), 'numberSort'));\n } else {\n usort($array, array(new MultiArraySorting($field), 'textSort'));\n }\n return $array;\n }", "function sortByKeys($arr, $rows) {\n\n $res = array();\n foreach($rows as $key=>$val) {\n if(key_exists($key, $arr))\n $res[] = $arr[$key];\n }\n return $res;\n}", "public final function manualSort(){\r\n\t\t$itemid=$this->itemid;\r\n\t\t$position=$this->sortarray;\r\n\t\t$newarray=array();\r\n\t\t$max=-1;\r\n\t\tforeach($this->sorteddata as $pmid){\r\n\t\t\t$i=$itemid[$pmid];\r\n\t\t\tif (!isset($position[$i])) continue;\r\n\t\t\t$newarray[$position[$i]]=$pmid;\r\n\t\t\tif ($max<$position[$i]) $max=$position[$i];\r\n\t\t}\r\n\t\tforeach($this->sorteddata as $pmid){\r\n\t\t\t$i=$itemid[$pmid];\r\n\t\t\tif (!isset($position[$i])) $newarray[++$max]=$pmid;\r\n\t\t}\r\n\t\t$this->sorteddata=$newarray;\r\n\t}", "function sortArray( $data, $field ) {\r\n\t$field = (array) $field;\r\n\tuasort( $data, function($a, $b) use($field) {\r\n\t\t$retval = 0;\r\n\t\tforeach( $field as $fieldname ) {\r\n\t\t\tif( $retval == 0 ) $retval = strnatcmp( $a[$fieldname], $b[$fieldname] );\r\n\t\t}\r\n\t\treturn $retval;\r\n\t} );\r\n\treturn $data;\r\n}", "private function sortFiles(&$array){\n if(isset($array['files'])) sort($array['files']);\n if(isset($array['images'])) sort($array['images']);\n }", "function sortMatrix(&$asMatrix){\r\n for ($i = 0; $i < count($asMatrix); $i++) {\r\n for ($j = $i + 1; $j < count($asMatrix); $j++) {\r\n if ($asMatrix[$i]['Magnitude'] < $asMatrix[$j]['Magnitude']) {\r\n $temp = $asMatrix[$i];\r\n $asMatrix[$i] = $asMatrix[$j];\r\n $asMatrix[$j] = $temp;\r\n }\r\n }\r\n }\r\n }", "function sorter_by_value($a, $b) {\n return strcmp($a[0], $b[0]);\n}", "function sort(/*. array[int] .*/ $a, $sort_flags = SORT_REGULAR){}", "function array_sort($array, $sortby) {\n\n $size = sizeof($array);\n\n for($i=0;$i<$size;$i++) {\n for($j=$i+1;$j<$size;$j++) {\n $temp = array();\n if($array[$i]['priority']<$array[$j]['priority']) {\n $temp = $array[$i];\n $array[$i] = $array[$j];\n $array[$j] = $temp;\n }\n }\n }\n return $array;\n}", "function _usort_by_first_member($a, $b)\n {\n }", "function array_sort($array, $callback = null)\n {\n return Arr::sort($array, $callback);\n }", "function sort($array,$by,$type='asc') {\n\t\t$sortField=&$by;\n\t\t$multArray=&$array;\n\t\t\n\t\t$tmpKey='';\n\t\t$ResArray=array();\n\t\t$maIndex=array_keys($multArray);\n\t\t$maSize=count($multArray)-1;\n\t\tfor($i=0; $i < $maSize ; $i++) {\n\t\t\t$minElement=$i;\n\t\t\t$tempMin=$multArray[$maIndex[$i]][$sortField];\n\t\t\t$tmpKey=$maIndex[$i];\n\t\t\tfor ($j=$i+1; $j <= $maSize; $j++) {\n\t\t\t\tif ($multArray[$maIndex[$j]][$sortField] < $tempMin ) {\n\t\t\t\t\t$minElement=$j;\n\t\t\t\t\t$tmpKey=$maIndex[$j];\n\t\t\t\t\t$tempMin=$multArray[$maIndex[$j]][$sortField];\n\t\t \t}\n\t\t\t}\n\t\t\t$maIndex[$minElement]=$maIndex[$i];\n\t\t\t$maIndex[$i]=$tmpKey;\n\t\t}\n\t\tif ($type=='asc') {\n\t\t\tfor ($j=0;$j<=$maSize;$j++) {\n\t\t\t\t$ResArray[$maIndex[$j]]=$multArray[$maIndex[$j]];\n\t\t\t}\n\t\t} else {\n\t\t\tfor ($j=$maSize;$j>=0;$j--) {\n\t\t\t\t$ResArray[$maIndex[$j]]=$multArray[$maIndex[$j]];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ResArray;\n\t}", "static function sortasc_old($data, $fieldname)\n {\n $len1 = count($data);\n $len2 = $len1;\n for ($i = 0; $i < $len1; $i++)\n {\n for ($j = $i+1; $j < $len2-1; $j++)\n {\n if ($data[$i][$fieldname] > $data[$j][$fieldname])\n {\n $tmp = $data[$i];\n $data[$i] = $data[$j];\n $data[$j] = $tmp;\n }\n }\n }\n \n return $data;\n }", "function sortBy($field, &$array, $direction = 'asc')\n{\n usort($array, create_function('$a, $b', '\n $a = $a[\"' . $field . '\"];\n $b = $b[\"' . $field . '\"];\n\n if ($a == $b) return 0;\n\n $direction = strtolower(trim($direction));\n\n return ($a ' . ($direction == 'desc' ? '>' : '<') . ' $b) ? -1 : 1;\n '));\n\n return true;\n}", "public static function sort(&$array, $orderBy) {\n $new_array = array();\n foreach ($array as $key => $obj) {\n $new_array[$key] = get_object_vars($obj->getEntity());\n $obj->hash = $new_array[$key]['hash'] = spl_object_hash($obj);\n }\n\n $new_array = self::sort_array_multidim($new_array, $orderBy);\n\n $output = array();\n foreach ($new_array as $key => $value) {\n\n }\n print_r($new_array);\n }", "public function sortArraysByKeyCheckIfSortingIsCorrectDataProvider() {}", "public function asort()\n {\n }", "public function sort(array $nodes);", "function cjpopups_sortArrayByArray(Array $array, Array $orderArray) {\n $ordered = array();\n foreach($orderArray as $key) {\n if(array_key_exists($key,$array)) {\n $ordered[$key] = $array[$key];\n unset($array[$key]);\n }\n }\n return $ordered + $array;\n}", "function mysort(&$array){\n foreach($array as $k=>$v) $temp[$k] = preg_replace('/[a-zA-Z]/','',$k);\n asort($temp, SORT_NUMERIC);\n foreach(array_keys($temp) as $k) $temp[$k] = $array[$k];\n $array = $temp;\n }", "private function sortArray($array, $sort_by) {\r\n\t\tforeach ($array as $pos => $val) {\r\n\t\t\t$tmp_array[$pos] = $val[$sort_by];\r\n\t\t}\r\n\t\tasort($tmp_array);\r\n\r\n\t\t$return_array = [];\r\n\t\tforeach ($tmp_array as $pos => $val) {\r\n\t\t\t$return_array[$pos]['title'] = $array[$pos]['title'];\r\n\t\t\t$return_array[$pos]['label'] = $array[$pos]['label'];\r\n\t\t\t$return_array[$pos]['sort'] = $array[$pos]['sort'];\r\n\t\t\t$return_array[$pos]['function'] = $array[$pos]['function'];\r\n\t\t}\r\n\t\treturn $return_array;\r\n\t}", "function ldap_sort_by (&$array, $attr) {\n\t$sort_func = create_function('$a,$b', 'return strcasecmp($a[\"'.$attr.'\"], $b[\"'.$attr.'\"]);' );\n\tuasort($array, $sort_func);\n}", "function insertionSort(array &$arr)\n{\n\t$r = count($arr); // number of rows since its a 2d array [ [], [], [] ]\n\t$c = count($arr[0]); //number of columns\n\tfor ($i = 0; $i < $r * $c - 1; ++$i) {\n\t\tfor ($j = 0; $j < $r * $c - 1 - $i; ++$j) {\n\n\t\t\t// $j / $c gets each row: 0,0,0,1,1,1... and $j % $c gets each column: 0,1,2,0,1,2...\n\t\t\t//basically if $arr[0][1]>$arr[0][2] and so on\n\t\t\tif ($arr[$j / $c][$j % $c] > $arr[($j + 1) / $c][($j + 1) % $c]) {\n\n\t\t\t\t//swap the values\n\t\t\t\t$temp = $arr[($j + 1) / $c][($j + 1) % $c];\n\t\t\t\t$arr[($j + 1) / $c][($j + 1) % $c] = $arr[$j / $c][$j % $c];\n\t\t\t\t$arr[$j / $c][$j % $c] = $temp;\n\t\t\t}\n\t\t}\n\t}\n}", "private function removeDuplicatesAndSortArray(array $rawArray) : array {\n array_multisort(\n array_column($rawArray, 'X'), SORT_ASC,\n array_column($rawArray, 'Y'), SORT_ASC,\n $rawArray\n );\n\n return array_map(\"unserialize\", array_unique(array_map(\"serialize\", $rawArray)));\n }", "private function sortColumns($data)\n\t{\n\t\t$result = array();\n\t\tforeach ($data as $cell)\n\t\t{\n\t\t\t$row = $cell->key->row;\n\t\t\tif (!isset($result[$row])) {\n\t\t\t\t$result[$row] = new \\stdClass;\n\t\t\t\t$result[$row]->row = $cell->key->row;\n\t\t\t\tforeach ($this->columns as $col) {\n\t\t\t\t\t$pos = strpos($col, ':') ;\n\t\t\t\t\t$qualifier = ($pos) ? substr($col, $pos + 1) : NULL;\n\t\t\t\t\t$col = !$pos ? $col : substr($col, 0, $pos);\n\t\t\t\t\tif (!$qualifier)\n\t\t\t\t\t\t$result[$row]->{$col} = NULL;\n\t\t\t\t\telse if ($qualifier[0] != '/')\n\t\t\t\t\t\t$result[$row]->{$col}[$qualifier] = NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result[$row]->{$cell->key->column_family}[$cell->key->column_qualifier] = $cell->value;\n\t\t}\n\t\treturn $result;\n\t}", "function sortbygroup($col,$groupby) {\n $unique = array();\n $sorted = array();\n foreach ($col as $val) { //get all the unique values\n if (!in_array($val[$groupby],$unique)) {\n $unique[] = $val[$groupby];\n } \n }\n \n foreach($unique as $key) {\n foreach($col as $val) {//reads off the collection\n if($key == $val[$groupby]) {\n $sorted[] = $val;\n }\n }\n }\n return $sorted;\n}", "public static function sort(array &$arr)\n {\n uasort($arr, '\\undpaul\\MarioKartBundle\\Entity\\RankingRow::sortCallback');\n }", "public static function knatsort ($array)\r\n\t{\r\n\t\t$keys = array_keys ($array);\r\n\t\tnatsort ($keys);\r\n\t\t$items = array ();\r\n\t\tforeach ($keys as $key) {\r\n\t\t\t$items[$key] = $array[$key];\r\n\t\t}\r\n\t\t\r\n\t\t# Return the sorted list\r\n\t\treturn $items;\r\n\t}", "function asort(array &$array, $sort_flags = null)\n {\n }", "protected function sort()\n {\n // if no comparator is passed sort the internal array\n // by its keys, else use the comparator\n if ($this->comparator == null) {\n return ksort($this->items);\n } else {\n return CollectionUtils::sort($this, $this->comparator);\n }\n }", "function array_sort($array, Closure $callback)\n {\n return Arr::sort($array, $callback);\n }", "public function sort_data_table($arr, $timming, $isAsc = false){\n $new = array();\n for($i=0;$i<count($arr);$i++){\n $sort_key = $arr[$i]['log_date'];\n if($timming != \"4\" && $timming != \"5\" && $timming != \"6\"){\n $t1 = explode(\"-\", substr($arr[$i]['log_date'],0,7));\n $sort_key = $t1[1] . \"-\" . $t1[0];\n }\n $new[$sort_key] = $arr[$i];\n }\n if($isAsc == true){\n \tksort($new);\n }\n $return = array();\n foreach($new as $sort_key => $value){\n $return[] = $value;\n }\n return $return;\n }", "public function getSortBy();", "function usort(/*. array[int] .*/ $a, /*. mixed .*/ $cmp_func)\n{}", "function sortColumnAllocated($column,$order)\n\t {\n\t $data = array();\n\t\t$this->db->from('pof');\n\t\t$this->db->join('company', 'company.c_id=pof.client_id', 'left');\n\t\t$this->db->join('segment_name', 'segment_name.id=pof.location', 'left');\n\t\t$this->db->join('pof_cons', 'pof.pof_id=pof_cons.pos_id', 'left');\n\t\t$this->db->join('allocation','pof.pof_id=allocation.p_id','left');\n\t\t$this->db->join('events_tt', 'pof.pof_id=events_tt.pof_id', 'left');\n\t\t$this->db->where('pof.is_allocated',1);\n\t\t$this->db->order_by($column, $order);\n\t\t$this->db->group_by('pof.pof_id');\n\t $Q = $this->db->get();\n\t if ($Q->num_rows() > 0){\n\t \tforeach ($Q->result() as $row){\n\t $data[] = $row;\n\t }\n\t }\n\t \n\t return $data; \n\t }", "function sort_array_by_array($array, $keyname_array)\n\t{\n\t$result = array();\n\tforeach($keyname_array as $key)\n\t\t{\n\t\t$result[$key] = $array[$key];\n\t\t}\n\treturn $result;\n\t}", "public function insertSort(&$array,$filename,$type=-1)\n {\n for($i=1;$i<count($array);$i++)\n {\n $temp=$array[$i];\n $j=$i;\n if($type==1)\n {\n while($j>0 && strtolower($array[$j-1][$filename])> strtolower($temp[$filename]))\n {\n $array[$j]=$array[$j-1];\n $j--;\n }\n }\n else if($type==-1)\n {\n while($j>0 && strtolower($array[$j-1][$filename])< strtolower($temp[$filename]))\n {\n $array[$j]=$array[$j-1];\n $j--;\n }\n }\n $array[$j]=$temp;\n }\n\n return $array;\n }", "function w2l_sksort(&$array, $subkey=\"id\", $sort_ascending=false) {\n\n\tif( !is_array( $array ) )\n\t\treturn $array;\n\t\t\n\t$temp_array = array();\n\n if (count($array))\n $temp_array[key($array)] = array_shift($array);\n\n foreach($array as $key => $val){\n $offset = 0;\n $found = false;\n foreach($temp_array as $tmp_key => $tmp_val)\n {\n if(!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey])) {\n $temp_array = array_merge( (array)array_slice($temp_array,0,$offset),\n array($key => $val),\n array_slice($temp_array,$offset)\n );\n $found = true;\n }\n $offset++;\n }\n if(!$found) $temp_array = array_merge($temp_array, array($key => $val));\n }\n\n if ($sort_ascending) $array = array_reverse($temp_array);\n\n else $array = $temp_array;\n}", "public function sortArrayByDate($array) {\n //so they can be displayed in the correct order regardless of when they were entered\n for($i = 1; $i < count($array); $i++) {\n //Storing current entry\n $entry = $array[$i];\n \n //Storing date of current entry\n $date = $array[$i]->{'Datum'};\n \n //Storing $i in separate variable $j for manipulation\n $j = $i;\n \n //As long as $j is greater than zero (index of the first entry) and the date of the entry in the previous iteration\n //is less than that of the current entry\n while($j > 0 && $array[$j - 1]->{'Datum'} < $date) {\n \n //The entry at the index of the current iteration is assigned the value of the previous iteration\n $array[$j] = $array[$j - 1];\n \n //$j is decremented in order to move \"left\" in the array\n $j -= 1;\n }\n \n //When there are no longer any entries with earlier dates,\n //place the stored entry at the position we are currently in\n $array[$j] = $entry;\n }\n \n return $array;\n \n }", "function array_sort($array, $on, $order=SORT_ASC){\n $new_array = array();\n $sortable_array = array();\n if (count($array) > 0) {\n foreach ($array as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $k2 => $v2) {\n if ($k2 == $on) {\n $sortable_array[$k] = $v2;\n }\n }\n } else {\n $sortable_array[$k] = $v;\n }\n }\n switch ($order) {\n case SORT_ASC:\n asort($sortable_array);\n break;\n case SORT_DESC:\n arsort($sortable_array);\n break;\n }\n foreach ($sortable_array as $k => $v) {\n $new_array[] = $array[$k];\n }\n }\n return $new_array;\n}", "public function sortArray($input, $sortBy): static;", "function krsort(array &$array, $sort_flags = null)\n {\n }", "function array_sort_recursive($array)\n {\n return Arr::sortRecursive($array);\n }", "public function getSorting();", "public function sortStrategy();", "function sort(&$datatable, $field=0, $direct=0) {\n\t\t$comp = ($direct)? '$b,$a':'$a,$b';\n\t\t$code = '$result=';\n\t\t$code.= ($field===2||$field===3||$field===6)?\t// folder name/image title, description or file name\n\t\t\t\t 'strnatcasecmp($a['.$field.'],$b['.$field.']);'\n\t\t\t\t :\n\t\t\t\t '(int)$a['.$field.'] - (int)$b['.$field.'];';\n\t\t$code.= 'return ($result===0)? $a[0]-$b[0]:$result;';\n\t\t$comp_func = create_function($comp, $code);\n\t\tusort($datatable, $comp_func);\n\t}", "public function sortBy($header, $type=\"ASC\"){\n $arrayHeaders = array();\n $sort = $type == \"ASC\" ? SORT_ASC : SORT_DESC;\n if(!in_array($header, $this->header)){\n echo \"Inserire header corretto\";\n return;\n }\n foreach($this->csv as $key => $value){\n $arrayHeaders[$key] = $value[$header];\n }\n $csv = $this->csv;\n array_multisort($arrayHeaders,$sort,SORT_STRING,$csv);\n return $csv;\n }", "function array_sort($array, $on, $order=SORT_ASC)\n{\n $new_array = array();\n $sortable_array = array();\n\n if (count($array) > 0) {\n foreach ($array as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $k2 => $v2) {\n if ($k2 == $on) {\n $sortable_array[$k] = $v2;\n }\n }\n } else {\n $sortable_array[$k] = $v;\n }\n }\n\n switch ($order) {\n case SORT_ASC:\n asort($sortable_array);\n break;\n case SORT_DESC:\n arsort($sortable_array);\n break;\n }\n\n foreach ($sortable_array as $k => $v) {\n $new_array[$k] = $array[$k];\n }\n }\n\n return $new_array;\n}", "private function osort(&$oarray, $props)\n {\n usort(\n $oarray\n , create_function(\n '$a,$b'\n ,'if($a->' . $props . '== $b->' . $props .'){\n return 0;\n }\n else {\n return ($a->' . $props . '< $b->' . $props .') ? -1 : 1;\n }'\n )\n );\n }", "function ObjectSorter(&$array, $props){\n if(!is_array($props)) $props = array($props => true); \n\t\t$function = '$props=unserialize(\\''.trim(serialize($props)).'\\');\n\t\t\t\tforeach($props as $prop => $ascending) { \n\t\t\t\t\tif($a->$prop != $b->$prop) { \n\t\t\t\t\t\tif($ascending==\"ASC\") return ($a->$prop > $b->$prop) ? 1 : -1; \n\t\t\t\t\t\telse return ($b->$prop > $a->$prop) ? 1 : -1; \n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t\treturn -1;';\n usort($array, create_function('$a,$b', $function) );\n\t}", "public static function sort($array, $callback = null)\n {\n return Collection::make($array)->sort($callback)->all();\n }", "abstract public function prepareSort();", "function cmpByOrderIndexAsc($a, $b)\n{\n if ($a['order_index'] == $b['order_index']) {\n return 0;\n }\n return($a['order_index'] < $b['order_index']) ? -1 : 1;\n}", "public function getRealSorting()\n {\n return $this->realSortColumns;\n }", "function sortRetailers($retailersArray)\n{\n $keyRevenue = \"Revenue\";\n $keyType = \"Type\";\n\n //create a temp array to hold it\n foreach($retailersArray as $k =>$v){\n $RevenueTemp[] = strtolower($v[$keyRevenue]);\n }\n //sorted from high to low\n arsort($RevenueTemp);\n\n //create a new array to hold sorted temp\n foreach($RevenueTemp as $k=>$v) {\n $RevenueSorted[] = $retailersArray[$k];\n }\n\n\n $TempArrayLength = count($RevenueSorted);\n\n $ResellerSortTemp = [];\n for($i = 0; $i < $TempArrayLength; $i++) {\n if($RevenueSorted[$i][$keyRevenue] >= 100000.00 && $RevenueSorted[$i][$keyType] == 'RESELLER') {\n $ResellerSortTemp[$i] = $RevenueSorted[$i];\n continue;\n }\n }\n\n var_dump($ResellerSortTemp);\n\n\n}", "function awesomeSort($a, $b)\n{\n return $a['amount'] <=> $b['amount'];\n}", "function sortmulti ($array, $index, $order, $natsort=FALSE, $case_sensitive=FALSE) {\n \n if(is_array($array) && count($array)>0) {\n foreach(array_keys($array) as $key)\n $temp[$key]=$array[$key][$index];\n if(!$natsort) {\n if ($order=='asc')\n asort($temp);\n else \n arsort($temp);\n }\n else\n {\n if ($case_sensitive===true)\n natsort($temp);\n else\n natcasesort($temp);\n if($order!='asc')\n $temp=array_reverse($temp,TRUE);\n }\n foreach(array_keys($temp) as $key)\n if (is_numeric($key))\n $sorted[]=$array[$key];\n else \n $sorted[$key]=$array[$key];\n return $sorted;\n }\n \n //echo \"END FUNCTION sortmulti(array,index,order,natsort,case_sensitive) Workspaces_model.php<br />\";\n \n return $sorted;\n }", "function cmp($a, $b){\n if ((int)$a->date[0] == (int)$b->date[0]) {\n return 0;\n }\n return ((int)$a->date[0] > (int)$b->date[0]) ? -1 : 1;\n}", "function cmp($a, $b){\n if ((int)$a->date[0] == (int)$b->date[0]) {\n return 0;\n }\n return ((int)$a->date[0] > (int)$b->date[0]) ? -1 : 1;\n}", "function orderHotelsByRate($array)\n{\n return collect($array)->sortByDesc('hotelRate');\n}", "public static function sort2dArray(&$array, $sort_args) {\n $args = func_get_args();\n\n // F�r jedes zu sortierende Feld ein eigenes Array bilden\n @reset($array);\n while (list($field) = @each($array)) {\n for ($x = 1; $x < count($args); $x++) {\n // Ist das Argument ein String, sprich ein Sortier-Feld?\n if (is_string($args[$x])) {\n $value = $array[$field][$args[$x]];\n\n ${$args[$x]}[] = $value;\n }\n }\n }\n\n // Argumente for array_multisort bilden\n for ($x = 1; $x < count($args); $x++) {\n if (is_string($args[$x])) {\n // Argument ist ein TMP-Array\n $params[] = &${$args[$x]};\n } else {\n // Argument ist ein Sort-Flag so wie z.B. \"SORT_ASC\"\n $params[] = &$args[$x];\n }\n }\n\n // Der letzte Parameter ist immer das zu sortierende Array (Referenz!)\n $params[] = &$array;\n\n // Array sortieren\n call_user_func_array(\"array_multisort\", $params);\n\n @reset($array);\n }", "public static function arrayizeOrderBy($orderBy)\n {\n if (is_array($orderBy))\n {\n return $orderBy;\n }\n \n $columnsArray = array();\n \n $columns = explode(',', $orderBy);\n foreach ($columns as $column)\n {\n $columnArray = array();\n \n $column = trim($column);\n $parts = explode(' ', $column);\n \n $columnArray['column'] = $parts[0];\n \n if (isset($parts[1]) && strtolower($parts[1]) == 'desc')\n {\n $columnArray['direction'] = 'desc';\n }\n else\n {\n $columnArray['direction'] = 'asc';\n }\n \n $columnsArray[] = $columnArray;\n }\n \n return $columnsArray;\n }", "function sort_array_by_other_array($arr, $keys_arr, $num_field) {\n\t$new_arr = array();\n\t$left_arr = $arr;\n\t\n\tforeach($keys_arr as $key=>$value) {\n\t\tforeach($arr as $key2=>$value2) {\n\t\t\tif($value2[$num_field] == $value) {\n\t\t\t\t$new_arr[] = $value2;\n\t\t\t\tunset($left_arr[$key2]);\n\t\t\t}\t\n\t\t}\n\t}\t\n\t$new_arr = array_merge($new_arr, $left_arr);\n\treturn $new_arr;\n}", "public function sortResults(array $results, $order = 'ASC');", "public function array_sort($array, $callback = null)\n {\n return Arr::sort($array, $callback);\n }", "public function calculateSortColumn($column = null)\n\t{\n\t\tif ( ! $column)\n\t\t{\n\t\t\t$columns = $this->dataGrid->getColumns();\n\t\t\t$column = reset($columns);\n\t\t}\n\n\t\t$key = array_search($column, $this->dataGrid->getColumns());\n\n\t\t// If the sort column doesn't exist in the array, something has\n\t\t// gone wrong. Failing silently could confuse people.\n\t\tif ($key === false)\n\t\t{\n\t\t\tthrow new \\RuntimeException(\"Sort column [$column] does not exist in data.\");\n\t\t}\n\n\t\t// If our column is an alias, we'll use the actual value instead of the\n\t\t// alias for sorting.\n\t\tif ( ! is_numeric($key))\n\t\t{\n\t\t\t$column = $key;\n\t\t}\n\n\t\treturn $column;\n\t}", "function sortArrayWithSelection( &$arr ) {\r\n\t$i = 0;\r\n\t$size = count( $arr );\r\n\r\n\twhile ( $i < $size - 1 ) {\r\n\t\t$j = $i;\r\n\t\tfor ( $k = $j + 1; $k < $size; $k++ ) {\r\n\t\t\tif ( $arr[ $k ] < $arr[ $j ] ) {\r\n\t\t\t\t$j = $k;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( $arr[ $i ] > $arr[ $j ] ) {\r\n\t\t\tswapArrayByValues( $arr, $i, $j );\r\n\t\t}\r\n\t\t$i++;\r\n\t}\r\n}", "function arsort(array &$array, $sort_flags = null)\n {\n }", "public function sortPhoneData(){\n usort($this->phoneData, function($a, $b) {\n return $a['activationDate'] <=> $b['activationDate'];\n });\n\n }", "public function sortItems($items)\n {\n $new_items = [];\n $idx_col1 = 0;\n $idx_col2 = 1;\n \n foreach ($items as $key => $item)\n {\n if ($key < ( count($items) /2 ))\n {\n $new_items[$idx_col1] = $item;\n $idx_col1 +=2;\n }\n else\n {\n $new_items[$idx_col2] = $item;\n $idx_col2 +=2;\n }\n }\n ksort($new_items);\n return $new_items;\n }", "private function getOrdering()\n {\n return [[\n 'column' => 0,\n 'dir' => 'asc',\n ]];\n }", "public function array_sort_recursive($array)\n {\n return Arr::sortRecursive($array);\n }", "function sortArrayByArray($array,$orderArray) {\n\t$ordered = array();\n\tforeach($orderArray as $key) {\n\t\tif(array_key_exists($key,$array)) {\n\t\t\t$ordered[$key] = $array[$key];\n\t\t\tunset($array[$key]);\n\t\t}\n\t}\n\treturn $ordered + $array;\n}", "public function sort(array $paths);" ]
[ "0.72075224", "0.6971323", "0.68631285", "0.68221426", "0.660125", "0.65709245", "0.65704423", "0.64962673", "0.642985", "0.64006233", "0.63797593", "0.6368654", "0.6332017", "0.6230777", "0.6218475", "0.6204416", "0.6183569", "0.61483496", "0.6057417", "0.60482424", "0.60383093", "0.6009252", "0.60062844", "0.60061026", "0.5984341", "0.597668", "0.5971215", "0.5959889", "0.59571636", "0.5951613", "0.59385514", "0.59300804", "0.58943504", "0.5885512", "0.58565307", "0.5850447", "0.58371305", "0.5832931", "0.5811366", "0.57903", "0.57798856", "0.5703267", "0.5700372", "0.5696681", "0.5696039", "0.56511784", "0.56487715", "0.56445915", "0.56433284", "0.56416893", "0.5629219", "0.56260073", "0.56147045", "0.5608041", "0.5600403", "0.55811214", "0.5559528", "0.554945", "0.5549257", "0.5542161", "0.5541528", "0.55145323", "0.55132467", "0.5504111", "0.5502348", "0.5498273", "0.54956913", "0.5493579", "0.5491498", "0.5484512", "0.5480259", "0.5475136", "0.54746693", "0.54700655", "0.5469651", "0.5468381", "0.54665977", "0.5463195", "0.5457148", "0.54502845", "0.54456705", "0.5439733", "0.5439332", "0.5420173", "0.5420173", "0.54178137", "0.54134667", "0.5406958", "0.5390927", "0.53885615", "0.5387816", "0.5383317", "0.53770155", "0.5356112", "0.53549486", "0.5351929", "0.5340034", "0.5338546", "0.53364456", "0.5334397" ]
0.7365537
0
Sortierung nach dem zweiten Wert des Array (Index: 1)
function compare($wert_a, $wert_b) { $a = $wert_a[0]; $b = $wert_b[0]; if ($a == $b) { return 0; } return ($a > $b) ? -1 : +1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sort();", "public function asort() {}", "protected function sortDataArray() {}", "function sort_by_key($array, $index) {\n\t$sort = array();\n\n\t//préparation d'un nouveau tableau basé sur la clé à trier\n\tforeach ($array as $key => $val) {\n\t\t$sort[$key] = $val[$index];\n\t}\n\n\t//tri par ordre naturel et insensible à la casse\n\tnatcasesort($sort);\n\n\t//formation du nouveau tableau trié selon la clé\n\t$output = array();\n\tforeach($sort as $key => $val) {\n\t\t$output[] = $array[$key];\n\t}\nreturn $output;\n}", "public function mySort(array $array);", "protected function _sortByArray($array) {}", "function aasort(&$array, $key){ // Seu array e o campo a ser ordenado\r\n\t$sorter = array();\r\n\t$ret = array();\r\n\treset($array);\r\n\tforeach($array as $ii => $va){\r\n\t\t$sorter[$ii] = $va[$key];\r\n\t}\r\n\tasort($sorter);\r\n\tforeach($sorter as $ii => $va){\r\n\t\t$ret[$ii] = $array[$ii];\r\n\t}\r\n\treturn ($ret);\r\n}", "function sort(/*. array[int] .*/ $a, $sort_flags = SORT_REGULAR){}", "public final function manualSort(){\r\n\t\t$itemid=$this->itemid;\r\n\t\t$position=$this->sortarray;\r\n\t\t$newarray=array();\r\n\t\t$max=-1;\r\n\t\tforeach($this->sorteddata as $pmid){\r\n\t\t\t$i=$itemid[$pmid];\r\n\t\t\tif (!isset($position[$i])) continue;\r\n\t\t\t$newarray[$position[$i]]=$pmid;\r\n\t\t\tif ($max<$position[$i]) $max=$position[$i];\r\n\t\t}\r\n\t\tforeach($this->sorteddata as $pmid){\r\n\t\t\t$i=$itemid[$pmid];\r\n\t\t\tif (!isset($position[$i])) $newarray[++$max]=$pmid;\r\n\t\t}\r\n\t\t$this->sorteddata=$newarray;\r\n\t}", "public function asort()\n {\n }", "public function sort(array $array)\n {\n sort($array);\n $count = 0;\n foreach ($array as $key => $valor)\n {\n $arrayOrderecha[$key] = $valor;\n $count ++;\n }\n //retorno del resultado a la vista\n return $arrayOrderecha;\n }", "public function natsort()\n {\n }", "function sort_array($array, $key)\n {\n foreach ($array as $temp_list) {\n $sort_aux[] = ($temp_list[$key]);\n }\n array_multisort($sort_aux, SORT_ASC, $array);\n\n return $array;\n }", "function sort($array,$by,$type='asc') {\n\t\t$sortField=&$by;\n\t\t$multArray=&$array;\n\t\t\n\t\t$tmpKey='';\n\t\t$ResArray=array();\n\t\t$maIndex=array_keys($multArray);\n\t\t$maSize=count($multArray)-1;\n\t\tfor($i=0; $i < $maSize ; $i++) {\n\t\t\t$minElement=$i;\n\t\t\t$tempMin=$multArray[$maIndex[$i]][$sortField];\n\t\t\t$tmpKey=$maIndex[$i];\n\t\t\tfor ($j=$i+1; $j <= $maSize; $j++) {\n\t\t\t\tif ($multArray[$maIndex[$j]][$sortField] < $tempMin ) {\n\t\t\t\t\t$minElement=$j;\n\t\t\t\t\t$tmpKey=$maIndex[$j];\n\t\t\t\t\t$tempMin=$multArray[$maIndex[$j]][$sortField];\n\t\t \t}\n\t\t\t}\n\t\t\t$maIndex[$minElement]=$maIndex[$i];\n\t\t\t$maIndex[$i]=$tmpKey;\n\t\t}\n\t\tif ($type=='asc') {\n\t\t\tfor ($j=0;$j<=$maSize;$j++) {\n\t\t\t\t$ResArray[$maIndex[$j]]=$multArray[$maIndex[$j]];\n\t\t\t}\n\t\t} else {\n\t\t\tfor ($j=$maSize;$j>=0;$j--) {\n\t\t\t\t$ResArray[$maIndex[$j]]=$multArray[$maIndex[$j]];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ResArray;\n\t}", "function krsort(array &$array, $sort_flags = null)\n {\n }", "public function sort_array_by_col($array)\n {\n function compare($wert_a, $wert_b)\n {\n // Sortierung nach dem zweiten Wert des Array (Index: 1)\n $a = $wert_a[0];\n $b = $wert_b[0];\n if ($a == $b) {\n return 0;\n }\n return ($a > $b) ? -1 : +1;\n }\n usort($array, 'compare');\n return $array;\n }", "function usort(/*. array[int] .*/ $a, /*. mixed .*/ $cmp_func)\n{}", "abstract public function prepareSort();", "function sortArrayWithSelection( &$arr ) {\r\n\t$i = 0;\r\n\t$size = count( $arr );\r\n\r\n\twhile ( $i < $size - 1 ) {\r\n\t\t$j = $i;\r\n\t\tfor ( $k = $j + 1; $k < $size; $k++ ) {\r\n\t\t\tif ( $arr[ $k ] < $arr[ $j ] ) {\r\n\t\t\t\t$j = $k;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( $arr[ $i ] > $arr[ $j ] ) {\r\n\t\t\tswapArrayByValues( $arr, $i, $j );\r\n\t\t}\r\n\t\t$i++;\r\n\t}\r\n}", "function asort(array &$array, $sort_flags = null)\n {\n }", "function sortMatrix(&$asMatrix){\r\n for ($i = 0; $i < count($asMatrix); $i++) {\r\n for ($j = $i + 1; $j < count($asMatrix); $j++) {\r\n if ($asMatrix[$i]['Magnitude'] < $asMatrix[$j]['Magnitude']) {\r\n $temp = $asMatrix[$i];\r\n $asMatrix[$i] = $asMatrix[$j];\r\n $asMatrix[$j] = $temp;\r\n }\r\n }\r\n }\r\n }", "function sortiere_nach_punkten(&$ranking) {\n\n\t$last_punkte = 0;\n\t$gewinn_rang = 1;\n\t$last_gewinn_rang = $gewinn_rang;\n\tforeach (array_keys($ranking) as $key)\n\t{\n\t\t$punkte = $ranking[$key][\"punkte\"];\t\t\n\t\tif ($punkte == $last_punkte) {\n\t\t\t$ranking[$key][\"rang\"] = $last_gewinn_rang;\n\t\t} else {\n \t\t$gewinn_rang = $key+1;\n \t\t$ranking[$key][\"rang\"] = $gewinn_rang;\n\t\t}\n\t\t\n\t\t$last_punkte = $punkte;\n\t\t$last_gewinn_rang = $gewinn_rang;\n }\n\n\tif (debug()) {\n\t\tprint \"<br>\";\n\t foreach(array_keys($ranking) as $key) {\n\t\t\tprint \"spieler = \". $ranking[$key][\"user\"]. \"<br>\";\n\t\t\tprint \"rang = \". $ranking[$key][\"rang\"]. \"<br>\";\n\t\t\tprint \"punkte = \". $ranking[$key][\"punkte\"]. \"<br>\";\t\t\t\n\t\t}\n\t\tprint \"<br>\";\n\t}\n}", "public function sortStrategy();", "function array_multisort_2d($array,$column,$sortorder='',$base=1){\n\tglobal $array_multisort_2d;\n\tif(!$array)return $array;\n\n\tforeach($array as $n=>$v){\n\t\t//develop link based on column\n\t\t$ref[]=strtolower($v[$column]);\n\t\t$refb[]=$n;\n\t}\n\t//need to develop to arsort if called\n\tasort($ref);\n\t$base=$base-1;\n\tforeach($ref as $n=>$v){\n\t\t$base++;\n\t\t$buffer[$base]=$array[$refb[$n]];\n\t}\n\treturn $buffer;\n}", "function sortByIndex($a, $b) {\n\t\t return $a->zindex - $b->zindex;\n\t\t}", "function w2l_sksort(&$array, $subkey=\"id\", $sort_ascending=false) {\n\n\tif( !is_array( $array ) )\n\t\treturn $array;\n\t\t\n\t$temp_array = array();\n\n if (count($array))\n $temp_array[key($array)] = array_shift($array);\n\n foreach($array as $key => $val){\n $offset = 0;\n $found = false;\n foreach($temp_array as $tmp_key => $tmp_val)\n {\n if(!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey])) {\n $temp_array = array_merge( (array)array_slice($temp_array,0,$offset),\n array($key => $val),\n array_slice($temp_array,$offset)\n );\n $found = true;\n }\n $offset++;\n }\n if(!$found) $temp_array = array_merge($temp_array, array($key => $val));\n }\n\n if ($sort_ascending) $array = array_reverse($temp_array);\n\n else $array = $temp_array;\n}", "private function sort(): void\n {\n if (!$this->dirtyIndex) {\n return;\n }\n\n $newIndex = [];\n $index = 0;\n\n foreach ($this->pages as $hash => $page) {\n $order = $page->getOrder();\n\n if (null === $order) {\n $newIndex[$hash] = $index;\n ++$index;\n } else {\n $newIndex[$hash] = $order;\n }\n }\n\n asort($newIndex);\n\n $this->index = $newIndex;\n $this->dirtyIndex = false;\n }", "public function getSorting();", "public function sortArrayByDate($array) {\n //so they can be displayed in the correct order regardless of when they were entered\n for($i = 1; $i < count($array); $i++) {\n //Storing current entry\n $entry = $array[$i];\n \n //Storing date of current entry\n $date = $array[$i]->{'Datum'};\n \n //Storing $i in separate variable $j for manipulation\n $j = $i;\n \n //As long as $j is greater than zero (index of the first entry) and the date of the entry in the previous iteration\n //is less than that of the current entry\n while($j > 0 && $array[$j - 1]->{'Datum'} < $date) {\n \n //The entry at the index of the current iteration is assigned the value of the previous iteration\n $array[$j] = $array[$j - 1];\n \n //$j is decremented in order to move \"left\" in the array\n $j -= 1;\n }\n \n //When there are no longer any entries with earlier dates,\n //place the stored entry at the position we are currently in\n $array[$j] = $entry;\n }\n \n return $array;\n \n }", "public function getSortIndex();", "function rsort(/*. array[int] .*/ $a, $sort_flags = SORT_REGULAR){}", "static function sortasc_old($data, $fieldname)\n {\n $len1 = count($data);\n $len2 = $len1;\n for ($i = 0; $i < $len1; $i++)\n {\n for ($j = $i+1; $j < $len2-1; $j++)\n {\n if ($data[$i][$fieldname] > $data[$j][$fieldname])\n {\n $tmp = $data[$i];\n $data[$i] = $data[$j];\n $data[$j] = $tmp;\n }\n }\n }\n \n return $data;\n }", "function sksort(&$array, $subkey, $sort_ascending = false)\n {\n if (count($array))\n {\n $temp_array[key($array)] = array_shift($array);\n }\n\n foreach($array as $key => $val)\n {\n $offset = 0;\n $found = false;\n\n foreach($temp_array as $tmp_key => $tmp_val)\n {\n if(!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey]))\n {\n $temp_array = array_merge( (array)array_slice($temp_array,0,$offset),\n array($key => $val),\n array_slice($temp_array,$offset)\n );\n $found = true;\n }\n $offset++;\n }\n\n if(!$found)\n {\n $temp_array = array_merge($temp_array, array($key => $val));\n }\n }\n\n if ($sort_ascending)\n {\n $array = array_reverse($temp_array);\n }\n else\n {\n $array = $temp_array;\n }\n }", "function sortArray( $data, $field ) {\r\n\t$field = (array) $field;\r\n\tuasort( $data, function($a, $b) use($field) {\r\n\t\t$retval = 0;\r\n\t\tforeach( $field as $fieldname ) {\r\n\t\t\tif( $retval == 0 ) $retval = strnatcmp( $a[$fieldname], $b[$fieldname] );\r\n\t\t}\r\n\t\treturn $retval;\r\n\t} );\r\n\treturn $data;\r\n}", "function mysort(&$array){\n foreach($array as $k=>$v) $temp[$k] = preg_replace('/[a-zA-Z]/','',$k);\n asort($temp, SORT_NUMERIC);\n foreach(array_keys($temp) as $k) $temp[$k] = $array[$k];\n $array = $temp;\n }", "function ksort(array &$array, $sort_flags = null)\n {\n }", "function sort_by_sub_element($array,$element){\n\tforeach($array as $id => $sub_array){\n\t\tif(is_object($sub_array)) $sub_array = get_object_vars($sub_array);\n\t\t$sorting_array[$id]=$sub_array[$element];\n\t}\n\tasort($sorting_array);\n\t$sorting_array = array_reverse($sorting_array, true);\n\t\n\tforeach ($sorting_array as $id=>$next_post){\n\t\t$sorted_posts[] = $array[$id];\n\t}\n\t\n\t$sorted_posts = array_reverse($sorted_posts);\n\treturn $sorted_posts;\n\t\n}", "function getSort(){\n\treturn 281;\n}", "public function insertSort(&$array,$filename,$type=-1)\n {\n for($i=1;$i<count($array);$i++)\n {\n $temp=$array[$i];\n $j=$i;\n if($type==1)\n {\n while($j>0 && strtolower($array[$j-1][$filename])> strtolower($temp[$filename]))\n {\n $array[$j]=$array[$j-1];\n $j--;\n }\n }\n else if($type==-1)\n {\n while($j>0 && strtolower($array[$j-1][$filename])< strtolower($temp[$filename]))\n {\n $array[$j]=$array[$j-1];\n $j--;\n }\n }\n $array[$j]=$temp;\n }\n\n return $array;\n }", "function array_sort($array, $sortby) {\n\n $size = sizeof($array);\n\n for($i=0;$i<$size;$i++) {\n for($j=$i+1;$j<$size;$j++) {\n $temp = array();\n if($array[$i]['priority']<$array[$j]['priority']) {\n $temp = $array[$i];\n $array[$i] = $array[$j];\n $array[$j] = $temp;\n }\n }\n }\n return $array;\n}", "public function ksort()\n {\n }", "function sortmulti ($array, $index, $order, $natsort=FALSE, $case_sensitive=FALSE) {\n \n if(is_array($array) && count($array)>0) {\n foreach(array_keys($array) as $key)\n $temp[$key]=$array[$key][$index];\n if(!$natsort) {\n if ($order=='asc')\n asort($temp);\n else \n arsort($temp);\n }\n else\n {\n if ($case_sensitive===true)\n natsort($temp);\n else\n natcasesort($temp);\n if($order!='asc')\n $temp=array_reverse($temp,TRUE);\n }\n foreach(array_keys($temp) as $key)\n if (is_numeric($key))\n $sorted[]=$array[$key];\n else \n $sorted[$key]=$array[$key];\n return $sorted;\n }\n \n //echo \"END FUNCTION sortmulti(array,index,order,natsort,case_sensitive) Workspaces_model.php<br />\";\n \n return $sorted;\n }", "public function getElementSortOrder();", "function array_sort($array, $on, $order=SORT_ASC){\n $new_array = array();\n $sortable_array = array();\n if (count($array) > 0) {\n foreach ($array as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $k2 => $v2) {\n if ($k2 == $on) {\n $sortable_array[$k] = $v2;\n }\n }\n } else {\n $sortable_array[$k] = $v;\n }\n }\n switch ($order) {\n case SORT_ASC:\n asort($sortable_array);\n break;\n case SORT_DESC:\n arsort($sortable_array);\n break;\n }\n foreach ($sortable_array as $k => $v) {\n $new_array[] = $array[$k];\n }\n }\n return $new_array;\n}", "function wp_recursive_ksort(&$input_array)\n {\n }", "function insertionSort(array &$arr)\n{\n\t$r = count($arr); // number of rows since its a 2d array [ [], [], [] ]\n\t$c = count($arr[0]); //number of columns\n\tfor ($i = 0; $i < $r * $c - 1; ++$i) {\n\t\tfor ($j = 0; $j < $r * $c - 1 - $i; ++$j) {\n\n\t\t\t// $j / $c gets each row: 0,0,0,1,1,1... and $j % $c gets each column: 0,1,2,0,1,2...\n\t\t\t//basically if $arr[0][1]>$arr[0][2] and so on\n\t\t\tif ($arr[$j / $c][$j % $c] > $arr[($j + 1) / $c][($j + 1) % $c]) {\n\n\t\t\t\t//swap the values\n\t\t\t\t$temp = $arr[($j + 1) / $c][($j + 1) % $c];\n\t\t\t\t$arr[($j + 1) / $c][($j + 1) % $c] = $arr[$j / $c][$j % $c];\n\t\t\t\t$arr[$j / $c][$j % $c] = $temp;\n\t\t\t}\n\t\t}\n\t}\n}", "function sortTagArray($data, $direction) {\n\t\tif (($direction != \"asc\") && ($direction != \"desc\")) return $data;\n\n\t\tusort($data, array($this, \"compareTagsByCount\"));\n\n\t\tswitch ($direction) {\n\t\t\tcase \"asc\"\t: return $data; break;\n\t\t\tcase \"desc\"\t: return array_reverse($data); break;\n\t\t}\n\t}", "public function jarjesta() {\n usort($this->ravinnon_saannit, \"self::vertaaPvm\");\n }", "public static function natsortField ($array, $fieldname)\r\n\t{\r\n\t\t# Create a function which creates an array of the two values, then compares the original array with a natsorted copy\r\n\t\t$functionCode = '\r\n\t\t\t$original = array ($a[\\'' . $fieldname . '\\'], $b[\\'' . $fieldname . '\\']);\r\n\t\t\t$copy = $original;\r\n\t\t\tnatsort ($copy);\r\n\t\t\treturn ($copy === $original ? -1 : 1);\r\n\t\t';\r\n\t\t\r\n\t\t# Do the comparison\r\n\t\t$natsortFieldFunction = create_function ('$a,$b', $functionCode);\r\n\t\tuasort ($array, $natsortFieldFunction);\r\n\t\t\r\n\t\t# Return the sorted list\r\n\t\treturn $array;\r\n\t}", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "function rearrangePro_orderby(){\n\t\t$args = func_get_args();\n\t\t$data = array_shift($args);\n\t\tforeach ($args as $n => $field) {\n\t\t\tif (is_string($field)) {\n\t\t\t\t$tmp = array();\n\t\t\t\tforeach ($data as $key => $row)\n\t\t\t\t\t$tmp[$key] = $row[$field];\n\t\t\t\t$args[$n] = $tmp;\n\t\t\t}\n\t\t}\n\t\t$args[] = &$data;\n\t\tcall_user_func_array('array_multisort', $args);\n\t\treturn array_pop($args);\n\t}", "function sortObjectArray($toSort, $sortDef, $secound = false){\n\n\t// jede Sortierdefinition durchlaufen (wird durch den return am Ende nur ein Mal durchlaufen!!! Muss so!!!):\n\tforeach($sortDef as $field => $sort){\n\n\t\t// Array zum Sortieren erstellen:\n\t\t$sortArray = array();\n\t\tforeach($toSort as $key => $element){\n\n\t\t\t$sortArray[$key] = $element->$field;\n\t\t}\n\t\t// sortArray sortieren\n\t\t$countSortArray=count($sortArray);\n\t\tfor ($i=0;$i<$countSortArray;$i++)\n\t\t\t{\n\t\t\t\t$sortArray[$i]=strtolower($sortArray[$i]);\n\t\t\t};\n\n\t\tuasort($sortArray, $sort);\n\n\t\t// $toSort sortieren:\n\t\t$newToSort = array();\n\t\tforeach($sortArray as $key => $element){\n\t\t\t$newToSort[$key] = $toSort[$key];\n\t\t}\n\t\t$toSort = $newToSort;\n\n\t\t// Gleiche finden und sortieren:\n\n\t\t// uniqe Liste erstellen:\n\t\t$unique = array_unique($sortArray);\n\n\t\t// Neues toSort erstellen:\n\t\t$newToSort = array();\n\n\t\t// für jedes Element in Unique die Richtigen Elemente suchen und nach den weiteren Kriterien sortieren:\n\t\t// Wenn es unique Werte gibt:\n\t\tif(count($unique)<count($sortArray)){\n\n\t\t\tforeach($unique as $sortelement){\n\n\t\t\t\t// Hole nur die die dem jetzigen unique Element entprechen.\n\t\t\t\t$oneValue = array_keys($sortArray, $sortelement);\n\n\t\t\t\t// Neues Array mit den Werten des nur jetzt gesuchten erstellen:\n\t\t\t\t$partialToSort = array();\n\t\t\t\tforeach($oneValue as $element){\n\t\t\t\t\t$partialToSort[$element] = $toSort[$element];\n\t\t\t\t}\n\n\t\t\t\t// Wenn man Werte darin sortieren muss\n\t\t\t\tif(count($oneValue) > 1){\n\n\t\t\t\t\t// Neues definitionsarray erzeugen:\n\t\t\t\t\t$newSortDef = array();\n\t\t\t\t\tforeach($sortDef as $key => $value){\n\t\t\t\t\t\tif($key != $field){\n\t\t\t\t\t\t\t$newSortDef[$key] = $sortDef[$key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Wenn es eine weitere Sortdefinition gibt.\n\t\t\t\t\tif(!empty($newSortDef)){\n\n\t\t\t\t\t\t// Rekursiver Aufruf mit dem neuen Array und der neuen Suchdefinition.\n\t\t\t\t\t\t$partialToSort = sortObj($partialToSort, $newSortDef, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Arrays zusammenführen.\n\t\t\t\t$newToSort = array_merge($newToSort, $partialToSort);\n\t\t\t}\n\t\t\t$toSort = $newToSort;\n\n\t\t}\n\n\t\treturn $toSort;\n\t}\n}", "function array_sort_by(&$array_initial, $col, $order = SORT_ASC){\n\n $arrAux = array();\n\n foreach ($array_initial as $key=> $row){\n $arrAux[$key] = is_object($row) ? $arrAux[$key] = $row->$col : $row[$col];\n $arrAux[$key] = strtolower($arrAux[$key]);\n }\n\n array_multisort($arrAux, $order, $array_initial);\n }", "function cksort(&$array)\n{\n return uksort($array, \"cmp\");\n}", "function sort_array_of_arrays( $array, $sort_by_key ) {\n\n usort( $array, function ( $item1, $item2 ) use ( $sort_by_key ) {\n\n if ($item1[ $sort_by_key ] == $item2[ $sort_by_key ]) return 0;\n return $item1[ $sort_by_key ] < $item2[ $sort_by_key ] ? -1 : 1;\n\n });\n\n return $array;\n\n}", "public function quicksort($array, $izquierda, $derecha )\n {\n $i = $izquierda;\n $j = $derecha;\n $x = $array[ ($izquierda + $derecha) /2 ];\n do{\n while( ($array[$i] < $x) && ($j <= $derecha) )\n {\n $i++;\n }\n\n while( ($x < $array[$j]) && ($j > $izquierda) )\n {\n $j--;\n }\n\n if( $i <= $j )\n {\n $aux = $array[$i]; $array[$i] = $array[$j]; $array[$j] = $aux;\n $i++; $j--;\n }\n\n }while( $i <= $j );\n\n if( $izquierda < $j )\n $this->quicksort( $array, $izquierda, $j );\n if( $i < $derecha )\n $this->quicksort( $array, $i, $derecha );\n //retorno del resultado a la vista\n return $array;\n\n }", "function arsort(array &$array, $sort_flags = null)\n {\n }", "function Ascending(Array $array, $field) {\n if (is_numeric($array[0][$field])) {\n usort($array, array(new MultiArraySorting($field), 'numberSort'));\n } else {\n usort($array, array(new MultiArraySorting($field), 'textSort'));\n }\n return $array;\n }", "function bubblesort_once($a) {\n for($i = 0; $i < count($a) - 1; $i++) {\n $temp = $a[$i];\n if ($a[$i] > $a[$i + 1]) {\n $a[$i]= $a[$i + 1];\n $a[$i + 1] = $temp;\n }\n }\n return $a;\n}", "function pancakeSort(&$arr, $n) \n{ \n\t// Start from the complete \n\t// array and one by one \n\t// reduce current size \n\t// by one \n\tfor ($curr_size = $n; $curr_size > 1; --$curr_size) \n\t{ \n\t\t// Find index of the \n\t\t// maximum element in \n\t\t// arr[0..curr_size-1] \n\t\t$mi = findMax($arr, $curr_size); \n\n\t\t// Move the maximum \n\t\t// element to end of \n\t\t// current array if \n\t\t// it's not already \n\t\t// at the end \n\t\tif ($mi != $curr_size-1) \n\t\t{ \n\t\t\t// To move at the end, \n\t\t\t// first move maximum \n\t\t\t// number to beginning \n\t\t\tflip($arr, $mi); \n\n\t\t\t// Now move the maximum \n\t\t\t// number to end by \n\t\t\t// reversing current array \n\t\t\tflip($arr, $curr_size-1); \n\t\t} \n\t} \n}", "function array_sort($array, $on, $order=SORT_ASC)\n{\n $new_array = array();\n $sortable_array = array();\n\n if (count($array) > 0) {\n foreach ($array as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $k2 => $v2) {\n if ($k2 == $on) {\n $sortable_array[$k] = $v2;\n }\n }\n } else {\n $sortable_array[$k] = $v;\n }\n }\n\n switch ($order) {\n case SORT_ASC:\n asort($sortable_array);\n break;\n case SORT_DESC:\n arsort($sortable_array);\n break;\n }\n\n foreach ($sortable_array as $k => $v) {\n $new_array[$k] = $array[$k];\n }\n }\n\n return $new_array;\n}", "function array_sort_recursive($array)\n {\n return Arr::sortRecursive($array);\n }", "private function sortFiles(&$array){\n if(isset($array['files'])) sort($array['files']);\n if(isset($array['images'])) sort($array['images']);\n }", "function sortRetailers($retailersArray)\n{\n $keyRevenue = \"Revenue\";\n $keyType = \"Type\";\n\n //create a temp array to hold it\n foreach($retailersArray as $k =>$v){\n $RevenueTemp[] = strtolower($v[$keyRevenue]);\n }\n //sorted from high to low\n arsort($RevenueTemp);\n\n //create a new array to hold sorted temp\n foreach($RevenueTemp as $k=>$v) {\n $RevenueSorted[] = $retailersArray[$k];\n }\n\n\n $TempArrayLength = count($RevenueSorted);\n\n $ResellerSortTemp = [];\n for($i = 0; $i < $TempArrayLength; $i++) {\n if($RevenueSorted[$i][$keyRevenue] >= 100000.00 && $RevenueSorted[$i][$keyType] == 'RESELLER') {\n $ResellerSortTemp[$i] = $RevenueSorted[$i];\n continue;\n }\n }\n\n var_dump($ResellerSortTemp);\n\n\n}", "function getSort(){\n return 188;\n }", "public function sortPredvidjanjeNajteze() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najteza_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "function insertion_Sort($arr_input)\n{\n\tfor($i=0;$i<count($arr_input);$i++){\n\t\t$tmp = $arr_input[$i];\n\t\t$j = $i-1;\n\t\twhile($j>=0 && $arr_input[$j] > $tmp){\n\t\t\t$arr_input[$j+1] = $arr_input[$j];\n\t\t\t$j--;\n\t\t}\n\t\t$arr_input[$j+1] = $tmp;\n\t}\nreturn $arr_input;\n}", "function fn_sort_md_array_by_value(&$array, $key)\n{\n\t//ref. http://stackoverflow.com/questions/2699086/sort-multi-dimensional-array-by-value\n $sorter=array();\n $ret=array();\n reset($array);\n foreach ($array as $ii => $va) {\n $sorter[$ii]=$va[$key];\n }\n asort($sorter);\n foreach ($sorter as $ii => $va) {\n $ret[$ii]=$array[$ii];\n }\n $array=$ret;\n}", "function bubblSort_String()\n {\n echo \"Total elements of array.\\n\";\n $sizeOfarray = AlgorithmsUtility::get_Integer();\n $arr = array();\n echo \"elements of array: \\n\";\n for ($i = 0; $i < $sizeOfarray; $i++) {\n $arr[$i] = AlgorithmsUtility::get_String();\n }\n\n\n for ($i = 0; $i < $sizeOfarray; $i++) {\n for ($j = 0; $j < $sizeOfarray - 1 - $i; $j++) {\n // swapping logic\n if (strcmp($arr[$j], $arr[$j + 1]) > 0) {\n $t = $arr[$j];\n $arr[$j] = $arr[$j + 1];\n $arr[$j + 1] = $t;\n }\n }\n }\n for ($i = 1; $i < $sizeOfarray; $i++) {\n echo $arr[$i] . \" \";\n }\n echo \"\\n\";\n }", "function insertionSort(&$arr,$start,$end){\n\n \tfor($k=$start;$k<$end;$k++){\n \t\t$pos = $k;\n \t\t//echo $pos.\" \";\n \t\t$min = str_replace(['/D'], '', filter_var($arr[$k]->sd, FILTER_SANITIZE_NUMBER_INT));\n \t\t//echo filter_var($arr[$k]->sd, FILTER_VALIDATE_INT).\"<br>\";\n \t\tfor($l=$k+1;$l<=$end;$l++){\n \t\t\tif($min > str_replace(['/D'], '', filter_var($arr[$l]->sd, FILTER_SANITIZE_NUMBER_INT))){\n \t\t\t\t$pos = $l;\n \t\t\t}\n \t\t}\n \t\t//swapping the positions\n \t\t$tmp = $arr[$k];\n \t\t$arr[$k] = $arr[$pos];\n \t\t$arr[$pos] = $tmp;\n \t}\n\n }", "public function sortArraysByKeyCheckIfSortingIsCorrectDataProvider() {}", "function awesomeSort($a, $b)\n{\n return $a['amount'] <=> $b['amount'];\n}", "public function sortDirection();", "public function Sort(){\r\n\t\treturn self::get_sort();\r\n\t}", "function bubbleSort($items)\n{\n $size = count($items);\n for ( $i = 0; $i < $size; $i++ ) {\n for ( $j = 0; $j < $size - 1 - $i; $j++ ) {\n if ( $items[$j + 1] < $items[$j] ) {\n arraySwap($items, $j, $j + 1);\n }\n }\n }\n\n return $items;\n}", "function sortarray($outarray,$seed) {\n\n\t\t$sorted_array = array();\n\t\t$cpt = 0;\n\n\t\tdo{\n\n\t\t\t$value = false;\n\t\t\t\n\t\t\t$swap = -1;\n\t\t\t$swap_index = -1;\n\t\t\t\n\t\t\tfor($j=0;$j<sizeof($seed);$j++){\n\n\t\t\t\tif($swap<(int)$seed[$j]){\n\t\t\t\t\t$swap=(int)$seed[$j];\n\t\t\t\t\t$swap_index=$j;\n\n\t\t\t\t\t$value = true;\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t\tif($value){\n\t\t\t\t$sorted_array[] = $outarray[$swap_index];\n\t\t\t\tarray_splice($seed, $swap_index, 1, -2);\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t} while($value);\n\n\t\treturn $sorted_array;\n\n\t}", "Private function array_sort_by_columnR(&$arr, $col, $dir = SORT_DESC) {\n $sort_col = array();\n foreach ($arr as $key=>$row) {\n $sort_col[$key] = $row[$col];\n }\narray_multisort($sort_col, $dir, $arr);\nreturn $arr;\n}", "function array_numbersort($a, $b) {\n\tglobal $sort_by;\n\tif ($a[$sort_by] == $b[$sort_by]) {\n\t\treturn 0;\n\t}\n\treturn ($a[$sort_by] < $b[$sort_by]) ? -1 : 1;\n}", "function sortAnimal(){\r\n global $animals;\r\n for($x=0;$x<=count($animals);$x++){\r\n sort($animals);\r\n echo $animals[$x];\r\n echo \" \";\r\n }\r\n }", "public function sort()\n {\n foreach (array_keys($this->betTypes) as $type) {\n ksort($this->betTypes[$type]);\n }\n }", "public function sort(array $nodes);", "function bubblSort_Integer()\n {\n echo \"Total elements of array.\\n\";\n $sizeOfarray = AlgorithmsUtility::get_Integer();\n $arr = array();\n echo \"elements of array: \\n\";\n for ($i = 0; $i < $sizeOfarray; $i++) {\n $arr[$i] = AlgorithmsUtility::get_Integer();\n }\n\n\n for ($i = 0; $i < $sizeOfarray; $i++) {\n for ($j = 0; $j < $sizeOfarray - 1 - $i; $j++) {\n // swapping logic\n if ($arr[$j] > $arr[$j + 1]) {\n $t = $arr[$j];\n $arr[$j] = $arr[$j + 1];\n $arr[$j + 1] = $t;\n }\n }\n }\n for ($i = 1; $i < $sizeOfarray; $i++) {\n echo $arr[$i] . \" \";\n }\n echo \"\\n\";\n }", "function getSort() {\n return 999;\n }", "function antwort($data, $i = 0)\n{\n $sorted = true;\n foreach ($data as $key => $value) {\n if (key_exists($key + 1, $data) && $value > $data[$key + 1]) {\n array_push($data, $value);\n unset($data[$key]);\n $sorted = false;\n }\n }\n if (!$sorted) $data = antwort(array_values($data), ++$i);\n else $data['times'] = 'sorting took ' . $i . ' times';\n return $data;\n}", "function sortTransits() {\n $sortedtransits = array();\n for( $aspect = 0; $aspect < count($this->m_transit); $aspect++ ) {\n $sortedtransits[substr($this->m_transit[$aspect],17,11)] = $this->m_transit[$aspect];\n }\n ksort($sortedtransits);\n\n unset($this->m_transit);\n $this->m_transit = array();\n reset($sortedtransits);\n while( list($key,$value) = each($sortedtransits) ) {\n array_push(\n $this->m_transit,\n $value\n );\n }\n }", "public function sortPredvidjanjeNovo() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_najnovija_predvidjanja(); \n $data['predvidjanja']=$predvidjanja;\n $this->prikaz('pregled_predvidjanja', $data); \n }", "public static function sort(array &$arr)\n {\n uasort($arr, '\\undpaul\\MarioKartBundle\\Entity\\RankingRow::sortCallback');\n }", "function cmpByOrderIndexAsc($a, $b)\n{\n if ($a['order_index'] == $b['order_index']) {\n return 0;\n }\n return($a['order_index'] < $b['order_index']) ? -1 : 1;\n}", "function _ting_ranking_field_sort($a, $b) {\n if ($a['weight'] == $b['weight']) {\n return 0;\n }\n return ($a['weight'] > $b['weight']) ? -1 : 1;\n}", "public function sort() {\n sort($this->items, SORT_STRING);\n }", "public static function knatsort ($array)\r\n\t{\r\n\t\t$keys = array_keys ($array);\r\n\t\tnatsort ($keys);\r\n\t\t$items = array ();\r\n\t\tforeach ($keys as $key) {\r\n\t\t\t$items[$key] = $array[$key];\r\n\t\t}\r\n\t\t\r\n\t\t# Return the sorted list\r\n\t\treturn $items;\r\n\t}", "function sort_link_array($links){\n if (!is_array($links)) return false;\n \n $fertig=Array(); //if all positions are set, the following loop will not create an array\n //and array_splice will cry. So let's assure, we have an array...\n for ($x = 0; $x < count($links); $x++){\n if ( ($links[$x]['position'] === \"\") or (!isset($links[$x]['position'])) ){\n $fertig[] = $links[$x];\n }\n }\n \n for ($x = 0; $x < count($links); $x++){\n if (($links[$x]['position'] !== \"\") and (isset($links[$x]['position'])) ){\n array_splice($fertig, $links[$x]['position'], 0 , array($links[$x]));\n } \n }\n\n return $fertig;\n }", "function findUniqueandSort(array $ar){\r\n $a=array_unique($ar);\r\n sort($a);\r\n return $a;\r\n\r\n}", "function sortCrossings() {\n $sortedtransits = array();\n for( $aspect = 0; $aspect < count($this->m_crossing); $aspect++ ) {\n $sortedtransits[substr($this->m_crossing[$aspect],17,11)] = $this->m_crossing[$aspect];\n }\n krsort($sortedtransits);\n //print_r($sortedtransits);\n\n unset($this->m_crossing);\n $this->m_crossing = array();\n for( $aspect = 0; $aspect < count($sortedtransits); $aspect++ ) {\n array_push(\n $this->m_crossing,\n array_pop( $sortedtransits )\n );\n }\n //print_r($this->m_crossing);\n }", "function sorter_by_value($a, $b) {\n return strcmp($a[0], $b[0]);\n}", "function merge_sort($my_array){\n if(count($my_array) == 1 ) return $my_array;\n $mid = count($my_array) / 2;\n $left = array_slice($my_array, 0, $mid);\n $right = array_slice($my_array, $mid);\n $left = merge_sort($left);\n $right = merge_sort($right);\n return merge($left, $right);\n}", "static function sort(array $array, $method = SORT_REGULAR) {\n if (is_int($method)) {\n asort($array, $method);\n } else {\n uasort($array, $method);\n }\n\n return $array;\n }", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\n }" ]
[ "0.7296617", "0.71777034", "0.71505", "0.7051256", "0.6997794", "0.6958981", "0.67584896", "0.67192096", "0.67080516", "0.6667463", "0.65166634", "0.645461", "0.63962877", "0.63150764", "0.63042843", "0.6239385", "0.6212047", "0.6180241", "0.61685944", "0.6167361", "0.61087245", "0.6107077", "0.61045116", "0.61007863", "0.60869855", "0.60858345", "0.6079767", "0.60587394", "0.60408854", "0.603826", "0.603157", "0.6030826", "0.6021951", "0.5977834", "0.5967628", "0.5961468", "0.59536886", "0.59337044", "0.5930202", "0.5929759", "0.5922565", "0.59219474", "0.59199697", "0.5916948", "0.59068924", "0.59068096", "0.59064984", "0.5905715", "0.59040856", "0.5899308", "0.5899308", "0.5899308", "0.58946604", "0.5892764", "0.5887852", "0.5886644", "0.5883288", "0.5867755", "0.58624804", "0.58580965", "0.58530873", "0.58505505", "0.5846393", "0.58413327", "0.58369887", "0.5827243", "0.5825506", "0.58236563", "0.5823528", "0.5807443", "0.57958484", "0.5791743", "0.5790376", "0.5782264", "0.5779477", "0.5768299", "0.5765804", "0.5765242", "0.57613194", "0.5759879", "0.5757525", "0.5756339", "0.57510173", "0.5721574", "0.57211787", "0.57182485", "0.57145447", "0.57132053", "0.57115227", "0.5707775", "0.5703533", "0.56907374", "0.5689897", "0.5688321", "0.56807196", "0.5662304", "0.5661616", "0.56512403", "0.5649148", "0.5647746", "0.5647746" ]
0.0
-1
Generate table heading (HTML)
public function row_top($name) { $out = "<tr><td width=\"100%\" colspan=\"2\" bgcolor=\"#C0C0C0\">".$name."</td></tr>\n"; return $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<p class=left>Description:</p>\\n\";\n\t}", "function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }", "static function generateTableHeaderHTML($a_div)\n\t{\n\t\techo \"<tr class='inTableRow'>\\n\";\n//\t\techo \"<th class='inTableColTaskID'>Task ID</th>\\n\";\n\t\techo \"<th class='inTableColTaskName'>{$a_div}</th>\\n\";\n\t\techo \"<th>Subcontractor</th>\\n\";\n\t\techo \"<th class='chTableColAmount'>Amount</th>\\n\";\n\t\techo \"<th>Notes</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "protected function renderTableHeader(): string\n {\n if (!$this->options['showHeader']) {\n return '';\n }\n\n return\n '<thead>' .\n '<tr>' .\n '<th>' . $this->_('differences') . '</th>' .\n '</tr>' .\n '</thead>';\n }", "private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }", "public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }", "public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }", "public function getTableHeader()\n {\n $tableHead = null;\n $tableHead .= \"<thead>\";\n $tableHead .= \"<tr>\";\n $tableHead .= \"<th>Vecka</th>\";\n $tableHead .= \"<th>Måndag</th>\";\n $tableHead .= \"<th>Tisdag</th>\";\n $tableHead .= \"<th>Onsdag</th>\";\n $tableHead .= \"<th>Torsdag</th>\";\n $tableHead .= \"<th>Fredag</th>\";\n $tableHead .= \"<th>Lördag</th>\";\n $tableHead .= \"<th>Söndag</th>\";\n $tableHead .= \"</tr>\";\n $tableHead .= \"</thead>\";\n\n return $tableHead;\n }", "public function renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }", "private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th>&nbsp;</th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }", "function constructTableHead() {\n\n $header = '<tr><th>Country</th>';\n if (isset($_GET['pop'])) {\n $header .= '<th>Total Population</th>';\n }\n if (isset($_GET['birth'])) {\n $header .= '<th>Birth Rate</th>';\n }\n if (isset($_GET['death'])) {\n $header .= '<th>Death Rate</th>';\n }\n\n $header .= '</tr>';\n return $header;\n }", "function write_table_head()//scrie capul de tabel pentru perioadele de vacanta\r\n{\r\n\t$output = \"\";\r\n\tadd($output,'<table width=\"500px\" cellpadding=\"1\" cellspacing=\"1\" class=\"special\">');\r\n\tadd($output,'<tr class=\"tr_head\"><td>Nr</td><td>Data inceput</td><td>Data sfarsit</td></tr>');\r\n\t\r\n\treturn $output;\r\n}", "function showTableHeader($phaseName) {\n?>\n\t<table>\n\t\t<colgroup>\n\t\t\t<col width='4%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='15%'>\n\t\t\t<col width='5%'>\n\t\t\t<col width='23%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='23%'>\n\t\t\t<!--<col width='10%'>\n\t\t\t<col width='*'>-->\n\t\t</colgroup>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>#</th>\n\t\t\t\t<th>Datum/Zeit</th>\n\t\t\t\t<th>Ort</th>\n\t\t\t\t<?php echo ($phaseName == 'Gruppenphase') ? \"<th>Grp</th>\" : \"<th></th>\" ?>\n\t\t\t\t<th colspan='3'>Resultat</th>\n\t\t\t\t<!--<th>Tipp</th>\n\t\t\t\t<th>Pkt</th>-->\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n<?php\n}", "public static function create_table_head()\n\t{\n\t\t\n\t\tif (!static::$columns)\n\t\t{\n\t\t\treturn static::$template['wrapper_start'].'<tr><th>No columns config</th></tr>'.static::$template['wrapper_end'];\n\t\t}\n\n\t\t$table_head = static::$template['wrapper_start'];\n\t\t$table_head .= '<tr>';\n\t\t\n\t\tforeach(static::$columns as $column)\n\t\t{\n\t\t\t$sort_key \t= (is_array($column) ? isset($column[1]) ? $column[1] : strtolower($column[0]) : $column);\n\t\t\t$col_attr\t= (is_array($column) && isset($column[2]) ? $column[2] : array());\n\t\t\t\n\t\t\t$new_direction = static::$direction;\n\t\t\t\n\t\t\tif(static::$sort_by == $sort_key)\n\t\t\t{\n\t\t\t\t$active_class_name = static::$template['col_class_active'].' '.static::$template['col_class_active'].'_'.$new_direction;\n\t\t\t\tif(isset($col_attr['class']))\n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] .= ' '.$active_class_name;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] = $active_class_name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$new_direction = (static::$direction == 'asc' ? 'desc' : 'asc');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($column) && (!isset($column[1]) || isset($column[1]) && $column[1] !== false)){\n\t\t\t\t\n\t\t\t\t$url \t\t\t= rtrim(static::$base_url, '/').(static::$current_page ? '/'.static::$current_page : '');\n\t\t\t\t$url \t\t\t.= '/'.$sort_key.static::$uri_delimiter.$new_direction;\n\t\t\t\t\n\t\t\t\t$cell_content \t= rtrim(static::$template['link_start'], '> ').' href=\"'.$url.'\">';\n\t\t\t\t$cell_content \t.= $column[0];\n\t\t\t\t$cell_content \t.= static::$template['link_end'];\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif(is_array($column))\n\t\t\t\t{\n\t\t\t\t\t$column = $column[0];\n\t\t\t\t}\n\t\t\t\t$cell_content = static::$template['nolink_start'].$column.static::$template['nolink_end'];\t\n\t\t\t}\n\t\t\t\n\t\t\t$table_head .= html_tag(static::$template['col_tag'], $col_attr, $cell_content);\n\t\t\t\n\t\t}\n\t\t\n\t\t$table_head .= '</tr>';\n\t\t$table_head .= static::$template['wrapper_end'];\n\n\t\treturn $table_head;\n\t}", "function wv_commission_table_heading_list($type = \"thead\") {\n $output = \"\";\n\n //verify the header and footer of the table list\n $type = ($type == \"thead\") ? \"thead\" : \"tfoot\";\n\n $output .=\"<$type>\";\n $output .=\" <tr>\n <th>#OrderId</th>\n <th>Order Date</th>\n <th>ProductName</th>\n <th>Vendor</th>\n <th>Commission</th>\n <th>Status</th>\n <th>Commission Date</th>\n </tr>\";\n\n $output .=\"</$type>\";\n return $output;\n }", "function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}", "public static function make_table_header(Array $headings){\n\t\t$html = Xml::openElement( 'thead' );\n $html .= Xml::openElement( 'tr' );\n foreach ( $headings as $heading ) {\n $html .= Xml::element( 'th', array(), $heading );\n\t\t}\n $html .= Xml::closeElement( 'tr' );\n $html .= Xml::closeElement( 'thead' );\n\t\treturn $html;\n\t}", "public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo '&nbsp;<img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\">&nbsp;\n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}", "function showHeader(){\n\t\t$header = \"\";\n\t\t// print the header row\n\t\t$header .= \"\t<tr>\\n\";\n\t\t// loop the fields\n\t\tforeach ($this->fields as $field) {\n\t\t\t// print each field\n\t\t\t$header .= \"\t\t<th>\".$field.\"</th>\\n\";\n\t\t}\n\t\t// end the header row\n\t\t$header .= \"\t</tr>\\n\";\n\t\treturn $header;\n\t}", "private function makeTableHeader($type,$header,$colspan=2): void {\r\n\t\tif(!$this->bInitialized) {\r\n\t\t\t$header = ' (' . $header . ') ';\r\n\t\t\t$this->bInitialized = true;\r\n\t\t}\r\n\t\t$str_i = ($this->bCollapsed) ? 'style=\"font-style:italic\" ' : '';\r\n\t\t\r\n\t\techo '<table class=\"dBug_table dBug_'.$type.'\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th '.$str_i.' class=\"dBug_clickable_table dBug_' . $type . 'Header\" colspan=\"' . $colspan . '\">' . $header . '</th>\r\n\t\t\t\t</tr>';\r\n\t}", "private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }", "function wizardHeader() {\n $strOutput = '<table border=\"0\" cellpadding=\"2\" cellspacing=\"1\">';\n return $strOutput;\n }", "public function headings() {\n\t\t$vals = array_keys(get_object_vars($this));\n\t\treturn( array_reduce($vals,\n\t\t\t\tcreate_function('$a,$b','return is_null($a) ? \"$b\" : \"$a\".\"\\t\".\"$b\";')));\n\t}", "function Table_Headers($header,$w)\r\n{\r\n //Colors, line width and bold font\r\n $this->SetFillColor(153,153,153);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(128,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('Arial','B','7');\r\n\t\r\n //Header\r\n\t\r\n\t//Output table header\r\n for($i=0;$i<count($header);$i++)\r\n $this->Cell($w[$i],5,$header[$i],1,0,'C',1);\r\n $this->Ln();\r\n}", "function table_begin($p_headrow, $p_class = '', $p_tr_attr = '', $p_th_attr = array()){\n\techo '<table class=\"table ' . $p_class . '\">';\n\techo '<thead>';\n\techo '<tr ' . $p_tr_attr . '>';\n\t\n\tfor($t_i=0; $t_i<count($p_headrow); $t_i++)\n\t\techo '<th ' . (isset($p_th_attr[$t_i]) ? $p_th_attr[$t_i] : '') . '>' . $p_headrow[$t_i] . '</th>';\n\n\techo '</tr>';\n\techo '</thead>';\n}", "private function makeTDHeader($type,$header): void {\r\n\t\t$str_d = ($this->bCollapsed) ? ' style=\"display:none\"' : '';\r\n\t\techo '<tr'.$str_d.'>\r\n\t\t\t\t<td class=\"dBug_clickable_row dBug_'.$type.'Key\">' . $header . '</td>\r\n\t\t\t\t<td>';\r\n\t}", "function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}", "function BeginIncidentTable() {\n $headings = array(\"Year\", \"Section\", \"Description\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\", \"Count\");\n echo \"<table class='sortable' align='center' cellpadding='5' border=1>\";\n echo \"<tr>\";\n foreach ($headings as $heading) {\n echo \"<th>$heading</th>\";\n }\n echo \"</tr>\";\n}", "public function headings() {\n\t\t$vals = array_keys(get_object_vars($this));\n\t\treturn( array_reduce($vals, create_function('$a,$b','return is_null($a) ? \"$b\" : \"$a\".\"\\t\".\"$b\";')));\n\t}", "public function printTableHeader($open)\n {\n\n print \"<tr>\\n\";\n print \"<th>&nbsp;\";\n print \" Admin Email\";\n print \"&nbsp;</th>\";\n print \"<th>&nbsp;\";\n print \" Level\";\n print \"&nbsp;</th>\";\n if (!$open)\n print \"</tr>\\n\";\n }", "private function makeCalendarHead()\n\t{\n\t\tif(strlen($this->headerStr) < 1) {\n\t\t\t$head = \"\\t<tr>\\n\\t\\t<th colspan=\\\"7\\\" class=\\\"headerString\\\">\";\n\t\t\tif(!is_null($this->curDay)) {\n\t\t\t\t$head .= $this->curDayName.' the '.$this->curDayS.' of '.$this->curMonthName.', '.$this->curYear;\n\t\t\t} else {\n\t\t\t\t$head .= $this->curMonthName.', '.$this->curYear;\n\t\t\t}\n\t\t\t$head .= \"</th>\\n\\t</tr>\\n\";\n\t\t} else {\n\t\t\t$head = $this->headerStr;\n\t\t}\n\t\t\n\t\t$this->calWeekDays .= $head;\n\t\t$this->outArray['head'] = $head;\n\t}", "function titulopersonal(){\n print (\"\\n<tr>\");\n if($this->titulo !=\"\")\n foreach ($this->titulo as $titulo){\n print (\"\\n<th>$titulo</th>\");\n }\n print (\"\\n<tr>\"); \n }", "function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }", "function output_header($allLists)\n {\n $output_html = '';\n if (count($allLists) == 0) return '';\n $output_html .= '<tr>';\n foreach ($allLists as $item) {\n $output_html .= '<th>' . $item . '</th>';\n }\n $output_html .= '</tr>';\n return $output_html;\n }", "function output_header($allLists)\n {\n $output_html = '';\n if (count($allLists) == 0) return '';\n $output_html .= '<tr>';\n foreach ($allLists as $item) {\n $output_html .= '<th>' . $item . '</th>';\n }\n $output_html .= '</tr>';\n return $output_html;\n }", "function output_header($allLists)\n {\n $output_html = '';\n if (count($allLists) == 0) return '';\n $output_html .= '<tr>';\n foreach ($allLists as $item) {\n $output_html .= '<th>' . $item . '</th>';\n }\n $output_html .= '</tr>';\n return $output_html;\n }", "function output_header($allLists)\n {\n $output_html = '';\n if (count($allLists) == 0) return '';\n $output_html .= '<tr>';\n foreach ($allLists as $item) {\n $output_html .= '<th>' . $item . '</th>';\n }\n $output_html .= '</tr>';\n return $output_html;\n }", "protected function getTableHeader() {\n /** @var \\Drupal\\webform\\WebformInterface $webform */\n $webform = $this->getEntity();\n $header = [];\n $header['title'] = $this->t('Title');\n\n $header['key'] = [\n 'data' => $this->t('Key'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['type'] = [\n 'data' => $this->t('Type'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['correct_answer'] = $this->t('Answer');\n $header['weight'] = $this->t('Weight');\n $header['operations'] = $this->t('Operations');\n// $header['answer'] = [\n// 'data' => $this->t('Answer'),\n// 'class' => [RESPONSIVE_PRIORITY_LOW],\n// ];\n//\n// $header['required'] = [\n// 'data' => $this->t('Required'),\n// 'class' => ['webform-ui-element-required', RESPONSIVE_PRIORITY_LOW],\n// ];\n// $header['parent'] = $this->t('Parent');\n// $header['operations'] = [\n// 'data' => $this->t('Operations'),\n// 'class' => ['webform-ui-element-operations'],\n// ];\n return $header;\n }", "function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}", "function headers()\n {\n // Maintain URL params for pagination\n if (empty($this->params['pass'])) {\n $this->params['pass'] = array();\n }\n $options = array(\n 'url' => array_merge($this->tableOptions['url'], $this->params['named'], $this->params['pass']),\n //'model' => $this->defaultModel\n );\n if (!empty($this->tableOptions['ajax'])) {\n $options['update'] = $this->tableOptions['ajax']['mh-update'];\n $options['indicator'] = $this->tableOptions['ajax']['mh-indicator'];\n $options['before'] = $this->Js->get($options['indicator'])->effect('fadeIn', array('buffer' => false));\n $options['complete'] = $this->Js->get($options['indicator'])->effect('fadeOut', array('buffer' => false));\n }\n\n\n $this->Paginator->options($options);\n\n $lines = array();\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $headerHTML[] = $Column->header();\n }\n\n $row = $this->Html->tag('tr', implode(chr(10), $lines));\n\n return $this->Html->tag('thead', $row);\n }", "protected function tableHead($header, $border) {\n $width = 15;\n $height = 12;\n \n foreach($header as $col) {\n $this->Cell($width, $height, $col, $border);\n }\n $this->Ln();\n }", "public static function table_top_label () \n {\n $html = null;\n\n $html .= '<thead>\n <tr>\n <td id=\"cb\" class=\"manage-column column-cb check-column\">\n <label class=\"screen-reader-text\" for=\"cb-select-all-1\">\n Select All\n </label>\n <input id=\"cb-select-all-1\" type=\"checkbox\">\n </td>\n <th scope=\"col\" id=\"title\" class=\"manage-column column-title\">\n Name\n </th>\n <th scope=\"col\" id=\"tags\" class=\"manage-column column-tags column-primary\">\n Excerpt\n </th>\n <th scope=\"col\" id=\"author\" class=\"manage-column column-author\">\n Author\n </th>\n <th scope=\"col\" id=\"comments\" class=\"manage-column column-comments\">\n <span class=\"vers comment-grey-bubble\" title=\"Comments\">\n <span class=\"screen-reader-text\">\n Comments\n </span>\n </span>\n </th>\n <th scope=\"col\" id=\"date\" class=\"manage-column column-date\">\n Date\n </th> \n </tr>\n </thead>';\n\n return $html; \n }", "function tablethead_open() {\n $this->doc .= DOKU_TAB.'<thead>'.DOKU_LF;\n }", "private function createTableHeader($attributeList = false, $prefixHTML = false)\n\t{\n\t\t// Render table with all specified attributes\n\t\t$attributeString = false;\n\t\tif ($attributeList)\n\t\t{\n\t\t\tforeach($attributeList as $name => $value) {\n\t\t\t\t$attributeString .= sprintf('%s=\"%s\" ', $name, $value);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\treturn \"$prefixHTML\\n\\n<table class=\\\"form-table\\\" $attributeString>\\n\";\n\t}", "public function auto_build_list_thead(){\r\n\t\t$list_thead = \"<thead>\".\r\n\t\t\t\"<tr>\" .\r\n\t\t\t\"<th>#</th>\";\r\n\r\n\t\tforeach ($this->model->table_fields as $list_field)\r\n\t\t\tif ($list_field->get_visible_grid())\r\n\t\t\t\t$list_thead .= \"<th class='th-sm' >\" . ($list_field->get_label()) . \"</th>\";\r\n\r\n\t\treturn $list_thead . \"<th class='text-center'>Accion</th>\" .\r\n\t\t\t\"</tr>\" .\r\n\t\t\t\"</thead>\";\r\n\t}", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "function render_table_header_footer($orderBy, $order) {\n?>\n\t\t<tr>\n<?php\n\t\t\t$this->render_th('title', 'Title', $orderBy, $order); \n\t\t\t$this->render_th('date', 'Date', $orderBy, $order); \n\t\t\t$this->render_th('facilitators', 'Facilitators', $orderBy, $order); \n\t\t\t$this->render_th('categories', 'Categories', $orderBy, $order); \n?>\n\t\t</tr>\n<?php\n\t}", "public function displayTableHead($tableLeftTitle, $data) {\r\n\t\t//print_r($data);\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$html .= '<table cellpadding=\"0\" cellspacing=\"0\" class=\"table-a\">';\r\n\t\t$html .= '<thead>';\r\n\t\t$html .= '<tr class=\"row\" id=\"titles\">';\r\n\t\t\r\n\t\tif (!$tableLeftTitle == '') {\r\n\t\t\t$html .= '<th class=\"left\" valign=\"top\">';\r\n\t\t\t$html .= '<h3>'.$tableLeftTitle.'</h3>';\r\n\t\t\t$html .= '</th>';\r\n\t\t}\r\n\t\t\r\n\t\tfor ($i=0; $i<count($data); $i++) {\r\n\t\t\t$html .= '<th class=\"right\" valign=\"top\"> <h3>'.$data[$i].'</h3></th>';\r\n\t\t}\r\n\t\t$html .= '</tr>';\r\n\t\t$html .= '</thead>';\r\n\r\n\t\t$html .= '<tbody>';\r\n\t\treturn $html;\r\n\t\t\r\n\t}", "abstract function getheadings();", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nGROUP BY Command\nMAINHEADING;\n }", "private function makeDayHeadings()\n\t{\n\t\t$this->outArray['dayheadings'] = array();\n\t\t$this->dayHeadings .= \"\\t<tr>\\n\";\n\t\tforeach($this->daysArray as $day) {\n\t\t\t$this->dayHeadings .= \"\\t\\t<th class=\\\"dayHeading\\\">$day</th>\\n\";\n\t\t\tarray_push($this->outArray['dayheadings'], $day);\n\t\t}\n\t\t$this->dayHeadings .= \"\\t</tr>\\n\";\n\t\t\n\t\t$this->calWeekDays .= $this->dayHeadings;\n\t}", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nSQL Basics\nMAINHEADING;\n }", "protected function getHeadingHtml() {\n\t\t$heading = '';\n\t\tif ( $this->isUserPage ) {\n\t\t\t// The heading is just the username without namespace\n\t\t\t$heading = $this->pageUser->getName();\n\t\t} else {\n\t\t\t$pageTitle = $this->getOutput()->getPageTitle();\n\t\t\tif ( $pageTitle ) {\n\t\t\t\t$heading = $pageTitle;\n\t\t\t}\n\t\t}\n\t\treturn Html::rawElement( 'h1', [ 'id' => 'section_0' ], $heading );\n\t}", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nUnique to Oracle\nMAINHEADING;\n }", "function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}", "private function createFileHeadings() {\n\t\t// Allow other plugins to add their own column headers\n\t\t$headings = elgg_trigger_plugin_hook('row:headers', 'userexport', array(), $this->fields);\n\n\t\t// Attempt to translate the fields\n\t\tforeach ($headings as $key => $field) {\n\t\t\t$lang_string = \"profile:{$field}\";\n\t\t\t$heading = elgg_echo($lang_string);\n\n\t\t\t// No translation was found, fall back to the original string\n\t\t\tif ($heading === $lang_string) {\n\t\t\t\t$heading = elgg_echo($field);\n\t\t\t}\n\n\t\t\t$headings[$key] = $heading;\n\t\t}\n\n\t\t$this->writeToCSV($headings);\n\t}", "public function getPageHeading($array) {\n\t\t$html ='\n\t\t<div class=\"row\">\n\t\t\t<div class=\"small-12 medium-12 large-12 columns\">\n\t\t\t\t<div class=\"small-12 medium-9 large-9 columns\">\n\t\t\t\t\t<h2> '.$array['page_title'].' </h2>\n\t\t\t\t</div>';\n\t\t\tif ($array['side_title']) {\n\t\t\t\t$html .='\n\t\t\t\t<div class=\"small-12 medium-3 large-3 columns\">\n\t\t\t\t\t<h6 class=\"subtitle\">'.$array['side_title'].'</h6>\n\t\t\t\t</div>';\n\t\t\t}\n\t\t\t$html .='\n\t\t\t</div>\n\t\t</div>';\n\n\t\treturn $html;\n\t}", "function clsThead($aConfiguration=array())\r\n\t{\r\n\t\tclsTableRowContainer::clsTableRowContainer('thead', $aConfiguration);\r\n\t}", "function createEditForm_getItemHead()\t{\n\t\tGLOBAL $LANG;\n\t\tif ($this->MOD_SETTINGS['editLang'])\t{\n\n\t\t\t\t// Width of each label column is set by a clear-gif:\n\t\t\t$clearGif = '<br/><img src=\"clear.gif\" width=\"250\" height=\"1\" alt=\"\" />';\n\n\t\t\t$tCells = array();\n\t\t\t$tCells[] = '<th>'.$LANG->getLL('form_key').'</th>';\n\t\t\t$tCells[] = '<th style=\"width:50%\">'.$LANG->getLL('form_default').$clearGif.'</th>';\n\t\t\t$tCells[] = '<th>'.$this->MOD_SETTINGS['editLang'].'</th>';\n\t\t\t$tCells[] = '<th>'.$LANG->getLL('form_status').'</th>';\n\n\t\t\tforeach($this->langKeys as $langK)\t{\n\t\t\t\tif ($this->MOD_SETTINGS['addLang_'.$langK])\t{\n\t\t\t\t\t$tCells[] = '<td>'.$langK.$clearGif.'</td>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t// Return row:\n\t\t\treturn '\n\t\t\t<tr class=\"bgColor5\" style=\"font-weight: bold;\">\n\t\t\t\t'.implode('\n\t\t\t\t',$tCells).'\n\t\t\t</tr>';\n\t\t}\n\t}", "private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\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\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}", "function tableheader_close() {\n $this->doc .= '</th>';\n }", "function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n}", "private function render_data()\n\t{\n\t\t// create if the headers exists\n\t\t// 2 header style table\n\t\tif(count($this->headers) == 2 && isset($this->headers[0][0]) && isset($this->headers[1][0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr><th></th>';\n\t\t\tforeach($this->headers[0] as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the row headers and the data\n\t\t\tfor($i=0; $i<count($this->headers[1]); $i++)\n\t\t\t{\n\t\t\t\t// the header\n\t\t\t\t$html .= \"<tr><th>{$this->headers[1][$i]}</th>\";\n\t\t\t\t\n\t\t\t\t// and now the data\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\t// 1 header style table\n\t\tif(count($this->headers) > 0 && isset($this->headers[0]) && !is_array($this->headers[0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr>';\n\t\t\tforeach($this->headers as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the data\n\t\t\tfor($i=0; $i<count($this->data); $i++)\n\t\t\t{\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\treturn '';\n\t}", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}", "public function SummaryLine_HTML_row() {\n\t$sCatNum = $this->CatNum();\n\t$htLink = $this->ShopLink($sCatNum);\n\t$sName = $this->NameString();\n\t$sStats = $this->RenderStatus_HTML_cells();\n\treturn \"\\n<tr><td>$htLink</td><td>&ldquo;$sName&rdquo;</td>$sStats</tr>\";\n }", "function mkYearTitle(){\n\tif ($this->rowCount<1 || $this->rowCount>12) $this->rowCount=4;\n\tif (!$this->yearNav){\n\t\t$out=\"<tr><td colspan=\\\"\".$this->rowCount.\"\\\" class=\\\"\".$this->cssYearTitle.\"\\\">\";\n\t\t$out.=$this->actyear;\n\t\t$out.=\"</td></tr>\\n\";\n\t}\n\telse{\n\t\t$out=\"<tr><td colspan=\\\"\".$this->rowCount.\"\\\" align=\\\"center\\\">\";\n\t\t$out.=\"<table><tr><td class=\\\"\".$this->cssYearNav.\"\\\">\";\n\t\t$out.=$this->mkUrl($this->actyear-1);\n\t\t$out.=$this->yearNavBack.\"</a></td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssYearTitle.\"\\\">\".$this->actyear.\"</td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssYearNav.\"\\\">\";\n\t\t$out.=$this->mkUrl($this->actyear+1);\n\t\t$out.=$this->yearNavForw.\"</a></td></tr></table></td></tr>\\n\";\n\t}\nreturn $out;\n}", "function heading( $data = '', $h = '1', $attributes = '' )\n\t{\n\t\treturn '<h' . $h . _stringify_attributes( $attributes ) . '>' . $data . '</h' . $h . '>';\n\t}", "private function makeCalendarTitle()\n\t{\n\t\tif(strlen($this->headerTitle) > 0) {\n\t\t\t$this->calWeekDays .= \"\\t<tr>\\n\\t\\t<th class=\\\"headerTitle\\\" colspan=\\\"7\\\">\".$this->headerTitle.\"</th>\\n\\t</tr>\";\n\t\t\t$this->outArray['title'] = $this->headerTitle;\n\t\t}\n\t}", "private function headings() {\n\t\t$this->section_data['general_h_tags'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_h_tags',\n\t\t\t'label' \t\t\t\t=> __( 'Headings', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ),\n\t\t\t'type' \t\t\t\t\t=> 'multi_checkbox',\n\t\t\t'choices'\t\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h1' => 'Heading 1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h2' => 'Heading 2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h3' => 'Heading 3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h4' => 'Heading 4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h5' => 'Heading 5',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h6' => 'Heading 6',\n\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t'des'\t\t\t\t\t\t=> __( 'Check which HTML headings automatically generated table of contents.', 'fixedtoc' )\n\t\t);\n\t}", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "function drawHeader(){\n switch ($this->doing){\n case 'budget_byProjects':\n case 'myguests':\n if (!(@$this->t instanceof b_table)){\n\t$this->dbg('CANCEL header');\n\t$this->t = new b_table_dummy();\n }\n break;\n\n default:\n parent::drawHeader();\n break;\n }\n }", "function generateTitle($header, $data)\n\t{\n\t\t$this->SetFillColor(63,73,204);\n\t\t$this->SetTextColor(255);\n\t\t$this->SetDrawColor(18,0,0);\n\t\t$this->SetLineWidth(.1);\n\t\t$this->SetFont('','B');\n\t\t// Header\n\t\t$w = array(70, 25, 30, 20,30,35,25);\n\t\tfor($i=0;$i<count($header);$i++)\n\t\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C',true);\n\t\t$this->Ln();\n\t\t// Color and font restoration\n\t\t$this->SetFillColor(224,235,255);\n\t\t$this->SetTextColor(0);\n\t\t$this->SetFont('');\n\t\t// Data\n\t\t$fill = false;\n\t\tforeach($data as $row)\n\t\t{\n\t\t\t$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);\n/*\t\t\t$this->Cell($w[1],6,$row[1],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[2],6,$row[2],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[3],6,$row[3],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[4],6,$row[4],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[5],6,$row[5],'LR',0,'C',$fill);*/\n\t\t\t$this->Ln();\n\t\t\t$fill = !$fill;\n\t\t}\n\t\t// Closing line\n\t\t$this->Cell(array_sum($w),0,'','T');\n\t}", "public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}", "public function get_heading() {\n\t\tif ( $this->object['voucher_count'] == 1 ) {\n\t\t\treturn apply_filters( 'woocommerce_email_heading_' . $this->id, $this->format_string( $this->heading ), $this->object );\n\t\t} else {\n\t\t\treturn apply_filters( 'woocommerce_email_heading_' . $this->id, $this->format_string( $this->heading_multiple ), $this->object );\n\t\t}\n\t}", "function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "function tablethead_close() {\n $this->doc .= DOKU_TAB.'</thead>'.DOKU_LF;\n }", "public function getHeading(): string;", "function heading() {\n\t?>\n\t\t<!DOCTYPE html>\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<meta charset=\"utf-8\" />\n\t\t\t\t<title>Remember the Cow</title>\n\t\t\t\t<link href=\"https://webster.cs.washington.edu/css/cow-provided.css\" \n\t\t\t\t type=\"text/css\" rel=\"stylesheet\" />\n\t\t\t\t<link href=\"cow.css\" type=\"text/css\" rel=\"stylesheet\" />\n\t\t\t\t<link href=\"https://webster.cs.washington.edu/images/todolist/favicon.ico\" \n\t\t\t\t type=\"image/ico\" rel=\"shortcut icon\" />\n\t\t\t</head>\n\n\t\t\t<body>\n\t\t\t\t<div class=\"headfoot\">\n\t\t\t\t\t<h1>\n\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/todolist/logo.gif\" alt=\"logo\" />\n\t\t\t\t\t\tRemember<br />the Cow\n\t\t\t\t\t</h1>\n\t\t\t\t</div>\n\t<?php\n\t}", "function print_pure_table($query_result, $headers) {\n echo \"<table class=\\\"pure-table pure-table-bordered\\\">\";\n if ($headers) {\n echo $headers;\n } else {\n echo \"<thead><tr>\";\n for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n $fieldname = pg_field_name($query_result, $i);\n echo \"<th>$fieldname</th>\";\n }\n echo \"</tr></thead>\";\n }\n \n echo \"<tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</tbody>\";\n echo \"</table>\";\n }", "public function getTableHeaders()\n {\n return ['#', 'Fatura','Ordem Servico'];\n }", "function DisplayTableHeader()\n{\n\t$pdf = $GLOBALS['pdf'];\n\t$width_col_no = $GLOBALS['width_col_no'];\n\t$sync_name_index = $GLOBALS['sync_name_index'];\n\t$collectionWidth = $GLOBALS['collectionWidth'];\n\t$totalWidth = $GLOBALS['totalWidth'];\n\n\t//setkan font jadi bold untuk header\n\t$pdf->SetFont('helvetica','B',9);\n\n\t//koleksi tinggi column header\n\t$header_cols_height = array();\n\n\t//tinggi untuk column 'No'\n\t$header_cols_height[] = $pdf->getNumLines('No',$width_col_no);\n\n\t//dapatkan tinggi untuk setiap column\n\tforeach ($sync_name_index as $key => $value)\n\t{\n\t\t$width_converted = GetAndConvertColumnWidth($value, $sync_name_index, $collectionWidth, $totalWidth, $pdf);\n\t\t$header_cols_height[] = $pdf->getNumLines($value,$width_converted);\n\t}\n\n\t//cari siapa paling tinggi\n\t$max_height = max($header_cols_height);\n\n\t//display\n\t$pdf->SetFillColor(211,211,211);\n\n\t$pdf->MultiCell($w=$width_col_no, $h=5*$max_height+3, $txt='No', $border=1, $align='L', $fill=1, $ln=0, $x='', $y='', $reseth=true, $stretch=0, $ishtml=true, $autopadding=true, $maxh=$h, $v='M');\n\tforeach ($sync_name_index as $key => $value)\n\t{\n\t\t$width_converted = GetAndConvertColumnWidth($value, $sync_name_index, $collectionWidth, $totalWidth, $pdf);\n\t\t$pdf->MultiCell($w=$width_converted, $h=5*$max_height+3, $txt=$value, $border=1, $align='C', $fill=1, $ln=0, $x='', $y='', $reseth=true, $stretch=0, $ishtml=true, $autopadding=true, $maxh=$h, $v='M');\n\t}\n\n\t//reset font\n\t$pdf->SetFont('helvetica','',9);\n\t$pdf->Ln();\n}", "function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}", "private function generateHead(){\n echo '<div class=\"panel panel-default\">';\n echo '<div class=\"panel-heading\">';\n echo '<h1 class=\"panel-title\"><span class=\"glyphicon glyphicon-flag\"></span>Your last orders</h1>';\n echo '</div>';\n echo '<div class=\"panel-body\">';\n }", "protected function displayTableHeadForTimeRange($prependEmptyTag = true, $width = '8%') {\n\t\tif ($prependEmptyTag) {\n\t\t\techo '<th></th>';\n\t\t}\n\n\t\tif (!empty($width)) {\n\t\t\t$width = ' width=\"'.$width.'\"';\n\t\t}\n\n\t\tif ($this->showsAllYears()) {\n\t\t\t$year = date('Y');\n\n\t\t\tfor ($i = START_YEAR; $i <= $year; $i++) {\n\t\t\t\techo '<th'.$width.'>'.$i.'</th>';\n\t\t\t}\n\t\t\techo '<th>'.__('In total').'</th>';\n\t\t} else {\n\t\t\t$num = $this->showsLast6Months() ? 6 : 12;\n\t\t\t$add = $this->showsTimeRange() ? date('m') - $num - 1 + 12 : -1;\n\n\t\t\tfor ($i = 1; $i <= 12; $i++) {\n\t\t\t\techo '<th'.$width.'>'.Time::month(($i + $add)%12 + 1, true).'</th>';\n\t\t\t}\n\t\t}\n\t}", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nOrganizational Units\nMAINHEADING;\n }", "function mkYearHead(){\nreturn \"<table class=\\\"\".$this->cssYearTable.\"\\\">\\n\";\n}", "private function generateHead() {\n echo '<h3><span class=\"glyphicon glyphicon-camera\"></span> Images</h3>';\n echo '<div class=\"row\">';\n }", "public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }", "public function headingRow(): int\n {\n return 1;\n }", "function headings() {\r\n\t\t// and that they receive anchors so that they may be linked to from the table of contents.\r\n\t\t//ReTidy::force_headings();\r\n\t\tReTidy::heading_anchors();\r\n\t}", "public function getTableHeaders()\n {\n return ['#', 'Autor', 'Título', 'Subtítulo', 'Preço', 'Categorias'];\n }", "protected function TitleTable() {\n\treturn $this->GetConnection()->MakeTableWrapper(KS_CLASS_CATALOG_TITLES);\n }", "function create_devs_header()\n{\n$header =\n \"<thead>\n \t<tr>\n \t<th scope='col' class='rounded-company'>GPU #</th>\n <th scope='col' class='rounded-q1'>En</th>\n <th scope='col' class='rounded-q1'>Status</th>\n <th scope='col' class='rounded-q1'>Temp</th>\n <th scope='col' class='rounded-q1'>Fan Speed</th>\n <th scope='col' class='rounded-q1'>GPU Clk</th>\n <th scope='col' class='rounded-q1'>Mem Clk</th>\n <th scope='col' class='rounded-q1'>Volt</th>\n <th scope='col' class='rounded-q1'>Active</th>\n <th scope='col' class='rounded-q1'>MH/s 5s</th>\n <th scope='col' class='rounded-q1'>MH/s avg</th>\n <th scope='col' class='rounded-q1'>Acc</th>\n <th scope='col' class='rounded-q1'>Rej</th>\n <th scope='col' class='rounded-q1'>H/W Err</th>\n <th scope='col' class='rounded-q1'>Util</th>\n <th scope='col' class='rounded-q1'>Intens</th>\n </tr>\n </thead>\";\n \n return $header;\n}", "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nMicrosoft Entity Framework\nMAINHEADING;\n }", "function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'INFORMATION',0, 0, 'C');\n\t\t$this->Ln(30);\n\t}", "private function generate_html_header()\n {\n $header = \"<!DOCTYPE html> <html lang=\\\"en\\\"> <head> <meta charset=\\\"UTF-8\\\"> <title>Test statistics</title> <style> table{ border: 1px solid black; margin: 10px 20px; } thead{ background-color:lightgray; } .status{ width: 180px; } #stats{font-size:23px;} .test-name{ min-width: 400px; padding-left: 20px; color:blue; text-decoration: underline; } h1,p{ margin-left: 20px; } .success{ background: lawngreen; } .failed{ background: red; } #detail{ margin-left: 20px; } #input{ min-height: 250px; width: 300px; } #parse_output{ min-height: 400px; width: 500px; } #detail{ display: none; } .status_text_pass{ color:green; font-size: 25px; } .status_text_failed{ color:red; font-size:25px; } </style> </head> <body> <h1>Test statistics</h1><p id=\\\"stats\\\">Success: <span id=\\\"correct\\\"></span>/<span id=\\\"all\\\"></span></p> <p>For test detail click on test name</p> <table> <thead> <tr> <th>Test Name</th> <th>Pass/Fail</th> </tr> </thead> <tbody> </tbody> </table> <div id=\\\"detail\\\"> <h2><span id=\\\"test_name\\\"></span> detail</h2> <h3 id=\\\"status_text\\\"></h3><h3>Input:</h3> <textarea disabled id=\\\"input\\\"></textarea> <h3>Parse output:</h3> <textarea disabled id=\\\"parse_output\\\"></textarea> <h3>Interpret input</h3><span id=\\\"interpret_input\\\"></span> <h3>Reference output</h3><span id=\\\"ref_output\\\"></span> <h3>Interpret output</h3><span id=\\\"interpret_output\\\"></span> <h3>Reference return code:</h3> <span id=\\\"ref_return_code\\\"></span> <h3>Parse return code:</h3> <span id=\\\"parse_return_code\\\"></span> <h3>Interpret return code:</h3> <span id=\\\"interpret_return_code\\\"></span> </div> </body> <script> var tests = [\";\n return $header;\n }", "public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }", "public function fullTableRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($in as $k => $v){\n if(!isset($v)) $v = 'n/a';\n $out .= '<td><a title=\"'.$k.'\">'.$v.'</a></td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "function createTable($array,$summary,$caption,$id='',$class='') {\n\tif(!is_array($array) || empty($summary) || empty($caption)) return false;\n\t\n\t$thead_text = '';\n\t$tbody_text = '';\n\n\t$header_total = count($array['header']);\n\tforeach($array['header'] as $key => $header) {\n\t\tif(!is_array($header)) $header = array('text' => $header);\n\t\t$thead_text .= '<th scope=\"col\"'.addAttributes(@$header['title'],$header['id'],@$header['class']).'>'.formatText($header['text']).'</th>'.\"\\n\";\n\t}\n\n\t$i=0;\n\tforeach($array['rows'] as $key => $row_array) {\n\t\t$tbody_row = '';\n\t\tif(empty($row_array['class'])) $row_array['class'] = array();\n\t\telseif(!is_array($row_array['class'])) $row_array['class'] = array($row_array['class']);\n\t\tif(!isEven($i)) $row_array['class'][] = 'odd';\n\n\t\tif(count($row_array['value'])!=$header_total) continue; // if the number of rows don't match header rows...\n\t\tforeach($row_array['value'] as $key => $row) {\n\t\t\tif(!is_array($row)) $row = array('text' => $row);\n\t\t\t$tbody_row .= '<td headers=\"'.$array['header'][$key]['id'].'\"'.addAttributes('',@$row['id'],@$row['class']).'>'.$row['text'].'</td>'.\"\\n\";\n\t\t}\n\t\t$tbody_text .= '<tr'.addAttributes('',@$row_array['id'],@$row_array['class']).'>'.\"\\n\".$tbody_row.'</tr>'.\"\\n\";\n\t\t$i++;\n\t}\n\tif(empty($tbody_text)) return false;\n\t\n\t$table = '<table summary=\"'.formatText($summary).'\"'.addAttributes('',$id,$class).'>\n\t\t<caption>'.formatText($caption).'</caption>\n\t\t<thead>'.\"\\n\".'<tr>'.\"\\n\".$thead_text.'</tr>'.\"\\n\".'</thead>\n\t\t<tbody>'.\"\\n\".$tbody_text.'</tbody>\n\t</table>'.\"\\n\";\n\t\n\treturn $table;\n}" ]
[ "0.84051144", "0.8054358", "0.7545947", "0.75038123", "0.7487859", "0.74281466", "0.74204177", "0.74012905", "0.73917806", "0.72973746", "0.7288879", "0.7236101", "0.7205998", "0.71703714", "0.7166762", "0.70732206", "0.70727783", "0.7056469", "0.70239806", "0.7005277", "0.6992797", "0.6970431", "0.69306326", "0.69206494", "0.68784857", "0.6870439", "0.6866271", "0.68534255", "0.6841797", "0.68390304", "0.6818423", "0.6803101", "0.6798953", "0.67903817", "0.6759088", "0.6755711", "0.6755711", "0.6755711", "0.6755711", "0.6747303", "0.6721196", "0.6680602", "0.6663442", "0.6654426", "0.66479766", "0.662762", "0.6619918", "0.6594233", "0.6585816", "0.6577633", "0.65632576", "0.6557765", "0.6556202", "0.6547047", "0.6538527", "0.65349966", "0.65318567", "0.6530337", "0.6506899", "0.6503396", "0.65006024", "0.64856714", "0.6481275", "0.64683545", "0.64588", "0.6447755", "0.64451057", "0.64242184", "0.6415364", "0.64147025", "0.6413873", "0.64050996", "0.6375541", "0.6368353", "0.6364519", "0.6354296", "0.6337427", "0.63353026", "0.63325477", "0.6309961", "0.63061017", "0.6305969", "0.6302769", "0.62993675", "0.62863827", "0.6283422", "0.6273054", "0.62728935", "0.62654847", "0.6260884", "0.62541795", "0.6242342", "0.6238998", "0.6232731", "0.6215314", "0.6208662", "0.61995685", "0.6195747", "0.616456", "0.6162745", "0.6155548" ]
0.0
-1
Generate single table row (HTML)
public function row_single($name) { $out = "<tr><td width=\"100%\" colspan=\"2\" align=\"left\">".$name."</td></tr>"; $out .= "<tr><td width=\"100%\" height=\"1\" bgcolor=\"#C0C0C0\" colspan=\"2\"></td></tr>\n"; return $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SummaryLine_HTML_row() {\n\t$sCatNum = $this->CatNum();\n\t$htLink = $this->ShopLink($sCatNum);\n\t$sName = $this->NameString();\n\t$sStats = $this->RenderStatus_HTML_cells();\n\treturn \"\\n<tr><td>$htLink</td><td>&ldquo;$sName&rdquo;</td>$sStats</tr>\";\n }", "function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}", "function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}", "public function enumerate_values_table_row(){\n\t\treturn \"\n\t\t\t<tr>\n\t\t\t\t<td>$this->avg_reaction_time_m_no_faces</td> \n\t\t\t\t<td>$this->accuracy_m_no_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_m_faces</td> \n\t\t\t\t<td>$this->accuracy_m_faces</td> \n\n\t\t\t\t<td>$this->avg_reaction_time_aba_no_faces</td> \n\t\t\t\t<td>$this->accuracy_aba_no_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_aba_faces</td> \n\t\t\t\t<td>$this->accuracy_aba_faces</td> \n\n\t\t\t\t<td>$this->avg_reaction_time_faces</td> \n\t\t\t\t<td>$this->accuracy_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_no_faces</td> \n\t\t\t\t<td>$this->accuracy_no_faces</td> \n\t\t\t</tr>\n\t\t\";\n\t}", "public function getHTML()\n {\n $rowIDs = $this->rowID;\n $numberOfColumns = $this->tableColumns;\n $html = \"\";\n $rowCounter = 0;\n\n $html .= \"<table class='table'>\";\n\n if ($this->tableHead != null) {\n $html .= \"<tr>\";\n\n foreach ($this->tableHead as $head) {\n $html .= \"<th>$head</th>\";\n }\n $html .= \"</tr>\";\n }\n $html .= \"<tr>\";\n\n $i = 0;\n foreach ($this->tableData as $data) {\n if (($i) % $numberOfColumns == 0) {\n $html .= \"</tr><tr id='$rowIDs[$rowCounter]'>\";\n $rowCounter++;\n }\n//\n $html .= \"<td>$data</td>\";\n $i++;\n\n }\n $html .= \"</tr>\";\n\n $html .= \"</table>\";\n\n return $html;\n\n }", "public function renderTableRow($model) {\n $cells = [];\n /* @var $column Column */\n foreach ($this->columns as $column) {\n $cells[] = $column->renderContentCell($model);\n }\n\tif (is_callable($this->rowOptions) && $model !== null)\n\t $options = call_user_func($this->rowOptions, $model, $this);\n\telse\n\t $options = $this->rowOptions;\n\n $options['data-key'] = (string)$model->key();\n\n return Widget::html()->tag('table-row', array('content' => implode('', $cells)), $options);\n }", "function table_row($p_data, $p_tr_attr = '', $p_td_attr = array()){\n\techo '<tr ' . $p_tr_attr . '>';\n\n\tfor($t_i=0; $t_i<count($p_data); $t_i++){\n\t\t$t_td = (isset($p_td_attr[$t_i]) ? $p_td_attr[$t_i] : '');\n\t\techo '<td ' . $t_td . '>' . $p_data[$t_i] . '</td>';\n\t}\n\n\techo '</tr>';\n}", "public function render()\n {\n return view('components.table.row');\n }", "function getRowHtml()\r\n\t{\r\n\t // Failsafe if i18n is not loaded\r\n\t if(! function_exists('__'))\r\n\t Misc::use_helper('I18N');\r\n\r\n\t if ($this->showGeenResultaten && ($this->rowCount == 0)) {\r\n\t\t $html = \" <td colspan='$this->colCount'>\" . __('Geen resultaten') . \"</td>\\n\";\r\n\t\t}\r\n\t\telse $html = $this->rowDataHtml;\r\n\r\n\t\treturn $html;\r\n\t}", "function generateRowRaw( $key, $raw )\r\n\t{\r\n\t\t$html = ' <tr>'.\"\\n\";\r\n\t\t$html.= ' <td width=\"100\" align=\"right\" class=\"key\">'.$key.'</td>'.\"\\n\";\r\n\t\t$html.= ' <td>'.$raw.'</td>'.\"\\n\";\r\n\t\t$html.= \" <td></td>\\n\";\r\n\t\t$html.= '</tr>';\r\n\t\t\r\n\t\treturn $html;\r\n\t}", "public function render()\n\t{\n\n\t\t$table = \"<table\";\n\n\t\t// Add all attributes\n\t\tforeach ($this->attributes as $key => $value) {\n\t\t\t$table .= ' ' . $key . '=\"' . $value .'\"';\n\t\t}\n\n\t\t$table .= \">\"; // Close table\n\n\t\t// Add the head\n\t\tif ($this->showHeadRow) {\n\t\t\t$table .= \"<thead><tr>\";\n\n\t\t\t// Show the number header.\n\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t$table .= \"<th>#</th>\";\n\t\t\t}\n\n\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t$columnHeadTitle = isset($column['headTitle']) ? $column['headTitle'] : $column[0];\n\t\t\t\t$table .= \"<th>\" . $columnHeadTitle . \"</th>\";\n\t\t\t}\n\n\t\t\t$table .= \"</tr></thead>\"; // finish head\n\t\t}\n\n\t\t// Body\n\t\t$table .= \"<tbody>\";\n\n\t\t$row = $this->numberColumnOffset;\n\n\t\tif (count($this->data) == 0) {\n\t\t\t// Show a no data entry\n\t\t\t$colspan = count($this->columns) + ($this->showNumberColumn ? 1 : 0);\n\t\t\t$table .= '<tr><td colspan=\"'.$colspan.'\"><p align=\"center\" style=\"font-weight:bold;\">Keine Einträge</p></td></tr>';\n\t\t}\n\t\telse {\n\t\t\tforeach ($this->data as $dataObject) {\n\n\t\t\t\t// Row attributes\n\t\t\t\t$attributes = $this->rowAttributes;\n\t\t\t\tif (!is_array($attributes)) {\n\t\t\t\t\tif (is_callable($this->rowAttributes)) {\n\t\t\t\t\t\t$callable = $this->rowAttributes;\n\t\t\t\t\t\t$attributes = $callable($dataObject);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$attributeString = '';\n\t\t\t\tif ($attributes) {\t\t// Add attributes if we have some\n\t\t\t\t\tforeach ($attributes as $attributeName => $attributeValue) {\n\t\t\t\t\t\t$attributeString .= $attributeName . '=\"' . $attributeValue . '\" ' ;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($this->rowIdDataMethod) {\n\t\t\t\t\t// method name or closure?\n\t\t\t\t\t$id = '';\n\t\t\t\t\tif (is_string($this->rowIdDataMethod)) {\n\t\t\t\t\t\t$id = $dataObject->{$this->rowIdDataMethod}(); // Call the row data method\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($this->rowIdDataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\t\t\t\t\t\t\t// we got a closure\n\t\t\t\t\t\t\t$closure = $this->rowIdDataMethod;\n\t\t\t\t\t\t\t$id = $closure($dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t$table .= '<tr id=\"'. $id .'\" ' . $attributeString . '>'; // Start row with id\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$table .= \"<tr \". $attributeString .\">\";\t// Start row without id\n\t\t\t\t}\n\n\t\t\t\t// Number?\n\t\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t\t$table .= \"<td>\" . $row . \"</td>\";\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\t$dataMethod = isset($column['dataMethod']) ? $column['dataMethod'] : $column[1];\n\t\t\t\t\tif (is_string($dataMethod)) {\n\t\t\t\t\t\t// Just call the method an insert the return value into the table cell\n\t\t\t\t\t\t$table .= \"<td>\". $dataObject->$dataMethod() .\"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($dataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\n\t\t\t\t\t\t\t// Call the closure and get the result\n\t\t\t\t\t\t\t$value = $dataMethod($dataObject, $this);\n\n\t\t\t\t\t\t\t$table .= \"<td>\". $value .\"</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$table .= \"</tr>\";\t// End the table row\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\t// Render the footer row\n\t\t\t$table = $this->renderFooter($table);\n\n\t\t}\n\n\t\t$table .= \"</tbody>\";\n\n\t\t$table .= \"</table>\";\n\t\treturn $table;\n\t}", "private function getRecipeItemTableRow($row){\n $itemPrice = floatval(($row[\"recipe\"] == 1 ? $row[\"jednotkova_cena_spolu_nakup\"] : $row[\"price\"]));\n $unit = ($row[\"recipe\"] == 1 ? 'kg' : 'ks');\n return \"<tr>\".\n '<td class=\"c w50 supplier-'.$row[\"supplier\"].'\"><span>'.($row[\"supplier\"] == 1 ? 'VTN' : 'CLRW').'</span></td>'.\n ($row[\"recipe\"] == 1 ? '<td class=\"recipe nm\"><a href=\"index.php?p=order&amp;sp=redit&amp;id='.$row[\"id\"].'\">'.$row[\"code\"].' - '\n .$row[\"label\"].'</a></td>' : '<td class=\"nm\">'.$row[\"code\"].' - '.$row[\"label\"].'</td>') .\n '<td class=\"r il\">'.$row[\"mnozstvo_spolu\"].' '.$unit.'</td>'.\n '<td class=\"r w50 il\">'.$row[\"item_count\"].'</td>'.\n '<td class=\"r\">'.$this->format($itemPrice).'</td>'.\n '<td class=\"r\">'.$this->format($row[\"cena_spolu_nakup\"] + $row[\"cena_tovar\"]).'</td>'.\n '<td class=\"r il\">'.$this->format($row[\"price_sale\"]).'</td>'.\n '<td class=\"r\">'.$this->format($row[\"cena_spolu_predaj\"]).'</td>'.\n '<td class=\"r\">'.$this->format($row[\"cena_spolu_predaj_total\"]).'</td>'.\n '<td class=\"r\">'.$this->getProfit($row[\"cena_spolu_nakup\"] + $row[\"cena_tovar\"], $row[\"cena_spolu_predaj\"]).'</td>'.\n '<td class=\"c w50 hide\"><a class=\"edit\" href=\"#id'.$row[\"id\"].'\">upraviť</a></td>'.\n '<td class=\"c w50 hide\"><a class=\"del3\" href=\"#id'.$row[\"id\"].'\"></a></td>'.\n \"</tr>\";\n }", "public function render()\n {\n return view('components.table-row');\n }", "public function displayTableRow($title, $data, $row) {\r\n\t\t$html = '<tr class=';\r\n\t\t// this seems strange, but the second row of the table is the first row of data, and therefore odd...\r\n\t\tif ($row == 'even') $html .= '\"row\">';\r\n\t\telseif ($row == 'odd') $html .= '\"row2\">';\r\n\r\n\t\tif (!$title == '') $html .= '<td class=\"lefttitle\">'.$title.'</td>';\r\n\t\tfor ($i=0; $i<count($data); $i++) {\r\n\t\t\t$html .= '<td align=\"center\" class=\"right\">'.$data[$i].'</td>';\r\n\t\t}\r\n\t\t$html .= '</td>';\r\n\t\treturn $html;\r\n\t}", "public function outputAsTableRow() {\n $table_row = \"<tr>\";\n $table_row .= \"<td><input type='radio' name='reservation_sn' value='$this->sn'</td>\";\n $table_row .= \"<td>$this->sn</td>\";\n $table_row .= \"<td>\".$this->outputStatus().\"</td>\";\n $table_row .= \"<td>$this->member_id</td>\";\n $table_row .= \"<td>$this->equipment_sn</td>\";\n $table_row .= \"<td>$this->start_datetime</td>\";\n $table_row .= \"<td>$this->end_datetime</td>\";\n $table_row .= \"<td>$this->memo</td>\";\n $table_row .= \"<td>$this->register_datetime</td>\";\n $table_row .= \"</tr>\";\n\n return $table_row;\n }", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }", "public function fullTableRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($in as $k => $v){\n if(!isset($v)) $v = 'n/a';\n $out .= '<td><a title=\"'.$k.'\">'.$v.'</a></td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "public function renderTableRow($item)\n\t{\n\t\t$value = $item->{$this->getField()};\n\t\tif ($this->hasFlag('editable')) {\n\t\t\t$value = $this->getEditable($value, $item->getKey());\n\t\t}\n\n\t\treturn view('schematic::partials.table.plain', [\n\t\t\t'value' => $value,\n\t\t]);\n\t}", "public function getTableContent() {\n\t\treturn \"<tr data-key='\" . $this -> getKey() . \"'><td>\" . $this -> key . \"</td><td contenteditable='true'>\" . $this -> value . \"</td><td>\" . $this -> dataType . \"</td></tr>\";\n\t}", "function printRow($row){\n\t\t$courseImage=$row['course_image'];\n\t\t$title=$row['title'];\n\t\t$categ=$row['category'];\n\t\t$startTime=$row['start_date'];\n\t\tif ($startTime === '0000-00-00') $startTime = 'n/a';\n\t\t$duration=$row['course_length'];\n\t\tif (!$duration) $duration = 'n/a';\n\t\t$teacher=$row['profname'];\n\t\t$teacherImage=$row['profimage'];\n\t\t$courseLink=$row['course_link'];\n\t\t$site=$row['site'];\n\t\t\n\t\t$link = 'TrendingCourses.php?url='.urlencode($courseLink);\n\t\n\t\t//foreach ($row as $elem){\n\t\t//\techo \"$elem<br>\";\n\t\t//}\n\t\n\t\techo \"<tr>\n\t\t\t<td width=\\\"5%\\\"><img src=\\\"$courseImage\\\" width=\\\"200px\\\" height=\\\"100px\\\"></td>\n\t\t\t<td width=\\\"5%\\\"><a href=\\\"$link\\\" id='sitelink'>$title</a></td>\n\t\t\t<td width=\\\"5%\\\">$categ</td>\n\t\t\t<td width=\\\"5%\\\">$startTime</td>\n\t\t\t<td width=\\\"5%\\\">$duration</td>\n\t\t\t<td width=\\\"5%\\\">$teacher</td>\n\t\t\t<td width=\\\"5%\\\"><img src=\\\"$teacherImage\\\" width=\\\"100px\\\" height=\\\"100px\\\"></td>\n\t\t\t<td width=\\\"5%\\\">$site</td>\n\t\t\t</tr>\";\n\t}", "private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}", "function draw_table($rows) {\n \n echo \"<table border=1 cellspacing=1>\"; //Set up border and spacing\n echo \"<tr>\"; //Begin the table row insertion for header row\n \n foreach($rows[0] as $key => $item) {\n \n echo \"<th>$key</th>\";\n \n }\n \n echo \"</tr>\";\n \n // Insert data into each row\n foreach ($rows as $row) {\n \n echo \"<tr>\";\n \n foreach ($row as $key => $item) {\n \n echo \"<td>$item</td>\"; //Table data\n \n }\n \n echo \"</tr>\";\n \n }\n \n echo \"</table>\";\n \n }", "function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}", "public function getRow() {}", "public function print_js_template_row()\n {\n }", "public function printTableRow($open)\n {\n\n print \"<tr>\\n\";\n print \"<td>&nbsp;\" . $this->email . \"&nbsp;</td>\";\n print \"<td>&nbsp;\" . $this->level . \"&nbsp;</td>\";\n if (!$open)\n print \"</tr>\\n\";\n }", "public function single_row( $item ) {\n echo '<tr>';\n $this->single_row_columns( $item );\n $this->displayMessageRow( $item );\n echo '</tr>';\n }", "function RenderRow() {\n\t\tglobal $conn, $Security, $planilla;\n\n\t\t// Call Row_Rendering event\n\t\t$planilla->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// idPlanilla\n\n\t\t$planilla->idPlanilla->CellCssStyle = \"\";\n\t\t$planilla->idPlanilla->CellCssClass = \"\";\n\n\t\t// Nombre\n\t\t$planilla->Nombre->CellCssStyle = \"\";\n\t\t$planilla->Nombre->CellCssClass = \"\";\n\t\tif ($planilla->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// idPlanilla\n\t\t\t$planilla->idPlanilla->ViewValue = $planilla->idPlanilla->CurrentValue;\n\t\t\t$planilla->idPlanilla->CssStyle = \"\";\n\t\t\t$planilla->idPlanilla->CssClass = \"\";\n\t\t\t$planilla->idPlanilla->ViewCustomAttributes = \"\";\n\n\t\t\t// Nombre\n\t\t\t$planilla->Nombre->ViewValue = $planilla->Nombre->CurrentValue;\n\t\t\t$planilla->Nombre->CssStyle = \"\";\n\t\t\t$planilla->Nombre->CssClass = \"\";\n\t\t\t$planilla->Nombre->ViewCustomAttributes = \"\";\n\n\t\t\t// idPlanilla\n\t\t\t$planilla->idPlanilla->HrefValue = \"\";\n\n\t\t\t// Nombre\n\t\t\t$planilla->Nombre->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$planilla->Row_Rendered();\n\t}", "function myRow($row,$pos){\r\n\techo \"<tr class='table-primary'>\";\r\n\techo \"<th>\".$pos.\"</th><td>\".$row['username'].\"</td><td>\".$row['credits'].\"xp</td><td class='text-dark'>\".$row['wins'].\" </td><td class='text-danger'>\".$row['loses'].\"</td>\";\r\n\techo \"</tr>\";\t\r\n}", "public function getRow();", "function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }", "function drawSimpleRow($color, $text) {\r\n\t\t\t\techo(\"<tr align = 'center' bgcolor = '$color'>\");\r\n\t\t\t\t\techo(\"<td colspan = '8'>$text</td>\");\r\n\t\t\t\techo(\"</tr>\");\r\n\t\t\t}", "function view_new(){\n echo \"<tr onclick='record.select(this)' id='{$this->entity->name}'>\";\n //\n //loop through the column and out puts its td element.\n foreach ($this->entity->columns as $col){\n //\n //Get the tds for every column\n echo $col->view();\n }\n //\n echo \"</tr>\";\n }", "public function to_html_raw()\n {\n $html = \"\";\n if(count($this->data))\n {\n $html = \"<tr>\";\n foreach($this->data as $key => $val)\n {\n $html .= \"<td>\".$val.\"</td>\"; \n } \n $html .= \"</tr>\";\n }\n return $html; \n }", "public function buildRow(&$row)\n {\n $lines = array();\n $class = '';\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $Column->cell($row);\n }\n if ($this->tableOptions['group']) {\n $level = 1000;\n foreach ($this->tableOptions['group'] as $count => $group) {\n if (is_null($row[$group]) && $count < $level) {\n $level = $count;\n }\n }\n if ($level < 1000) {\n $class = 'mh-table-group-row mh-table-group-row-level-'.$level;\n }\n\n }\n if (empty($class) && $this->altRow) {\n $class = 'altrow';\n }\n $this->altRow = !$this->altRow;\n\n return $this->Html->tag('tr', implode(chr(10), $lines), array('class' => $class));\n }", "public function single_row( $item )\n\t{\n\t\tstatic $row_class = '';\n\t\t$row_class = ( $row_class == '' ? 'alternate' : '' );\n\n\t\t$action = ( isset($item['data']['action']) ? $item['data']['action'] : 'no-action' );\n\t\t$type = ( isset($item['data']['type']) ? $item['data']['type'] : 'no-type' );\n\t\t\n\t\techo '<tr class=\"'.$action.' '.$type.' '.$row_class.'\">';\n\t\t$this->single_row_columns( $item );\n\t\techo '</tr>';\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $archv_finished;\n\n\t\t// Initialize URLs\n\t\t$this->ExportPrintUrl = $this->PageUrl() . \"export=print&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportHtmlUrl = $this->PageUrl() . \"export=html&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportExcelUrl = $this->PageUrl() . \"export=excel&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportWordUrl = $this->PageUrl() . \"export=word&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportXmlUrl = $this->PageUrl() . \"export=xml&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportCsvUrl = $this->PageUrl() . \"export=csv&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->AddUrl = $archv_finished->AddUrl();\n\t\t$this->EditUrl = $archv_finished->EditUrl();\n\t\t$this->CopyUrl = $archv_finished->CopyUrl();\n\t\t$this->DeleteUrl = $archv_finished->DeleteUrl();\n\t\t$this->ListUrl = $archv_finished->ListUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$archv_finished->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// ID\n\n\t\t$archv_finished->ID->CellCssStyle = \"\"; $archv_finished->ID->CellCssClass = \"\";\n\t\t$archv_finished->ID->CellAttrs = array(); $archv_finished->ID->ViewAttrs = array(); $archv_finished->ID->EditAttrs = array();\n\n\t\t// strjrfnum\n\t\t$archv_finished->strjrfnum->CellCssStyle = \"\"; $archv_finished->strjrfnum->CellCssClass = \"\";\n\t\t$archv_finished->strjrfnum->CellAttrs = array(); $archv_finished->strjrfnum->ViewAttrs = array(); $archv_finished->strjrfnum->EditAttrs = array();\n\n\t\t// strquarter\n\t\t$archv_finished->strquarter->CellCssStyle = \"\"; $archv_finished->strquarter->CellCssClass = \"\";\n\t\t$archv_finished->strquarter->CellAttrs = array(); $archv_finished->strquarter->ViewAttrs = array(); $archv_finished->strquarter->EditAttrs = array();\n\n\t\t// strmon\n\t\t$archv_finished->strmon->CellCssStyle = \"\"; $archv_finished->strmon->CellCssClass = \"\";\n\t\t$archv_finished->strmon->CellAttrs = array(); $archv_finished->strmon->ViewAttrs = array(); $archv_finished->strmon->EditAttrs = array();\n\n\t\t// stryear\n\t\t$archv_finished->stryear->CellCssStyle = \"\"; $archv_finished->stryear->CellCssClass = \"\";\n\t\t$archv_finished->stryear->CellAttrs = array(); $archv_finished->stryear->ViewAttrs = array(); $archv_finished->stryear->EditAttrs = array();\n\n\t\t// strdate\n\t\t$archv_finished->strdate->CellCssStyle = \"\"; $archv_finished->strdate->CellCssClass = \"\";\n\t\t$archv_finished->strdate->CellAttrs = array(); $archv_finished->strdate->ViewAttrs = array(); $archv_finished->strdate->EditAttrs = array();\n\n\t\t// strtime\n\t\t$archv_finished->strtime->CellCssStyle = \"\"; $archv_finished->strtime->CellCssClass = \"\";\n\t\t$archv_finished->strtime->CellAttrs = array(); $archv_finished->strtime->ViewAttrs = array(); $archv_finished->strtime->EditAttrs = array();\n\n\t\t// strusername\n\t\t$archv_finished->strusername->CellCssStyle = \"\"; $archv_finished->strusername->CellCssClass = \"\";\n\t\t$archv_finished->strusername->CellAttrs = array(); $archv_finished->strusername->ViewAttrs = array(); $archv_finished->strusername->EditAttrs = array();\n\n\t\t// strusereadd\n\t\t$archv_finished->strusereadd->CellCssStyle = \"\"; $archv_finished->strusereadd->CellCssClass = \"\";\n\t\t$archv_finished->strusereadd->CellAttrs = array(); $archv_finished->strusereadd->ViewAttrs = array(); $archv_finished->strusereadd->EditAttrs = array();\n\n\t\t// strcompany\n\t\t$archv_finished->strcompany->CellCssStyle = \"\"; $archv_finished->strcompany->CellCssClass = \"\";\n\t\t$archv_finished->strcompany->CellAttrs = array(); $archv_finished->strcompany->ViewAttrs = array(); $archv_finished->strcompany->EditAttrs = array();\n\n\t\t// strdepartment\n\t\t$archv_finished->strdepartment->CellCssStyle = \"\"; $archv_finished->strdepartment->CellCssClass = \"\";\n\t\t$archv_finished->strdepartment->CellAttrs = array(); $archv_finished->strdepartment->ViewAttrs = array(); $archv_finished->strdepartment->EditAttrs = array();\n\n\t\t// strloc\n\t\t$archv_finished->strloc->CellCssStyle = \"\"; $archv_finished->strloc->CellCssClass = \"\";\n\t\t$archv_finished->strloc->CellAttrs = array(); $archv_finished->strloc->ViewAttrs = array(); $archv_finished->strloc->EditAttrs = array();\n\n\t\t// strposition\n\t\t$archv_finished->strposition->CellCssStyle = \"\"; $archv_finished->strposition->CellCssClass = \"\";\n\t\t$archv_finished->strposition->CellAttrs = array(); $archv_finished->strposition->ViewAttrs = array(); $archv_finished->strposition->EditAttrs = array();\n\n\t\t// strtelephone\n\t\t$archv_finished->strtelephone->CellCssStyle = \"\"; $archv_finished->strtelephone->CellCssClass = \"\";\n\t\t$archv_finished->strtelephone->CellAttrs = array(); $archv_finished->strtelephone->ViewAttrs = array(); $archv_finished->strtelephone->EditAttrs = array();\n\n\t\t// strcostcent\n\t\t$archv_finished->strcostcent->CellCssStyle = \"\"; $archv_finished->strcostcent->CellCssClass = \"\";\n\t\t$archv_finished->strcostcent->CellAttrs = array(); $archv_finished->strcostcent->ViewAttrs = array(); $archv_finished->strcostcent->EditAttrs = array();\n\n\t\t// strsubject\n\t\t$archv_finished->strsubject->CellCssStyle = \"\"; $archv_finished->strsubject->CellCssClass = \"\";\n\t\t$archv_finished->strsubject->CellAttrs = array(); $archv_finished->strsubject->ViewAttrs = array(); $archv_finished->strsubject->EditAttrs = array();\n\n\t\t// strnature\n\t\t$archv_finished->strnature->CellCssStyle = \"\"; $archv_finished->strnature->CellCssClass = \"\";\n\t\t$archv_finished->strnature->CellAttrs = array(); $archv_finished->strnature->ViewAttrs = array(); $archv_finished->strnature->EditAttrs = array();\n\n\t\t// strdescript\n\t\t$archv_finished->strdescript->CellCssStyle = \"\"; $archv_finished->strdescript->CellCssClass = \"\";\n\t\t$archv_finished->strdescript->CellAttrs = array(); $archv_finished->strdescript->ViewAttrs = array(); $archv_finished->strdescript->EditAttrs = array();\n\n\t\t// strarea\n\t\t$archv_finished->strarea->CellCssStyle = \"\"; $archv_finished->strarea->CellCssClass = \"\";\n\t\t$archv_finished->strarea->CellAttrs = array(); $archv_finished->strarea->ViewAttrs = array(); $archv_finished->strarea->EditAttrs = array();\n\n\t\t// strattach\n\t\t$archv_finished->strattach->CellCssStyle = \"\"; $archv_finished->strattach->CellCssClass = \"\";\n\t\t$archv_finished->strattach->CellAttrs = array(); $archv_finished->strattach->ViewAttrs = array(); $archv_finished->strattach->EditAttrs = array();\n\n\t\t// strpriority\n\t\t$archv_finished->strpriority->CellCssStyle = \"\"; $archv_finished->strpriority->CellCssClass = \"\";\n\t\t$archv_finished->strpriority->CellAttrs = array(); $archv_finished->strpriority->ViewAttrs = array(); $archv_finished->strpriority->EditAttrs = array();\n\n\t\t// strduedate\n\t\t$archv_finished->strduedate->CellCssStyle = \"\"; $archv_finished->strduedate->CellCssClass = \"\";\n\t\t$archv_finished->strduedate->CellAttrs = array(); $archv_finished->strduedate->ViewAttrs = array(); $archv_finished->strduedate->EditAttrs = array();\n\n\t\t// strstatus\n\t\t$archv_finished->strstatus->CellCssStyle = \"\"; $archv_finished->strstatus->CellCssClass = \"\";\n\t\t$archv_finished->strstatus->CellAttrs = array(); $archv_finished->strstatus->ViewAttrs = array(); $archv_finished->strstatus->EditAttrs = array();\n\n\t\t// strlastedit\n\t\t$archv_finished->strlastedit->CellCssStyle = \"\"; $archv_finished->strlastedit->CellCssClass = \"\";\n\t\t$archv_finished->strlastedit->CellAttrs = array(); $archv_finished->strlastedit->ViewAttrs = array(); $archv_finished->strlastedit->EditAttrs = array();\n\n\t\t// strcategory\n\t\t$archv_finished->strcategory->CellCssStyle = \"\"; $archv_finished->strcategory->CellCssClass = \"\";\n\t\t$archv_finished->strcategory->CellAttrs = array(); $archv_finished->strcategory->ViewAttrs = array(); $archv_finished->strcategory->EditAttrs = array();\n\n\t\t// strassigned\n\t\t$archv_finished->strassigned->CellCssStyle = \"\"; $archv_finished->strassigned->CellCssClass = \"\";\n\t\t$archv_finished->strassigned->CellAttrs = array(); $archv_finished->strassigned->ViewAttrs = array(); $archv_finished->strassigned->EditAttrs = array();\n\n\t\t// strdatecomplete\n\t\t$archv_finished->strdatecomplete->CellCssStyle = \"\"; $archv_finished->strdatecomplete->CellCssClass = \"\";\n\t\t$archv_finished->strdatecomplete->CellAttrs = array(); $archv_finished->strdatecomplete->ViewAttrs = array(); $archv_finished->strdatecomplete->EditAttrs = array();\n\n\t\t// strwithpr\n\t\t$archv_finished->strwithpr->CellCssStyle = \"\"; $archv_finished->strwithpr->CellCssClass = \"\";\n\t\t$archv_finished->strwithpr->CellAttrs = array(); $archv_finished->strwithpr->ViewAttrs = array(); $archv_finished->strwithpr->EditAttrs = array();\n\n\t\t// strremarks\n\t\t$archv_finished->strremarks->CellCssStyle = \"\"; $archv_finished->strremarks->CellCssClass = \"\";\n\t\t$archv_finished->strremarks->CellAttrs = array(); $archv_finished->strremarks->ViewAttrs = array(); $archv_finished->strremarks->EditAttrs = array();\n\n\t\t// sap_num\n\t\t$archv_finished->sap_num->CellCssStyle = \"\"; $archv_finished->sap_num->CellCssClass = \"\";\n\t\t$archv_finished->sap_num->CellAttrs = array(); $archv_finished->sap_num->ViewAttrs = array(); $archv_finished->sap_num->EditAttrs = array();\n\n\t\t// work_days\n\t\t$archv_finished->work_days->CellCssStyle = \"\"; $archv_finished->work_days->CellCssClass = \"\";\n\t\t$archv_finished->work_days->CellAttrs = array(); $archv_finished->work_days->ViewAttrs = array(); $archv_finished->work_days->EditAttrs = array();\n\t\tif ($archv_finished->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// ID\n\t\t\t$archv_finished->ID->ViewValue = $archv_finished->ID->CurrentValue;\n\t\t\t$archv_finished->ID->CssStyle = \"\";\n\t\t\t$archv_finished->ID->CssClass = \"\";\n\t\t\t$archv_finished->ID->ViewCustomAttributes = \"\";\n\n\t\t\t// strjrfnum\n\t\t\t$archv_finished->strjrfnum->ViewValue = $archv_finished->strjrfnum->CurrentValue;\n\t\t\t$archv_finished->strjrfnum->CssStyle = \"\";\n\t\t\t$archv_finished->strjrfnum->CssClass = \"\";\n\t\t\t$archv_finished->strjrfnum->ViewCustomAttributes = \"\";\n\n\t\t\t// strquarter\n\t\t\t$archv_finished->strquarter->ViewValue = $archv_finished->strquarter->CurrentValue;\n\t\t\t$archv_finished->strquarter->CssStyle = \"\";\n\t\t\t$archv_finished->strquarter->CssClass = \"\";\n\t\t\t$archv_finished->strquarter->ViewCustomAttributes = \"\";\n\n\t\t\t// strmon\n\t\t\t$archv_finished->strmon->ViewValue = $archv_finished->strmon->CurrentValue;\n\t\t\t$archv_finished->strmon->CssStyle = \"\";\n\t\t\t$archv_finished->strmon->CssClass = \"\";\n\t\t\t$archv_finished->strmon->ViewCustomAttributes = \"\";\n\n\t\t\t// stryear\n\t\t\t$archv_finished->stryear->ViewValue = $archv_finished->stryear->CurrentValue;\n\t\t\t$archv_finished->stryear->CssStyle = \"\";\n\t\t\t$archv_finished->stryear->CssClass = \"\";\n\t\t\t$archv_finished->stryear->ViewCustomAttributes = \"\";\n\n\t\t\t// strdate\n\t\t\t$archv_finished->strdate->ViewValue = $archv_finished->strdate->CurrentValue;\n\t\t\t$archv_finished->strdate->CssStyle = \"\";\n\t\t\t$archv_finished->strdate->CssClass = \"\";\n\t\t\t$archv_finished->strdate->ViewCustomAttributes = \"\";\n\n\t\t\t// strtime\n\t\t\t$archv_finished->strtime->ViewValue = $archv_finished->strtime->CurrentValue;\n\t\t\t$archv_finished->strtime->CssStyle = \"\";\n\t\t\t$archv_finished->strtime->CssClass = \"\";\n\t\t\t$archv_finished->strtime->ViewCustomAttributes = \"\";\n\n\t\t\t// strusername\n\t\t\t$archv_finished->strusername->ViewValue = $archv_finished->strusername->CurrentValue;\n\t\t\t$archv_finished->strusername->CssStyle = \"\";\n\t\t\t$archv_finished->strusername->CssClass = \"\";\n\t\t\t$archv_finished->strusername->ViewCustomAttributes = \"\";\n\n\t\t\t// strusereadd\n\t\t\t$archv_finished->strusereadd->ViewValue = $archv_finished->strusereadd->CurrentValue;\n\t\t\t$archv_finished->strusereadd->CssStyle = \"\";\n\t\t\t$archv_finished->strusereadd->CssClass = \"\";\n\t\t\t$archv_finished->strusereadd->ViewCustomAttributes = \"\";\n\n\t\t\t// strcompany\n\t\t\t$archv_finished->strcompany->ViewValue = $archv_finished->strcompany->CurrentValue;\n\t\t\t$archv_finished->strcompany->CssStyle = \"\";\n\t\t\t$archv_finished->strcompany->CssClass = \"\";\n\t\t\t$archv_finished->strcompany->ViewCustomAttributes = \"\";\n\n\t\t\t// strdepartment\n\t\t\t$archv_finished->strdepartment->ViewValue = $archv_finished->strdepartment->CurrentValue;\n\t\t\t$archv_finished->strdepartment->CssStyle = \"\";\n\t\t\t$archv_finished->strdepartment->CssClass = \"\";\n\t\t\t$archv_finished->strdepartment->ViewCustomAttributes = \"\";\n\n\t\t\t// strloc\n\t\t\t$archv_finished->strloc->ViewValue = $archv_finished->strloc->CurrentValue;\n\t\t\t$archv_finished->strloc->CssStyle = \"\";\n\t\t\t$archv_finished->strloc->CssClass = \"\";\n\t\t\t$archv_finished->strloc->ViewCustomAttributes = \"\";\n\n\t\t\t// strposition\n\t\t\t$archv_finished->strposition->ViewValue = $archv_finished->strposition->CurrentValue;\n\t\t\t$archv_finished->strposition->CssStyle = \"\";\n\t\t\t$archv_finished->strposition->CssClass = \"\";\n\t\t\t$archv_finished->strposition->ViewCustomAttributes = \"\";\n\n\t\t\t// strtelephone\n\t\t\t$archv_finished->strtelephone->ViewValue = $archv_finished->strtelephone->CurrentValue;\n\t\t\t$archv_finished->strtelephone->CssStyle = \"\";\n\t\t\t$archv_finished->strtelephone->CssClass = \"\";\n\t\t\t$archv_finished->strtelephone->ViewCustomAttributes = \"\";\n\n\t\t\t// strcostcent\n\t\t\t$archv_finished->strcostcent->ViewValue = $archv_finished->strcostcent->CurrentValue;\n\t\t\t$archv_finished->strcostcent->CssStyle = \"\";\n\t\t\t$archv_finished->strcostcent->CssClass = \"\";\n\t\t\t$archv_finished->strcostcent->ViewCustomAttributes = \"\";\n\n\t\t\t// strsubject\n\t\t\t$archv_finished->strsubject->ViewValue = $archv_finished->strsubject->CurrentValue;\n\t\t\t$archv_finished->strsubject->CssStyle = \"\";\n\t\t\t$archv_finished->strsubject->CssClass = \"\";\n\t\t\t$archv_finished->strsubject->ViewCustomAttributes = \"\";\n\n\t\t\t// strnature\n\t\t\t$archv_finished->strnature->ViewValue = $archv_finished->strnature->CurrentValue;\n\t\t\t$archv_finished->strnature->CssStyle = \"\";\n\t\t\t$archv_finished->strnature->CssClass = \"\";\n\t\t\t$archv_finished->strnature->ViewCustomAttributes = \"\";\n\n\t\t\t// strdescript\n\t\t\t$archv_finished->strdescript->ViewValue = $archv_finished->strdescript->CurrentValue;\n\t\t\t$archv_finished->strdescript->CssStyle = \"\";\n\t\t\t$archv_finished->strdescript->CssClass = \"\";\n\t\t\t$archv_finished->strdescript->ViewCustomAttributes = \"\";\n\n\t\t\t// strarea\n\t\t\t$archv_finished->strarea->ViewValue = $archv_finished->strarea->CurrentValue;\n\t\t\t$archv_finished->strarea->CssStyle = \"\";\n\t\t\t$archv_finished->strarea->CssClass = \"\";\n\t\t\t$archv_finished->strarea->ViewCustomAttributes = \"\";\n\n\t\t\t// strattach\n\t\t\t$archv_finished->strattach->ViewValue = $archv_finished->strattach->CurrentValue;\n\t\t\t$archv_finished->strattach->CssStyle = \"\";\n\t\t\t$archv_finished->strattach->CssClass = \"\";\n\t\t\t$archv_finished->strattach->ViewCustomAttributes = \"\";\n\n\t\t\t// strpriority\n\t\t\t$archv_finished->strpriority->ViewValue = $archv_finished->strpriority->CurrentValue;\n\t\t\t$archv_finished->strpriority->CssStyle = \"\";\n\t\t\t$archv_finished->strpriority->CssClass = \"\";\n\t\t\t$archv_finished->strpriority->ViewCustomAttributes = \"\";\n\n\t\t\t// strduedate\n\t\t\t$archv_finished->strduedate->ViewValue = $archv_finished->strduedate->CurrentValue;\n\t\t\t$archv_finished->strduedate->CssStyle = \"\";\n\t\t\t$archv_finished->strduedate->CssClass = \"\";\n\t\t\t$archv_finished->strduedate->ViewCustomAttributes = \"\";\n\n\t\t\t// strstatus\n\t\t\t$archv_finished->strstatus->ViewValue = $archv_finished->strstatus->CurrentValue;\n\t\t\t$archv_finished->strstatus->CssStyle = \"\";\n\t\t\t$archv_finished->strstatus->CssClass = \"\";\n\t\t\t$archv_finished->strstatus->ViewCustomAttributes = \"\";\n\n\t\t\t// strlastedit\n\t\t\t$archv_finished->strlastedit->ViewValue = $archv_finished->strlastedit->CurrentValue;\n\t\t\t$archv_finished->strlastedit->CssStyle = \"\";\n\t\t\t$archv_finished->strlastedit->CssClass = \"\";\n\t\t\t$archv_finished->strlastedit->ViewCustomAttributes = \"\";\n\n\t\t\t// strcategory\n\t\t\t$archv_finished->strcategory->ViewValue = $archv_finished->strcategory->CurrentValue;\n\t\t\t$archv_finished->strcategory->CssStyle = \"\";\n\t\t\t$archv_finished->strcategory->CssClass = \"\";\n\t\t\t$archv_finished->strcategory->ViewCustomAttributes = \"\";\n\n\t\t\t// strassigned\n\t\t\t$archv_finished->strassigned->ViewValue = $archv_finished->strassigned->CurrentValue;\n\t\t\t$archv_finished->strassigned->CssStyle = \"\";\n\t\t\t$archv_finished->strassigned->CssClass = \"\";\n\t\t\t$archv_finished->strassigned->ViewCustomAttributes = \"\";\n\n\t\t\t// strdatecomplete\n\t\t\t$archv_finished->strdatecomplete->ViewValue = $archv_finished->strdatecomplete->CurrentValue;\n\t\t\t$archv_finished->strdatecomplete->CssStyle = \"\";\n\t\t\t$archv_finished->strdatecomplete->CssClass = \"\";\n\t\t\t$archv_finished->strdatecomplete->ViewCustomAttributes = \"\";\n\n\t\t\t// strwithpr\n\t\t\t$archv_finished->strwithpr->ViewValue = $archv_finished->strwithpr->CurrentValue;\n\t\t\t$archv_finished->strwithpr->CssStyle = \"\";\n\t\t\t$archv_finished->strwithpr->CssClass = \"\";\n\t\t\t$archv_finished->strwithpr->ViewCustomAttributes = \"\";\n\n\t\t\t// strremarks\n\t\t\t$archv_finished->strremarks->ViewValue = $archv_finished->strremarks->CurrentValue;\n\t\t\t$archv_finished->strremarks->CssStyle = \"\";\n\t\t\t$archv_finished->strremarks->CssClass = \"\";\n\t\t\t$archv_finished->strremarks->ViewCustomAttributes = \"\";\n\n\t\t\t// sap_num\n\t\t\t$archv_finished->sap_num->ViewValue = $archv_finished->sap_num->CurrentValue;\n\t\t\t$archv_finished->sap_num->CssStyle = \"\";\n\t\t\t$archv_finished->sap_num->CssClass = \"\";\n\t\t\t$archv_finished->sap_num->ViewCustomAttributes = \"\";\n\n\t\t\t// work_days\n\t\t\t$archv_finished->work_days->ViewValue = $archv_finished->work_days->CurrentValue;\n\t\t\t$archv_finished->work_days->CssStyle = \"\";\n\t\t\t$archv_finished->work_days->CssClass = \"\";\n\t\t\t$archv_finished->work_days->ViewCustomAttributes = \"\";\n\n\t\t\t// ID\n\t\t\t$archv_finished->ID->HrefValue = \"\";\n\t\t\t$archv_finished->ID->TooltipValue = \"\";\n\n\t\t\t// strjrfnum\n\t\t\t$archv_finished->strjrfnum->HrefValue = \"\";\n\t\t\t$archv_finished->strjrfnum->TooltipValue = \"\";\n\n\t\t\t// strquarter\n\t\t\t$archv_finished->strquarter->HrefValue = \"\";\n\t\t\t$archv_finished->strquarter->TooltipValue = \"\";\n\n\t\t\t// strmon\n\t\t\t$archv_finished->strmon->HrefValue = \"\";\n\t\t\t$archv_finished->strmon->TooltipValue = \"\";\n\n\t\t\t// stryear\n\t\t\t$archv_finished->stryear->HrefValue = \"\";\n\t\t\t$archv_finished->stryear->TooltipValue = \"\";\n\n\t\t\t// strdate\n\t\t\t$archv_finished->strdate->HrefValue = \"\";\n\t\t\t$archv_finished->strdate->TooltipValue = \"\";\n\n\t\t\t// strtime\n\t\t\t$archv_finished->strtime->HrefValue = \"\";\n\t\t\t$archv_finished->strtime->TooltipValue = \"\";\n\n\t\t\t// strusername\n\t\t\t$archv_finished->strusername->HrefValue = \"\";\n\t\t\t$archv_finished->strusername->TooltipValue = \"\";\n\n\t\t\t// strusereadd\n\t\t\t$archv_finished->strusereadd->HrefValue = \"\";\n\t\t\t$archv_finished->strusereadd->TooltipValue = \"\";\n\n\t\t\t// strcompany\n\t\t\t$archv_finished->strcompany->HrefValue = \"\";\n\t\t\t$archv_finished->strcompany->TooltipValue = \"\";\n\n\t\t\t// strdepartment\n\t\t\t$archv_finished->strdepartment->HrefValue = \"\";\n\t\t\t$archv_finished->strdepartment->TooltipValue = \"\";\n\n\t\t\t// strloc\n\t\t\t$archv_finished->strloc->HrefValue = \"\";\n\t\t\t$archv_finished->strloc->TooltipValue = \"\";\n\n\t\t\t// strposition\n\t\t\t$archv_finished->strposition->HrefValue = \"\";\n\t\t\t$archv_finished->strposition->TooltipValue = \"\";\n\n\t\t\t// strtelephone\n\t\t\t$archv_finished->strtelephone->HrefValue = \"\";\n\t\t\t$archv_finished->strtelephone->TooltipValue = \"\";\n\n\t\t\t// strcostcent\n\t\t\t$archv_finished->strcostcent->HrefValue = \"\";\n\t\t\t$archv_finished->strcostcent->TooltipValue = \"\";\n\n\t\t\t// strsubject\n\t\t\t$archv_finished->strsubject->HrefValue = \"\";\n\t\t\t$archv_finished->strsubject->TooltipValue = \"\";\n\n\t\t\t// strnature\n\t\t\t$archv_finished->strnature->HrefValue = \"\";\n\t\t\t$archv_finished->strnature->TooltipValue = \"\";\n\n\t\t\t// strdescript\n\t\t\t$archv_finished->strdescript->HrefValue = \"\";\n\t\t\t$archv_finished->strdescript->TooltipValue = \"\";\n\n\t\t\t// strarea\n\t\t\t$archv_finished->strarea->HrefValue = \"\";\n\t\t\t$archv_finished->strarea->TooltipValue = \"\";\n\n\t\t\t// strattach\n\t\t\t$archv_finished->strattach->HrefValue = \"\";\n\t\t\t$archv_finished->strattach->TooltipValue = \"\";\n\n\t\t\t// strpriority\n\t\t\t$archv_finished->strpriority->HrefValue = \"\";\n\t\t\t$archv_finished->strpriority->TooltipValue = \"\";\n\n\t\t\t// strduedate\n\t\t\t$archv_finished->strduedate->HrefValue = \"\";\n\t\t\t$archv_finished->strduedate->TooltipValue = \"\";\n\n\t\t\t// strstatus\n\t\t\t$archv_finished->strstatus->HrefValue = \"\";\n\t\t\t$archv_finished->strstatus->TooltipValue = \"\";\n\n\t\t\t// strlastedit\n\t\t\t$archv_finished->strlastedit->HrefValue = \"\";\n\t\t\t$archv_finished->strlastedit->TooltipValue = \"\";\n\n\t\t\t// strcategory\n\t\t\t$archv_finished->strcategory->HrefValue = \"\";\n\t\t\t$archv_finished->strcategory->TooltipValue = \"\";\n\n\t\t\t// strassigned\n\t\t\t$archv_finished->strassigned->HrefValue = \"\";\n\t\t\t$archv_finished->strassigned->TooltipValue = \"\";\n\n\t\t\t// strdatecomplete\n\t\t\t$archv_finished->strdatecomplete->HrefValue = \"\";\n\t\t\t$archv_finished->strdatecomplete->TooltipValue = \"\";\n\n\t\t\t// strwithpr\n\t\t\t$archv_finished->strwithpr->HrefValue = \"\";\n\t\t\t$archv_finished->strwithpr->TooltipValue = \"\";\n\n\t\t\t// strremarks\n\t\t\t$archv_finished->strremarks->HrefValue = \"\";\n\t\t\t$archv_finished->strremarks->TooltipValue = \"\";\n\n\t\t\t// sap_num\n\t\t\t$archv_finished->sap_num->HrefValue = \"\";\n\t\t\t$archv_finished->sap_num->TooltipValue = \"\";\n\n\t\t\t// work_days\n\t\t\t$archv_finished->work_days->HrefValue = \"\";\n\t\t\t$archv_finished->work_days->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($archv_finished->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$archv_finished->Row_Rendered();\n\t}", "function drawRow($color, $name, $steamID, $ipAddress, $reason, $group, $enforcer, $duration, $remaining) {\r\n\t\t\t\techo(\"<tr align = 'center' bgcolor = '$color'>\");\r\n\t\t\t\t\techo(\"<td>$name</td>\");\r\n\t\t\t\t\techo(\"<td>$steamID</td>\");\r\n\t\t\t\t\techo(\"<td>$ipAddress</td>\");\r\n\t\t\t\t\techo(\"<td>$reason</td>\");\r\n\t\t\t\t\techo(\"<td>$group</td>\");\r\n\t\t\t\t\techo(\"<td>$enforcer</td>\");\r\n\t\t\t\t\techo(\"<td>$duration</td>\");\r\n\t\t\t\t\techo(\"<td>$remaining</td>\");\r\n\t\t\t\techo(\"</tr>\");\r\n\t\t\t}", "protected function renderTableRow(string $tdClass, int $op, string $line): string\n {\n return\n '<tr data-type=\"' . self::SYMBOL_MAP[$op] . '\">' .\n '<td class=\"' . $tdClass . '\">' . $line . '</td>' .\n '</tr>';\n }", "public function get_row();", "public function getNoteContentFromRow($tableName,$row){\n\t\tglobal $TCA;\n\n\t\t$htmlContent = array('<table>');\n\t\t$htmlContent[] = $this->_getNoteTableRow('UID',$row['uid']); unset($row['uid']);\n\n\t\t$col = 'crdate';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Created');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) ); unset($row[$col]);\n\n\t\t$col = 'cruser_id';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Created by');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getUserById($row[$col]) ); unset($row[$col]);\n\n\t\t$col = 'tstamp';\n\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Last update');\n\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) ); unset($row[$col]);\n\n\n\t\tif( isset($row['sys_language_uid']) ){\n\t\t\t$col = 'sys_language_uid';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Language ID');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,'('.$row[$col].') '.$this->getSysLanguageDetails($row[$col],'title').' <img src=\"'.$this->getBEHttpHost().$this->getSysLanguageDetails($row[$col],'flag').'\"/>' );\n\t\t} unset($row[$col]);\n\n\t\tif( isset($row['starttime']) && $row['starttime'] > 0 ){\n\t\t\t$col = 'starttime';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Starttime');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) );\n\t\t}\n\t\tunset($row['starttime']);\n\t\tif( isset($row['endtime']) && $row['endtime'] > 0 ){\n\t\t\t$col = 'endtime';\n\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$col,'Endtime');\n\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$this->getDateTime($row[$col]) );\n\t\t}\n\t\tunset($row['endtime']);\n\t\tunset($row['uid']);\n\t\tunset($row['pid']);\n\t\tunset($row['titInt0']);\n\t\tunset($row['title']);\n\t\tunset($row['doktype']);\n\t\tunset($row['shortcut_mode']);\n\t\tunset($row['module']);\n\t\tunset($row['deleted']);\n\t\tunset($row['hidden']);\n\t\tunset($row['disable']);\n\n\t\t/* list user defined columsn for a table listet in a sysfolder */\n\t\tif( $tableName <> '' && count($row)>0 ){\n\t\t\n\t\t\t$bodyLength = isset($this->settings['SysFolderContentListTextMaxLength']) ? (int)$this->settings['SysFolderContentListTextMaxLength'] : 250;\n\n\t\t\tforeach($row as $colName=>$colVal){\n\t\t\t\t$noLtGtReplace = 0;\n\t\t\t\n\t\t\t\tif( $colVal <> '' ){\n\t\t\t\t\t$label = $this->_getNoteTableRowLabel($tableName,$colName,$colName);\n\t\t\t\t\t$tcaEval = isset($TCA[$tableName]['columns'][$colName]['config']['eval']) ? $TCA[$tableName]['columns'][$colName]['config']['eval'] : '';\n\t\t\t\t\t$tcaType = isset($TCA[$tableName]['columns'][$colName]) ? strtolower($TCA[$tableName]['columns'][$colName]['config']['type']) : 'text';\n\t\t\t\t\t\n\t\t\t\t\t/*<TemplaVoila>*/\n\t\t\t\t\tif( $tableName == 'tx_templavoila_tmplobj' && in_array($colName,array('fileref_md5','fileref','datastructure')) ){\n\t\t\t\t\t\n\t\t\t\t\t\tif( $colName=='fileref_md5' && isset($row['fileref_md5']) && \n\t\t\t\t\t\t\tisset($row['fileref']) && file_exists(PATH_site.$row['fileref']) ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$currentMD5 = @md5_file(PATH_site.$row['fileref']);\n\t\t\t\t\t\t\tif($currentMD5 <> $row['fileref_md5'] ){\n\t\t\t\t\t\t\t\t$label .= $this->convertLTGT(' <img src=\"'.$this->getBEHttpHost().'typo3/sysext/t3skin/icons/gfx/icon_warning.gif\"/>');\n\t\t\t\t\t\t\t\t$colVal = ' New: '.$currentMD5.'<br />Old: '.$colVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}elseif($colName=='datastructure' || $colName=='fileref'){\n\t\t\t\t\t\t\t$colVal = $this->_value2ATag($colVal);\n\t\t\t\t\t\t}\n\t\t\t\t\t}/*</TemplaVoila>*/\n\t\t\t\t\t\n\t\t\t\t\t/*<Templates>*/\n\t\t\t\t\telseif( ($tableName == 'sys_template' || $tableName == 'pages' ) && \n\t\t\t\t\t\tin_array($colName,array('include_static_file','constants','config','TSconfig')) ){\n\t\t\t\t\t\t/* @TODO better implementing of tables which has TS column */\n\t\t\t\t\t\tif( $colName == 'include_static_file' ){\n\t\t\t\t\t\t\t$colVal = implode('<br />',explode(',',$colVal));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( $colName == 'constants' || $colName == 'config' || $colName == 'TSconfig' ){\n\t\t\t\t\t\t\t$noLtGtReplace = 1;\n\n\t\t\t\t\t\t\t/* @todo link external TS files via eID ... still to think about it ...\n\t\t\t\t\t\t\t$colVal = Tx_Typo3mind_Utility_Helpers::TSReplaceFileLinkWithHref($colVal); \n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\t$colVal = $this->convertLTGT('<pre>').trim($colVal).$this->convertLTGT('</pre>');\n\t\t\t\t\t\t}\n\t\t\t\t\t}/*</Templates>*/\n\t\t\t\t\t\n\t\t\t\t\t/*<default values>*/\n\t\t\t\t\telseif( stristr($tcaEval,'date')!==false ){ $colVal = $this->getDateTime($colVal); }\n\t\t\t\t\telseif( $tcaType == 'text' || $tcaType == 'input' ){\n\t\t\t\t\t\t/* we can't relay on the user, that all HTML is XML valid ... */\n\t\t\t\t\t\t$colVal = strip_tags($colVal);\n\t\t\t\t\t\tif( strlen($colVal) > $bodyLength ){ $colVal = preg_replace('/^(.{'.$bodyLength.'}\\S*).*$/s','\\\\1 ...',$colVal); }\n\t\t\t\t\t\t$colVal = preg_replace('~[\\r\\n]+~',\"\\n\",$colVal);\n\t\t\t\t\t\t$colVal = nl2br($colVal);\n\t\t\t\t\t}\n\t\t\t\t\t/*</default values>*/\n\t\t\t\t\t \n\t\t\t\t\t$htmlContent[] = $this->_getNoteTableRow($label,$colVal,$noLtGtReplace );\n\t\t\t\t}/*endif*/\n\t\t\t}/*endforeach*/\n\n\t\t}/*endif $tableName*/\n\n\t\t$htmlContent[] = '</table>';\n\t\treturn implode('',$htmlContent);\n\t}", "function table_begin($p_headrow, $p_class = '', $p_tr_attr = '', $p_th_attr = array()){\n\techo '<table class=\"table ' . $p_class . '\">';\n\techo '<thead>';\n\techo '<tr ' . $p_tr_attr . '>';\n\t\n\tfor($t_i=0; $t_i<count($p_headrow); $t_i++)\n\t\techo '<th ' . (isset($p_th_attr[$t_i]) ? $p_th_attr[$t_i] : '') . '>' . $p_headrow[$t_i] . '</th>';\n\n\techo '</tr>';\n\techo '</thead>';\n}", "function html_table($data) {\r\n\r\n $row = mysqli_fetch_assoc($data);\r\n $rows = array();\r\n array_push($rows, $row);\r\n $attributes = array_keys($row);\r\n\r\n if(mysqli_num_rows($data) > 0) {\r\n while($row = mysqli_fetch_assoc($data)) {\r\n array_push($rows, $row);\r\n }\r\n }\r\n\r\n print(\"<table>\\n\");\r\n print(\"<tr>\\n\");\r\n for($i = 0; $i < count($attributes); $i++) {\r\n print(\"<th>{$attributes[$i]}</th>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n for($j = 0; $j < count($rows); $j++) {\r\n print(\"<tr>\\n\");\r\n foreach($attributes as $attribute) {\r\n print(\"<td>{$rows[$j][$attribute]}</td>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n }\r\n\r\n print(\"</table>\\n\");\r\n\r\n}", "public function htmlTemplate()\n\t{\t\n\t\treturn 'stock_row';\n\t}", "public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }", "public function write() {\n\t\t$table = '<table '.$this->addHTML.'>';\n\t\tif(!is_null($this->tableInfo['head'])) {\n\t\t\t$table .= '<thead><tr>';\n\t\t\tforeach($this->tableInfo['head'] as $value) {\n\t\t\t\t$table .= '<th>'.$value.'</th>';\n\t\t\t}\n\t\t\tif($this->crud) {\n\t\t\t\t\t$table .= '<th>Options</th>';\t\n\t\t\t}\n\t\t\t$table .= '</tr></thead>';\n\t\t}\n\t\t$table .= '<tbody>';\n\t\tif(isset($this->tableInfo['rows'])) {\n\t\t\tforeach($this->tableInfo['rows'] as $row) {\n\t\t\t\t$table .= '<tr>';\n\t\t\t\tforeach($row as $key => $column) {\n\t\t\t\t\tif(($key != $this->crud_id) OR $this->show_crud_id) {\n\t\t\t\t\t\t$table .= '<td>'.$column.'</td>';\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($this->crud && isset($row[$this->crud_id])) {\n\t\t\t\t\t$table .= '<td>';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Details/'.$row[$this->crud_id].'\" title=\"Details\"><i class=\"fa fa-search\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Edit/'.$row[$this->crud_id].'\" title=\"Edit\"><i class=\"fa fa-wrench\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Delete/'.$row[$this->crud_id].'\" title=\"Delete\"><i class=\"fa fa-trash\"></i></a>';\n\t\t\t\t\t$table .= '</td>';\n\t\t\t\t}\n\t\t\t\t$table .= '</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$table .= '<tr>';\n\t\t\t$table .= '<td>';\n\t\t\t$table .= 'No Data to show here.';\n\t\t\t$table .= '</td>';\n\t\t\t$table .= '</tr>';\t\n\t\t}\n\t\t\n\t\t$table .= '</tbody></table>';\n\t\treturn $table;\n\t}", "function multiTableRow($row_attrs, $cell_data, $istitle = false) {\n\t\t$ap = html_ap();\n\t\t(isset($row_attrs['class'])) ? $row_attrs['class'] .= ' ff' : $row_attrs['class'] = 'ff';\n\t\tif ( $istitle ) {\n\t\t\t$row_attrs['class'] .= ' align-center';\n\t\t}\n\t\t$return = html_ao('tr', $row_attrs);\n\t\tfor ( $c = 0; $c < count($cell_data); $c++ ) {\n\t\t\t$locAp = html_ap();\n\t\t\t$cellAttrs = array();\n\t\t\tforeach (array_slice($cell_data[$c],1) as $k => $v) {\n\t\t\t\t$cellAttrs[$k] = $v;\n\t\t\t}\n\t\t\t(isset($cellAttrs['class'])) ? $cellAttrs['class'] .= ' ff' : $cellAttrs['class'] = 'ff';\n\t\t\t$return .= html_ao('td', $cellAttrs);\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ao('strong');\n\t\t\t}\n\t\t\t$return .= $cell_data[$c][0];\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ac(html_ap() -1);\n\t\t\t}\n\t\t\t$return .= html_ac($locAp);\n\t\t}\n\t\t$return .= html_ac($ap);\n\t\treturn $return;\n\t}", "function table($level){\n\t\treturn \"<div class=\\\"word quoted final\\\"><span>\".htmlspecialchars($this->id).\"</span></div>\";\t\n\t}", "function makeRow($data, $spalten, $erstefrei=\"frei\"){\n // $erstefrei = 1 -> erste Spalte ist leer\n\n $row = '<tr>';\n if($erstefrei==\"frei\")\n $row = $row.'<td class=\"wochenplan\">&nbsp;</td>';\n else\n $row = $row.'<td class=\"wochenplan\">'.$erstefrei.'</td>';\n for($i=0;$i<$spalten; $i++)\n $row = $row.'<td class=\"wochenplan\">'.$data[$i].'</td>';\n $row = $row.'</tr>';\n return $row;\n }", "function RenderRow() {\n\t\tglobal $conn, $Security, $patient_detail;\n\n\t\t// Call Row_Rendering event\n\t\t$patient_detail->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// DetailNo\n\n\t\t$patient_detail->DetailNo->CellCssStyle = \"\";\n\t\t$patient_detail->DetailNo->CellCssClass = \"\";\n\n\t\t// StudyID\n\t\t$patient_detail->StudyID->CellCssStyle = \"\";\n\t\t$patient_detail->StudyID->CellCssClass = \"\";\n\n\t\t// PatientID\n\t\t$patient_detail->PatientID->CellCssStyle = \"\";\n\t\t$patient_detail->PatientID->CellCssClass = \"\";\n\n\t\t// StudyDate\n\t\t$patient_detail->StudyDate->CellCssStyle = \"\";\n\t\t$patient_detail->StudyDate->CellCssClass = \"\";\n\n\t\t// StudyTime\n\t\t$patient_detail->StudyTime->CellCssStyle = \"\";\n\t\t$patient_detail->StudyTime->CellCssClass = \"\";\n\n\t\t// Modality\n\t\t$patient_detail->Modality->CellCssStyle = \"\";\n\t\t$patient_detail->Modality->CellCssClass = \"\";\n\n\t\t// BodyPartExamined\n\t\t$patient_detail->BodyPartExamined->CellCssStyle = \"\";\n\t\t$patient_detail->BodyPartExamined->CellCssClass = \"\";\n\n\t\t// ProtocolName\n\t\t$patient_detail->ProtocolName->CellCssStyle = \"\";\n\t\t$patient_detail->ProtocolName->CellCssClass = \"\";\n\n\t\t// Status\n\t\t$patient_detail->Status->CellCssStyle = \"\";\n\t\t$patient_detail->Status->CellCssClass = \"\";\n\t\tif ($patient_detail->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// DetailNo\n\t\t\t$patient_detail->DetailNo->ViewValue = $patient_detail->DetailNo->CurrentValue;\n\t\t\t$patient_detail->DetailNo->CssStyle = \"\";\n\t\t\t$patient_detail->DetailNo->CssClass = \"\";\n\t\t\t$patient_detail->DetailNo->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyID\n\t\t\t$patient_detail->StudyID->ViewValue = $patient_detail->StudyID->CurrentValue;\n\t\t\t$patient_detail->StudyID->CssStyle = \"\";\n\t\t\t$patient_detail->StudyID->CssClass = \"\";\n\t\t\t$patient_detail->StudyID->ViewCustomAttributes = \"\";\n\n\t\t\t// PatientID\n\t\t\t$patient_detail->PatientID->ViewValue = $patient_detail->PatientID->CurrentValue;\n\t\t\t$patient_detail->PatientID->CssStyle = \"\";\n\t\t\t$patient_detail->PatientID->CssClass = \"\";\n\t\t\t$patient_detail->PatientID->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyDate\n\t\t\t$patient_detail->StudyDate->ViewValue = $patient_detail->StudyDate->CurrentValue;\n\t\t\t$patient_detail->StudyDate->ViewValue = ew_FormatDateTime($patient_detail->StudyDate->ViewValue, 5);\n\t\t\t$patient_detail->StudyDate->CssStyle = \"\";\n\t\t\t$patient_detail->StudyDate->CssClass = \"\";\n\t\t\t$patient_detail->StudyDate->ViewCustomAttributes = \"\";\n\n\t\t\t// ContentDate\n\t\t\t$patient_detail->ContentDate->ViewValue = $patient_detail->ContentDate->CurrentValue;\n\t\t\t$patient_detail->ContentDate->ViewValue = ew_FormatDateTime($patient_detail->ContentDate->ViewValue, 5);\n\t\t\t$patient_detail->ContentDate->CssStyle = \"\";\n\t\t\t$patient_detail->ContentDate->CssClass = \"\";\n\t\t\t$patient_detail->ContentDate->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyTime\n\t\t\t$patient_detail->StudyTime->ViewValue = $patient_detail->StudyTime->CurrentValue;\n\t\t\t$patient_detail->StudyTime->ViewValue = ew_FormatDateTime($patient_detail->StudyTime->ViewValue, 4);\n\t\t\t$patient_detail->StudyTime->CssStyle = \"\";\n\t\t\t$patient_detail->StudyTime->CssClass = \"\";\n\t\t\t$patient_detail->StudyTime->ViewCustomAttributes = \"\";\n\n\t\t\t// ContentTime\n\t\t\t$patient_detail->ContentTime->ViewValue = $patient_detail->ContentTime->CurrentValue;\n\t\t\t$patient_detail->ContentTime->ViewValue = ew_FormatDateTime($patient_detail->ContentTime->ViewValue, 4);\n\t\t\t$patient_detail->ContentTime->CssStyle = \"\";\n\t\t\t$patient_detail->ContentTime->CssClass = \"\";\n\t\t\t$patient_detail->ContentTime->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionName\n\t\t\t$patient_detail->InstitutionName->ViewValue = $patient_detail->InstitutionName->CurrentValue;\n\t\t\t$patient_detail->InstitutionName->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionName->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionName->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionAddress\n\t\t\t$patient_detail->InstitutionAddress->ViewValue = $patient_detail->InstitutionAddress->CurrentValue;\n\t\t\t$patient_detail->InstitutionAddress->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionAddress->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionAddress->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionDepartmentName\n\t\t\t$patient_detail->InstitutionDepartmentName->ViewValue = $patient_detail->InstitutionDepartmentName->CurrentValue;\n\t\t\t$patient_detail->InstitutionDepartmentName->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionDepartmentName->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionDepartmentName->ViewCustomAttributes = \"\";\n\n\t\t\t// Modality\n\t\t\t$patient_detail->Modality->ViewValue = $patient_detail->Modality->CurrentValue;\n\t\t\t$patient_detail->Modality->CssStyle = \"\";\n\t\t\t$patient_detail->Modality->CssClass = \"\";\n\t\t\t$patient_detail->Modality->ViewCustomAttributes = \"\";\n\n\t\t\t// OperatorName\n\t\t\t$patient_detail->OperatorName->ViewValue = $patient_detail->OperatorName->CurrentValue;\n\t\t\t$patient_detail->OperatorName->CssStyle = \"\";\n\t\t\t$patient_detail->OperatorName->CssClass = \"\";\n\t\t\t$patient_detail->OperatorName->ViewCustomAttributes = \"\";\n\n\t\t\t// Manufacturer\n\t\t\t$patient_detail->Manufacturer->ViewValue = $patient_detail->Manufacturer->CurrentValue;\n\t\t\t$patient_detail->Manufacturer->CssStyle = \"\";\n\t\t\t$patient_detail->Manufacturer->CssClass = \"\";\n\t\t\t$patient_detail->Manufacturer->ViewCustomAttributes = \"\";\n\n\t\t\t// BodyPartExamined\n\t\t\t$patient_detail->BodyPartExamined->ViewValue = $patient_detail->BodyPartExamined->CurrentValue;\n\t\t\t$patient_detail->BodyPartExamined->CssStyle = \"\";\n\t\t\t$patient_detail->BodyPartExamined->CssClass = \"\";\n\t\t\t$patient_detail->BodyPartExamined->ViewCustomAttributes = \"\";\n\n\t\t\t// ProtocolName\n\t\t\t$patient_detail->ProtocolName->ViewValue = $patient_detail->ProtocolName->CurrentValue;\n\t\t\t$patient_detail->ProtocolName->CssStyle = \"\";\n\t\t\t$patient_detail->ProtocolName->CssClass = \"\";\n\t\t\t$patient_detail->ProtocolName->ViewCustomAttributes = \"\";\n\n\t\t\t// AccessionNumber\n\t\t\t$patient_detail->AccessionNumber->ViewValue = $patient_detail->AccessionNumber->CurrentValue;\n\t\t\t$patient_detail->AccessionNumber->CssStyle = \"\";\n\t\t\t$patient_detail->AccessionNumber->CssClass = \"\";\n\t\t\t$patient_detail->AccessionNumber->ViewCustomAttributes = \"\";\n\n\t\t\t// InstanceNumber\n\t\t\t$patient_detail->InstanceNumber->ViewValue = $patient_detail->InstanceNumber->CurrentValue;\n\t\t\t$patient_detail->InstanceNumber->CssStyle = \"\";\n\t\t\t$patient_detail->InstanceNumber->CssClass = \"\";\n\t\t\t$patient_detail->InstanceNumber->ViewCustomAttributes = \"\";\n\n\t\t\t// Status\n\t\t\t$patient_detail->Status->ViewValue = $patient_detail->Status->CurrentValue;\n\t\t\t$patient_detail->Status->CssStyle = \"\";\n\t\t\t$patient_detail->Status->CssClass = \"\";\n\t\t\t$patient_detail->Status->ViewCustomAttributes = \"\";\n\n\t\t\t// DetailNo\n\t\t\t$patient_detail->DetailNo->HrefValue = \"\";\n\n\t\t\t// StudyID\n\t\t\t$patient_detail->StudyID->HrefValue = \"\";\n\n\t\t\t// PatientID\n\t\t\t$patient_detail->PatientID->HrefValue = \"\";\n\n\t\t\t// StudyDate\n\t\t\t$patient_detail->StudyDate->HrefValue = \"\";\n\n\t\t\t// StudyTime\n\t\t\t$patient_detail->StudyTime->HrefValue = \"\";\n\n\t\t\t// Modality\n\t\t\t$patient_detail->Modality->HrefValue = \"\";\n\n\t\t\t// BodyPartExamined\n\t\t\t$patient_detail->BodyPartExamined->HrefValue = \"\";\n\n\t\t\t// ProtocolName\n\t\t\t$patient_detail->ProtocolName->HrefValue = \"\";\n\n\t\t\t// Status\n\t\t\t$patient_detail->Status->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$patient_detail->Row_Rendered();\n\t}", "public function renderTableRow($model, $key, $index)\n {\n $cells = [];\n /* @var $column Column */\n foreach ($this->columns as $column) {\n $cells[] = $column->renderDataCell($model, $key, $index);\n }\n if ($this->rowOptions instanceof Closure) {\n $options = call_user_func($this->rowOptions, $model, $key, $index, $this);\n } else {\n $options = $this->rowOptions;\n }\n $options['data-key'] = is_array($key) ? json_encode($key) : (string) $key;\n\n return Html::tag('tr', implode('', $cells), $options);\n }", "function row($lebel, $content, $contentExists = false) {\n\t\tif ($contentExists == true) {\n\t\t\tif (!empty($contentExists)) {\n\t\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t}\n\t}", "abstract public function getRow();", "abstract public function getRow();", "function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}", "function RenderRow() {\n\t\tglobal $conn, $Security, $patient_detail;\n\n\t\t// Call Row_Rendering event\n\t\t$patient_detail->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// DetailNo\n\n\t\t$patient_detail->DetailNo->CellCssStyle = \"\";\n\t\t$patient_detail->DetailNo->CellCssClass = \"\";\n\n\t\t// StudyID\n\t\t$patient_detail->StudyID->CellCssStyle = \"\";\n\t\t$patient_detail->StudyID->CellCssClass = \"\";\n\n\t\t// PatientID\n\t\t$patient_detail->PatientID->CellCssStyle = \"\";\n\t\t$patient_detail->PatientID->CellCssClass = \"\";\n\n\t\t// StudyDate\n\t\t$patient_detail->StudyDate->CellCssStyle = \"\";\n\t\t$patient_detail->StudyDate->CellCssClass = \"\";\n\n\t\t// ContentDate\n\t\t$patient_detail->ContentDate->CellCssStyle = \"\";\n\t\t$patient_detail->ContentDate->CellCssClass = \"\";\n\n\t\t// StudyTime\n\t\t$patient_detail->StudyTime->CellCssStyle = \"\";\n\t\t$patient_detail->StudyTime->CellCssClass = \"\";\n\n\t\t// ContentTime\n\t\t$patient_detail->ContentTime->CellCssStyle = \"\";\n\t\t$patient_detail->ContentTime->CellCssClass = \"\";\n\n\t\t// Modality\n\t\t$patient_detail->Modality->CellCssStyle = \"\";\n\t\t$patient_detail->Modality->CellCssClass = \"\";\n\n\t\t// BodyPartExamined\n\t\t$patient_detail->BodyPartExamined->CellCssStyle = \"\";\n\t\t$patient_detail->BodyPartExamined->CellCssClass = \"\";\n\n\t\t// ProtocolName\n\t\t$patient_detail->ProtocolName->CellCssStyle = \"\";\n\t\t$patient_detail->ProtocolName->CellCssClass = \"\";\n\n\t\t// Status\n\t\t$patient_detail->Status->CellCssStyle = \"\";\n\t\t$patient_detail->Status->CellCssClass = \"\";\n\t\tif ($patient_detail->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// DetailNo\n\t\t\t$patient_detail->DetailNo->ViewValue = $patient_detail->DetailNo->CurrentValue;\n\t\t\t$patient_detail->DetailNo->CssStyle = \"\";\n\t\t\t$patient_detail->DetailNo->CssClass = \"\";\n\t\t\t$patient_detail->DetailNo->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyID\n\t\t\t$patient_detail->StudyID->ViewValue = $patient_detail->StudyID->CurrentValue;\n\t\t\t$patient_detail->StudyID->CssStyle = \"\";\n\t\t\t$patient_detail->StudyID->CssClass = \"\";\n\t\t\t$patient_detail->StudyID->ViewCustomAttributes = \"\";\n\n\t\t\t// PatientID\n\t\t\t$patient_detail->PatientID->ViewValue = $patient_detail->PatientID->CurrentValue;\n\t\t\t$patient_detail->PatientID->CssStyle = \"\";\n\t\t\t$patient_detail->PatientID->CssClass = \"\";\n\t\t\t$patient_detail->PatientID->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyDate\n\t\t\t$patient_detail->StudyDate->ViewValue = $patient_detail->StudyDate->CurrentValue;\n\t\t\t$patient_detail->StudyDate->ViewValue = ew_FormatDateTime($patient_detail->StudyDate->ViewValue, 5);\n\t\t\t$patient_detail->StudyDate->CssStyle = \"\";\n\t\t\t$patient_detail->StudyDate->CssClass = \"\";\n\t\t\t$patient_detail->StudyDate->ViewCustomAttributes = \"\";\n\n\t\t\t// ContentDate\n\t\t\t$patient_detail->ContentDate->ViewValue = $patient_detail->ContentDate->CurrentValue;\n\t\t\t$patient_detail->ContentDate->ViewValue = ew_FormatDateTime($patient_detail->ContentDate->ViewValue, 5);\n\t\t\t$patient_detail->ContentDate->CssStyle = \"\";\n\t\t\t$patient_detail->ContentDate->CssClass = \"\";\n\t\t\t$patient_detail->ContentDate->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyTime\n\t\t\t$patient_detail->StudyTime->ViewValue = $patient_detail->StudyTime->CurrentValue;\n\t\t\t$patient_detail->StudyTime->ViewValue = ew_FormatDateTime($patient_detail->StudyTime->ViewValue, 4);\n\t\t\t$patient_detail->StudyTime->CssStyle = \"\";\n\t\t\t$patient_detail->StudyTime->CssClass = \"\";\n\t\t\t$patient_detail->StudyTime->ViewCustomAttributes = \"\";\n\n\t\t\t// ContentTime\n\t\t\t$patient_detail->ContentTime->ViewValue = $patient_detail->ContentTime->CurrentValue;\n\t\t\t$patient_detail->ContentTime->ViewValue = ew_FormatDateTime($patient_detail->ContentTime->ViewValue, 4);\n\t\t\t$patient_detail->ContentTime->CssStyle = \"\";\n\t\t\t$patient_detail->ContentTime->CssClass = \"\";\n\t\t\t$patient_detail->ContentTime->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionName\n\t\t\t$patient_detail->InstitutionName->ViewValue = $patient_detail->InstitutionName->CurrentValue;\n\t\t\t$patient_detail->InstitutionName->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionName->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionName->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionAddress\n\t\t\t$patient_detail->InstitutionAddress->ViewValue = $patient_detail->InstitutionAddress->CurrentValue;\n\t\t\t$patient_detail->InstitutionAddress->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionAddress->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionAddress->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionDepartmentName\n\t\t\t$patient_detail->InstitutionDepartmentName->ViewValue = $patient_detail->InstitutionDepartmentName->CurrentValue;\n\t\t\t$patient_detail->InstitutionDepartmentName->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionDepartmentName->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionDepartmentName->ViewCustomAttributes = \"\";\n\n\t\t\t// Modality\n\t\t\t$patient_detail->Modality->ViewValue = $patient_detail->Modality->CurrentValue;\n\t\t\t$patient_detail->Modality->CssStyle = \"\";\n\t\t\t$patient_detail->Modality->CssClass = \"\";\n\t\t\t$patient_detail->Modality->ViewCustomAttributes = \"\";\n\n\t\t\t// OperatorName\n\t\t\t$patient_detail->OperatorName->ViewValue = $patient_detail->OperatorName->CurrentValue;\n\t\t\t$patient_detail->OperatorName->CssStyle = \"\";\n\t\t\t$patient_detail->OperatorName->CssClass = \"\";\n\t\t\t$patient_detail->OperatorName->ViewCustomAttributes = \"\";\n\n\t\t\t// Manufacturer\n\t\t\t$patient_detail->Manufacturer->ViewValue = $patient_detail->Manufacturer->CurrentValue;\n\t\t\t$patient_detail->Manufacturer->CssStyle = \"\";\n\t\t\t$patient_detail->Manufacturer->CssClass = \"\";\n\t\t\t$patient_detail->Manufacturer->ViewCustomAttributes = \"\";\n\n\t\t\t// BodyPartExamined\n\t\t\t$patient_detail->BodyPartExamined->ViewValue = $patient_detail->BodyPartExamined->CurrentValue;\n\t\t\t$patient_detail->BodyPartExamined->CssStyle = \"\";\n\t\t\t$patient_detail->BodyPartExamined->CssClass = \"\";\n\t\t\t$patient_detail->BodyPartExamined->ViewCustomAttributes = \"\";\n\n\t\t\t// ProtocolName\n\t\t\t$patient_detail->ProtocolName->ViewValue = $patient_detail->ProtocolName->CurrentValue;\n\t\t\t$patient_detail->ProtocolName->CssStyle = \"\";\n\t\t\t$patient_detail->ProtocolName->CssClass = \"\";\n\t\t\t$patient_detail->ProtocolName->ViewCustomAttributes = \"\";\n\n\t\t\t// AccessionNumber\n\t\t\t$patient_detail->AccessionNumber->ViewValue = $patient_detail->AccessionNumber->CurrentValue;\n\t\t\t$patient_detail->AccessionNumber->CssStyle = \"\";\n\t\t\t$patient_detail->AccessionNumber->CssClass = \"\";\n\t\t\t$patient_detail->AccessionNumber->ViewCustomAttributes = \"\";\n\n\t\t\t// InstanceNumber\n\t\t\t$patient_detail->InstanceNumber->ViewValue = $patient_detail->InstanceNumber->CurrentValue;\n\t\t\t$patient_detail->InstanceNumber->CssStyle = \"\";\n\t\t\t$patient_detail->InstanceNumber->CssClass = \"\";\n\t\t\t$patient_detail->InstanceNumber->ViewCustomAttributes = \"\";\n\n\t\t\t// Status\n\t\t\t$patient_detail->Status->ViewValue = $patient_detail->Status->CurrentValue;\n\t\t\t$patient_detail->Status->CssStyle = \"\";\n\t\t\t$patient_detail->Status->CssClass = \"\";\n\t\t\t$patient_detail->Status->ViewCustomAttributes = \"\";\n\n\t\t\t// DetailNo\n\t\t\t$patient_detail->DetailNo->HrefValue = \"\";\n\n\t\t\t// StudyID\n\t\t\t$patient_detail->StudyID->HrefValue = \"\";\n\n\t\t\t// PatientID\n\t\t\t$patient_detail->PatientID->HrefValue = \"\";\n\n\t\t\t// StudyDate\n\t\t\t$patient_detail->StudyDate->HrefValue = \"\";\n\n\t\t\t// ContentDate\n\t\t\t$patient_detail->ContentDate->HrefValue = \"\";\n\n\t\t\t// StudyTime\n\t\t\t$patient_detail->StudyTime->HrefValue = \"\";\n\n\t\t\t// ContentTime\n\t\t\t$patient_detail->ContentTime->HrefValue = \"\";\n\n\t\t\t// Modality\n\t\t\t$patient_detail->Modality->HrefValue = \"\";\n\n\t\t\t// BodyPartExamined\n\t\t\t$patient_detail->BodyPartExamined->HrefValue = \"\";\n\n\t\t\t// ProtocolName\n\t\t\t$patient_detail->ProtocolName->HrefValue = \"\";\n\n\t\t\t// Status\n\t\t\t$patient_detail->Status->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$patient_detail->Row_Rendered();\n\t}", "protected function getTableRow(array $row, $class = null)\n {\n if (null === $class) {\n $html = '<tr>';\n } else {\n $html = '<tr class=\"' . $class . '\">';\n }\n\n foreach ($row as $col) {\n $html .= '<td>' . $col . '</td>';\n }\n $html .= '</tr>';\n\n return $html;\n }", "public function body()\n {\n $this->altRow = false;\n $lastBreakValue = null;\n $body[] = '<tbody>';\n $breaks = 0;\n foreach ($this->data as $index => $row) {\n if (!empty($this->tableOptions['break'])) {\n $breakValue = $row[$this->tableOptions['break']];\n if ($breakValue !== $lastBreakValue) {\n $lastBreakValue = $breakValue;\n if ($breaks) {\n $body[] = '</tbody>';\n $body[] = '<tbody class=\"page-break-before\">';\n }\n $breaks++;\n $body[] = $this->buildBreakRow($this->tableOptions['break'], $row);\n // continue;\n }\n }\n $body[] = $this->buildRow($row);\n }\n $body[] = '</tbody>';\n\n $ret = implode(chr(10), $body);\n\n if (!empty($this->tableOptions['totals'])) {\n $ret .= $this->buildTotalsRow();\n }\n\n return $ret;\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\n\t\t$this->id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// nombre_contacto\n\t\t// name\n\t\t// lastname\n\t\t// email\n\t\t// address\n\t\t// phone\n\t\t// cell\n\t\t// is_active\n\n\t\t$this->is_active->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// created_at\n\t\t// id_sucursal\n\t\t// documentos\n\n\t\t$this->documentos->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DateModified\n\t\t$this->DateModified->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DateDeleted\n\t\t$this->DateDeleted->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// CreatedBy\n\t\t$this->CreatedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// ModifiedBy\n\t\t$this->ModifiedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DeletedBy\n\t\t$this->DeletedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// latitud\n\t\t$this->latitud->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// longitud\n\t\t$this->longitud->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipoinmueble\n\t\t// id_ciudad_inmueble\n\t\t// id_provincia_inmueble\n\t\t// imagen_inmueble01\n\n\t\t$this->imagen_inmueble01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble02\n\t\t// imagen_inmueble03\n\t\t// imagen_inmueble04\n\t\t// imagen_inmueble05\n\t\t// imagen_inmueble06\n\n\t\t$this->imagen_inmueble06->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble07\n\t\t$this->imagen_inmueble07->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble08\n\t\t$this->imagen_inmueble08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipovehiculo\n\t\t// id_ciudad_vehiculo\n\t\t// id_provincia_vehiculo\n\t\t// imagen_vehiculo01\n\n\t\t$this->imagen_vehiculo01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo02\n\t\t// imagen_vehiculo03\n\n\t\t$this->imagen_vehiculo03->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo04\n\t\t$this->imagen_vehiculo04->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo05\n\t\t// imagen_vehiculo06\n\t\t// imagen_vehiculo07\n\t\t// imagen_vehiculo08\n\n\t\t$this->imagen_vehiculo08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipomaquinaria\n\t\t// id_ciudad_maquinaria\n\t\t// id_provincia_maquinaria\n\t\t// imagen_maquinaria01\n\n\t\t$this->imagen_maquinaria01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_maquinaria02\n\t\t// imagen_maquinaria03\n\t\t// imagen_maquinaria04\n\n\t\t$this->imagen_maquinaria04->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_maquinaria05\n\t\t// imagen_maquinaria06\n\t\t// imagen_maquinaria07\n\t\t// imagen_maquinaria08\n\n\t\t$this->imagen_maquinaria08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipomercaderia\n\t\t// imagen_mercaderia01\n\t\t// documento_mercaderia\n\t\t// tipoespecial\n\t\t// imagen_tipoespecial01\n\t\t// email_contacto\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// nombre_contacto\n\t\t$this->nombre_contacto->ViewValue = $this->nombre_contacto->CurrentValue;\n\t\t$this->nombre_contacto->ViewCustomAttributes = \"\";\n\n\t\t// name\n\t\t$this->name->ViewValue = $this->name->CurrentValue;\n\t\t$this->name->ViewCustomAttributes = \"\";\n\n\t\t// lastname\n\t\t$this->lastname->ViewValue = $this->lastname->CurrentValue;\n\t\t$this->lastname->ViewCustomAttributes = \"\";\n\n\t\t// email\n\t\t$this->_email->ViewValue = $this->_email->CurrentValue;\n\t\t$this->_email->ViewCustomAttributes = \"\";\n\n\t\t// address\n\t\t$this->address->ViewValue = $this->address->CurrentValue;\n\t\t$this->address->ViewCustomAttributes = \"\";\n\n\t\t// phone\n\t\t$this->phone->ViewValue = $this->phone->CurrentValue;\n\t\t$this->phone->ViewCustomAttributes = \"\";\n\n\t\t// cell\n\t\t$this->cell->ViewValue = $this->cell->CurrentValue;\n\t\t$this->cell->ViewCustomAttributes = \"\";\n\n\t\t// created_at\n\t\t$this->created_at->ViewValue = $this->created_at->CurrentValue;\n\t\t$this->created_at->ViewValue = ew_FormatDateTime($this->created_at->ViewValue, 17);\n\t\t$this->created_at->ViewCustomAttributes = \"\";\n\n\t\t// id_sucursal\n\t\tif (strval($this->id_sucursal->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_sucursal->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sucursal`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_sucursal->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`id`='\".$_SESSION[\"sucursal\"].\"'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_sucursal, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_sucursal->ViewValue = $this->id_sucursal->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_sucursal->ViewValue = $this->id_sucursal->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_sucursal->ViewValue = NULL;\n\t\t}\n\t\t$this->id_sucursal->ViewCustomAttributes = \"\";\n\n\t\t// tipoinmueble\n\t\tif (strval($this->tipoinmueble->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipoinmueble->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipoinmueble->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='INMUEBLE'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipoinmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipoinmueble->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipoinmueble->ViewValue .= $this->tipoinmueble->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipoinmueble->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipoinmueble->ViewValue = $this->tipoinmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipoinmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->tipoinmueble->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_inmueble\n\t\tif (strval($this->id_ciudad_inmueble->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_inmueble->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_inmueble->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_inmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_inmueble->ViewValue = $this->id_ciudad_inmueble->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_inmueble->ViewValue = $this->id_ciudad_inmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_inmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_inmueble->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_inmueble\n\t\tif (strval($this->id_provincia_inmueble->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_inmueble->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_inmueble->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_inmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_inmueble->ViewValue = $this->id_provincia_inmueble->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_inmueble->ViewValue = $this->id_provincia_inmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_inmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_inmueble->ViewCustomAttributes = \"\";\n\n\t\t// tipovehiculo\n\t\tif (strval($this->tipovehiculo->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipovehiculo->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipovehiculo->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='VEHICULO'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipovehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipovehiculo->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipovehiculo->ViewValue .= $this->tipovehiculo->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipovehiculo->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipovehiculo->ViewValue = $this->tipovehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipovehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->tipovehiculo->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_vehiculo\n\t\tif (strval($this->id_ciudad_vehiculo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_vehiculo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_vehiculo->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_vehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_vehiculo->ViewValue = $this->id_ciudad_vehiculo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_vehiculo->ViewValue = $this->id_ciudad_vehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_vehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_vehiculo->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_vehiculo\n\t\tif (strval($this->id_provincia_vehiculo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_vehiculo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_vehiculo->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_vehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_vehiculo->ViewValue = $this->id_provincia_vehiculo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_vehiculo->ViewValue = $this->id_provincia_vehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_vehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_vehiculo->ViewCustomAttributes = \"\";\n\n\t\t// tipomaquinaria\n\t\tif (strval($this->tipomaquinaria->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipomaquinaria->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipomaquinaria->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='MAQUINARIA'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipomaquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipomaquinaria->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipomaquinaria->ViewValue .= $this->tipomaquinaria->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipomaquinaria->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipomaquinaria->ViewValue = $this->tipomaquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipomaquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->tipomaquinaria->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_maquinaria\n\t\tif (strval($this->id_ciudad_maquinaria->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_maquinaria->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_maquinaria->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_maquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_maquinaria->ViewValue = $this->id_ciudad_maquinaria->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_maquinaria->ViewValue = $this->id_ciudad_maquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_maquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_maquinaria->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_maquinaria\n\t\tif (strval($this->id_provincia_maquinaria->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_maquinaria->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_maquinaria->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_maquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_maquinaria->ViewValue = $this->id_provincia_maquinaria->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_maquinaria->ViewValue = $this->id_provincia_maquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_maquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_maquinaria->ViewCustomAttributes = \"\";\n\n\t\t// tipomercaderia\n\t\tif (strval($this->tipomercaderia->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipomercaderia->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`id_tipoinmueble`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `id_tipoinmueble`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipomercaderia->LookupFilters = array();\n\t\t$lookuptblfilter = \"`tipo`='MERCADERIA'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipomercaderia, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipomercaderia->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipomercaderia->ViewValue .= $this->tipomercaderia->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipomercaderia->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipomercaderia->ViewValue = $this->tipomercaderia->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipomercaderia->ViewValue = NULL;\n\t\t}\n\t\t$this->tipomercaderia->ViewCustomAttributes = \"\";\n\n\t\t// documento_mercaderia\n\t\t$this->documento_mercaderia->ViewValue = $this->documento_mercaderia->CurrentValue;\n\t\t$this->documento_mercaderia->ViewCustomAttributes = \"\";\n\n\t\t// tipoespecial\n\t\tif (strval($this->tipoespecial->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipoespecial->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`id_tipoinmueble`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `id_tipoinmueble`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipoespecial->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='ESPECIAL'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipoespecial, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipoespecial->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipoespecial->ViewValue .= $this->tipoespecial->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipoespecial->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipoespecial->ViewValue = $this->tipoespecial->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipoespecial->ViewValue = NULL;\n\t\t}\n\t\t$this->tipoespecial->ViewCustomAttributes = \"\";\n\n\t\t// email_contacto\n\t\tif (strval($this->email_contacto->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`login`\" . ew_SearchString(\"=\", $this->email_contacto->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `login`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `oficialcredito`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->email_contacto->LookupFilters = array(\"dx1\" => '`nombre`', \"dx2\" => '`apellido`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->email_contacto, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->email_contacto->ViewValue = $this->email_contacto->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->email_contacto->ViewValue = $this->email_contacto->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->email_contacto->ViewValue = NULL;\n\t\t}\n\t\t$this->email_contacto->ViewCustomAttributes = \"\";\n\n\t\t\t// nombre_contacto\n\t\t\t$this->nombre_contacto->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre_contacto->HrefValue = \"\";\n\t\t\t$this->nombre_contacto->TooltipValue = \"\";\n\n\t\t\t// name\n\t\t\t$this->name->LinkCustomAttributes = \"\";\n\t\t\t$this->name->HrefValue = \"\";\n\t\t\t$this->name->TooltipValue = \"\";\n\n\t\t\t// lastname\n\t\t\t$this->lastname->LinkCustomAttributes = \"\";\n\t\t\t$this->lastname->HrefValue = \"\";\n\t\t\t$this->lastname->TooltipValue = \"\";\n\n\t\t\t// email\n\t\t\t$this->_email->LinkCustomAttributes = \"\";\n\t\t\t$this->_email->HrefValue = \"\";\n\t\t\t$this->_email->TooltipValue = \"\";\n\n\t\t\t// address\n\t\t\t$this->address->LinkCustomAttributes = \"\";\n\t\t\t$this->address->HrefValue = \"\";\n\t\t\t$this->address->TooltipValue = \"\";\n\n\t\t\t// phone\n\t\t\t$this->phone->LinkCustomAttributes = \"\";\n\t\t\t$this->phone->HrefValue = \"\";\n\t\t\t$this->phone->TooltipValue = \"\";\n\n\t\t\t// cell\n\t\t\t$this->cell->LinkCustomAttributes = \"\";\n\t\t\t$this->cell->HrefValue = \"\";\n\t\t\t$this->cell->TooltipValue = \"\";\n\n\t\t\t// created_at\n\t\t\t$this->created_at->LinkCustomAttributes = \"\";\n\t\t\t$this->created_at->HrefValue = \"\";\n\t\t\t$this->created_at->TooltipValue = \"\";\n\n\t\t\t// id_sucursal\n\t\t\t$this->id_sucursal->LinkCustomAttributes = \"\";\n\t\t\t$this->id_sucursal->HrefValue = \"\";\n\t\t\t$this->id_sucursal->TooltipValue = \"\";\n\n\t\t\t// tipoinmueble\n\t\t\t$this->tipoinmueble->LinkCustomAttributes = \"\";\n\t\t\t$this->tipoinmueble->HrefValue = \"\";\n\t\t\t$this->tipoinmueble->TooltipValue = \"\";\n\n\t\t\t// tipovehiculo\n\t\t\t$this->tipovehiculo->LinkCustomAttributes = \"\";\n\t\t\t$this->tipovehiculo->HrefValue = \"\";\n\t\t\t$this->tipovehiculo->TooltipValue = \"\";\n\n\t\t\t// tipomaquinaria\n\t\t\t$this->tipomaquinaria->LinkCustomAttributes = \"\";\n\t\t\t$this->tipomaquinaria->HrefValue = \"\";\n\t\t\t$this->tipomaquinaria->TooltipValue = \"\";\n\n\t\t\t// tipomercaderia\n\t\t\t$this->tipomercaderia->LinkCustomAttributes = \"\";\n\t\t\t$this->tipomercaderia->HrefValue = \"\";\n\t\t\t$this->tipomercaderia->TooltipValue = \"\";\n\n\t\t\t// tipoespecial\n\t\t\t$this->tipoespecial->LinkCustomAttributes = \"\";\n\t\t\t$this->tipoespecial->HrefValue = \"\";\n\t\t\t$this->tipoespecial->TooltipValue = \"\";\n\n\t\t\t// email_contacto\n\t\t\t$this->email_contacto->LinkCustomAttributes = \"\";\n\t\t\t$this->email_contacto->HrefValue = \"\";\n\t\t\t$this->email_contacto->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// nombre_contacto\n\t\t\t$this->nombre_contacto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nombre_contacto->EditCustomAttributes = \"\";\n\t\t\t$this->nombre_contacto->EditValue = ew_HtmlEncode($this->nombre_contacto->AdvancedSearch->SearchValue);\n\t\t\t$this->nombre_contacto->PlaceHolder = ew_RemoveHtml($this->nombre_contacto->FldTitle());\n\n\t\t\t// name\n\t\t\t$this->name->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->name->EditCustomAttributes = \"\";\n\t\t\t$this->name->EditValue = ew_HtmlEncode($this->name->AdvancedSearch->SearchValue);\n\t\t\t$this->name->PlaceHolder = ew_RemoveHtml($this->name->FldTitle());\n\n\t\t\t// lastname\n\t\t\t$this->lastname->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->lastname->EditCustomAttributes = \"\";\n\t\t\t$this->lastname->EditValue = ew_HtmlEncode($this->lastname->AdvancedSearch->SearchValue);\n\t\t\t$this->lastname->PlaceHolder = ew_RemoveHtml($this->lastname->FldTitle());\n\n\t\t\t// email\n\t\t\t$this->_email->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->_email->EditCustomAttributes = \"\";\n\t\t\t$this->_email->EditValue = ew_HtmlEncode($this->_email->AdvancedSearch->SearchValue);\n\t\t\t$this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldTitle());\n\n\t\t\t// address\n\t\t\t$this->address->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->address->EditCustomAttributes = \"\";\n\t\t\t$this->address->EditValue = ew_HtmlEncode($this->address->AdvancedSearch->SearchValue);\n\t\t\t$this->address->PlaceHolder = ew_RemoveHtml($this->address->FldTitle());\n\n\t\t\t// phone\n\t\t\t$this->phone->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->phone->EditCustomAttributes = \"\";\n\t\t\t$this->phone->EditValue = ew_HtmlEncode($this->phone->AdvancedSearch->SearchValue);\n\t\t\t$this->phone->PlaceHolder = ew_RemoveHtml($this->phone->FldTitle());\n\n\t\t\t// cell\n\t\t\t$this->cell->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->cell->EditCustomAttributes = \"\";\n\t\t\t$this->cell->EditValue = ew_HtmlEncode($this->cell->AdvancedSearch->SearchValue);\n\t\t\t$this->cell->PlaceHolder = ew_RemoveHtml($this->cell->FldTitle());\n\n\t\t\t// created_at\n\t\t\t$this->created_at->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->created_at->EditCustomAttributes = \"\";\n\t\t\t$this->created_at->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->created_at->AdvancedSearch->SearchValue, 17), 17));\n\t\t\t$this->created_at->PlaceHolder = ew_RemoveHtml($this->created_at->FldTitle());\n\n\t\t\t// id_sucursal\n\t\t\t$this->id_sucursal->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_sucursal->EditCustomAttributes = \"\";\n\n\t\t\t// tipoinmueble\n\t\t\t$this->tipoinmueble->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipoinmueble->EditCustomAttributes = \"\";\n\n\t\t\t// tipovehiculo\n\t\t\t$this->tipovehiculo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipovehiculo->EditCustomAttributes = \"\";\n\n\t\t\t// tipomaquinaria\n\t\t\t$this->tipomaquinaria->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipomaquinaria->EditCustomAttributes = \"\";\n\n\t\t\t// tipomercaderia\n\t\t\t$this->tipomercaderia->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipomercaderia->EditCustomAttributes = \"\";\n\n\t\t\t// tipoespecial\n\t\t\t$this->tipoespecial->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipoespecial->EditCustomAttributes = \"\";\n\n\t\t\t// email_contacto\n\t\t\t$this->email_contacto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->email_contacto->EditCustomAttributes = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->SetupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function make_table ($rows){\n if (($rows['supply_type'] == 'prepaid' \n && $rows['status'] == 'initiated') ||\n ($rows['supply_type'] == 'postpaid' \n && $rows['status'] == 'supplied')){ // Only display Prepaid supplies that have been initiated and Postpaid supplies that have been delivered\n $pay = '<a href=\"pay.php?supply_id='.$rows['id'].'\" target=\"pay_frame\"> \n <small data-toggle=\"modal\" data-target=\"#payModal\">Pay</small>\n </a>'; // Open the transfer iframe in a Modal window\n } else {\n $pay = '<small class=\"text-danger\">Pay</small>';\n }\n\n\n\n\n $row = '\n <tr>\n <td>'.$rows['supplier_name'].'</td>\n <td>'.$rows['quantity_desc'].' of <strong>'.$rows['item_name'].'</strong></td>\n <td>'.$rows['status'].' ('.$rows['supply_type'].')</td>\n <td>N'.number_format($rows['amount'],2,\".\",\",\").'</td>\n <td>'.$rows['supply_order_date'].'</td>\n <td>'.$pay.'</td>\n </tr>\n ';\n return $row;\n }", "public function display_rows() {\n\n\t\t// Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t// Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t\t// Loop for each record\n\t\tif ( ! empty( $records ) ) {\n\t\t\tforeach ( $records as $rec ) {\n\n\t\t\t\t// Open the line\n\t\t\t\techo '<tr id=\"record_' . $rec->ID . '\">';\n\t\t\t\tforeach ( $columns as $column_name => $column_display_name ) {\n\n\t\t\t\t\t// Style attributes for each col\n\t\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t\t$style = '';\n\t\t\t\t\tif ( in_array( $column_name, $hidden ) ) {\n\t\t\t\t\t\t$style = ' style=\"display:none;\"';\n\t\t\t\t\t}\n\t\t\t\t\t$attributes = $class . $style;\n\n\t\t\t\t\tswitch ( $column_name ) {\n\t\t\t\t\t\tcase 'title':\n\t\t\t\t\t\t\t$edit_link = admin_url( 'admin.php?page=wo_edit_client&id=' . $rec->ID );\n\t\t\t\t\t\t\techo '<td ' . $attributes . '><strong><a href=\"' . $edit_link . '\" title=\"Edit\">' . stripslashes( $rec->post_title ) . '</a></strong>\n\t\t\t\t\t\t<div class=\"row-actions\">\n\t\t\t\t\t\t<span class=\"edit\"><a href=\"' . $edit_link . '\" title=\"' . __( 'Edit Client', 'wp-oauth' ) . '\">' . __( 'Edit', 'wp-oauth' ) . '</a> | </span>\n\t\t\t\t\t\t<span class=\"trash\"><a class=\"submitdelete\" title=\"' . __( 'delete this client', 'wp-oauth' ) . '\" onclick=\"wo_remove_client(\\'' . $rec->ID . '\\');\" href=\"#\">' . __( 'Delete', 'wp-oauth' ) . '</a> </span>';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// case \"user_id\": echo '<td '.$attributes.'>'.stripslashes($rec->user_id).'</td>'; break;\n\t\t\t\t\t\tcase 'client_id':\n\t\t\t\t\t\t\techo '<td ' . $attributes . '>' . get_post_meta( $rec->ID, 'client_id', true ) . '</td>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Close the line\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t}\n\t}", "private function AddRow($row) {\n $this->_table .= $this->Tpl2HTML($this->_rowtpl, array('RowContent' => $row));\n $this->_rown++;\n }", "function finalRow($quantity, $price) {\n ?>\n<tr>\n <th scope=\"row\">#</th>\n <td>&nbsp;</td>\n <td>&nbsp;</td>\n <td>Pizza's: <?= $quantity ?></td>\n <td>Prijs: &euro;<?= $price ?></td>\n</tr>\n<?php\n}", "function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}", "function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}", "function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "function getTable($array, $firstLineHeader = true, $lastLineFooter = true, $withTableStructure = true)\n{\n\t$ret = '';\n\n\t$rows = count($array);\n\t$cols = isset($array[0]) ? count($array[0]) : 0;\n\t$i = 0;\n\n\tif($firstLineHeader)\n\t{\n\t\t$ret .= '<tr class=\"tableHeaderRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellR\">';\n\t\t\telse if($j == 0)\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellL\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableHeaderCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\n\t\t$i++;\n\t}\n\n\tfor(; $i < $rows; $i++)\n\t{\n\t\t$ret .= '<tr class=\"tableRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBR\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTR\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellR\">';\n\t\t\t}\n\t\t\telse if($j == 0)\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBL\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTL\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellL\">';\n\t\t\t}\n\t\t\telse if($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t$ret .= '<td class=\"tableCellB\">';\n\t\t\telse if($i == 0)\n\t\t\t\t$ret .= '<td class=\"tableCellT\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\t}\n\n\tif($withTableStructure)\n\t\t$ret = '<p/><table class=\"tableMain\">' . $ret . '</table>';\n\n\treturn $ret;\n}", "function display_rows() {\r\n\r\n # Get the records registered in the prepare_items method\r\n $records = $this->items;\r\n\r\n //Loop for each record\r\n if(!empty($records)){foreach($records as $rec){\r\n $custom_data = unserialize($rec->custom_data);\r\n\r\n echo '<tr id=\"record_'.$rec->id.'\">';\r\n echo '<td>'.stripslashes($rec->created_on).'</td>';\r\n echo '<td>'.stripslashes($rec->type).'</td>';\r\n echo '<td>'.stripslashes($rec->ip).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['OS']['name']).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['browser']['name']).'</td>';\r\n echo '<td>'.stripslashes($custom_data['personal']['location']['name']).'</td>';\r\n echo '<td>\r\n <a href=\"\" data-post=\"action=detailed_log&type=' .$rec->type. '&id=' .$rec->id. '&detail=full&ip=' .$rec->ip. '\" data-type=\"modal\" data-toggle=\"tooltip\" title=\"Show details\"><div class=\"dashicons dashicons-list-view\"></div></a>\r\n <a href=\"admin.php?page=cybercure_security_detected_attacks&type=' .$rec->type. '&delete=' .$rec->id. '\" data-toggle=\"tooltip\" title=\"Delete entry\"><div class=\"dashicons dashicons-trash\"></div></a>\r\n </td></tr>';\r\n }}\r\n }", "public function renderRow()\n\t{\n\t\tglobal $Security, $Language, $CurrentLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// document_sequence\n\t\t// firelink_doc_no\n\t\t// project_name\n\t\t// document_tittle\n\t\t// submit_no\n\t\t// revision_no\n\t\t// transmit_no\n\t\t// transmit_date\n\t\t// direction\n\t\t// approval_status\n\t\t// document_link\n\t\t// transaction_date\n\t\t// document_native\n\t\t// username\n\t\t// expiry_date\n\n\t\tif ($this->RowType == ROWTYPE_VIEW) { // View row\n\n\t\t\t// document_sequence\n\t\t\t$this->document_sequence->ViewValue = $this->document_sequence->CurrentValue;\n\t\t\t$this->document_sequence->CellCssStyle .= \"text-align: left;\";\n\t\t\t$this->document_sequence->ViewCustomAttributes = \"\";\n\n\t\t\t// firelink_doc_no\n\t\t\tif ($this->firelink_doc_no->VirtualValue <> \"\") {\n\t\t\t\t$this->firelink_doc_no->ViewValue = $this->firelink_doc_no->VirtualValue;\n\t\t\t} else {\n\t\t\t\t$this->firelink_doc_no->ViewValue = $this->firelink_doc_no->CurrentValue;\n\t\t\t$curVal = strval($this->firelink_doc_no->CurrentValue);\n\t\t\tif ($curVal <> \"\") {\n\t\t\t\t$this->firelink_doc_no->ViewValue = $this->firelink_doc_no->lookupCacheOption($curVal);\n\t\t\t\tif ($this->firelink_doc_no->ViewValue === NULL) { // Lookup from database\n\t\t\t\t\t$filterWrk = \"\\\"firelink_doc_no\\\"\" . SearchString(\"=\", $curVal, DATATYPE_STRING, \"\");\n\t\t\t\t\t$sqlWrk = $this->firelink_doc_no->Lookup->getSql(FALSE, $filterWrk, '', $this);\n\t\t\t\t\t$rswrk = Conn()->execute($sqlWrk);\n\t\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t\t$arwrk[1] = strtoupper($rswrk->fields('df'));\n\t\t\t\t\t\t$arwrk[2] = strtoupper($rswrk->fields('df2'));\n\t\t\t\t\t\t$this->firelink_doc_no->ViewValue = $this->firelink_doc_no->displayValue($arwrk);\n\t\t\t\t\t\t$rswrk->Close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->firelink_doc_no->ViewValue = $this->firelink_doc_no->CurrentValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->firelink_doc_no->ViewValue = NULL;\n\t\t\t}\n\t\t\t}\n\t\t\t$this->firelink_doc_no->CellCssStyle .= \"text-align: left;\";\n\t\t\t$this->firelink_doc_no->ViewCustomAttributes = \"\";\n\n\t\t\t// project_name\n\t\t\t$this->project_name->ViewValue = $this->project_name->CurrentValue;\n\t\t\t$this->project_name->ViewCustomAttributes = \"\";\n\n\t\t\t// document_tittle\n\t\t\t$this->document_tittle->ViewValue = $this->document_tittle->CurrentValue;\n\t\t\t$this->document_tittle->ViewValue = strtoupper($this->document_tittle->ViewValue);\n\t\t\t$this->document_tittle->ViewCustomAttributes = \"\";\n\n\t\t\t// submit_no\n\t\t\t$this->submit_no->ViewValue = $this->submit_no->CurrentValue;\n\t\t\t$this->submit_no->ViewValue = FormatNumber($this->submit_no->ViewValue, 0, -1, -2, -2);\n\t\t\t$this->submit_no->CellCssStyle .= \"text-align: left;\";\n\t\t\t$this->submit_no->ViewCustomAttributes = \"\";\n\n\t\t\t// revision_no\n\t\t\t$this->revision_no->ViewValue = $this->revision_no->CurrentValue;\n\t\t\t$this->revision_no->ViewValue = strtoupper($this->revision_no->ViewValue);\n\t\t\t$this->revision_no->ViewCustomAttributes = \"\";\n\n\t\t\t// transmit_no\n\t\t\tif ($this->transmit_no->VirtualValue <> \"\") {\n\t\t\t\t$this->transmit_no->ViewValue = $this->transmit_no->VirtualValue;\n\t\t\t} else {\n\t\t\t\t$this->transmit_no->ViewValue = $this->transmit_no->CurrentValue;\n\t\t\t$curVal = strval($this->transmit_no->CurrentValue);\n\t\t\tif ($curVal <> \"\") {\n\t\t\t\t$this->transmit_no->ViewValue = $this->transmit_no->lookupCacheOption($curVal);\n\t\t\t\tif ($this->transmit_no->ViewValue === NULL) { // Lookup from database\n\t\t\t\t\t$filterWrk = \"\\\"transmittal_no\\\"\" . SearchString(\"=\", $curVal, DATATYPE_STRING, \"\");\n\t\t\t\t\t$sqlWrk = $this->transmit_no->Lookup->getSql(FALSE, $filterWrk, '', $this);\n\t\t\t\t\t$rswrk = Conn()->execute($sqlWrk);\n\t\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t\t$arwrk[1] = strtoupper($rswrk->fields('df'));\n\t\t\t\t\t\t$this->transmit_no->ViewValue = $this->transmit_no->displayValue($arwrk);\n\t\t\t\t\t\t$rswrk->Close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->transmit_no->ViewValue = $this->transmit_no->CurrentValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->transmit_no->ViewValue = NULL;\n\t\t\t}\n\t\t\t}\n\t\t\t$this->transmit_no->CellCssStyle .= \"text-align: left;\";\n\t\t\t$this->transmit_no->ViewCustomAttributes = \"\";\n\n\t\t\t// transmit_date\n\t\t\t$this->transmit_date->ViewValue = $this->transmit_date->CurrentValue;\n\t\t\t$this->transmit_date->ViewValue = FormatDateTime($this->transmit_date->ViewValue, 0);\n\t\t\t$this->transmit_date->ViewCustomAttributes = \"\";\n\n\t\t\t// direction\n\t\t\tif (strval($this->direction->CurrentValue) <> \"\") {\n\t\t\t\t$this->direction->ViewValue = $this->direction->optionCaption($this->direction->CurrentValue);\n\t\t\t} else {\n\t\t\t\t$this->direction->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->direction->ViewCustomAttributes = \"\";\n\n\t\t\t// approval_status\n\t\t\t$curVal = strval($this->approval_status->CurrentValue);\n\t\t\tif ($curVal <> \"\") {\n\t\t\t\t$this->approval_status->ViewValue = $this->approval_status->lookupCacheOption($curVal);\n\t\t\t\tif ($this->approval_status->ViewValue === NULL) { // Lookup from database\n\t\t\t\t\t$filterWrk = \"\\\"short_code\\\"\" . SearchString(\"=\", $curVal, DATATYPE_STRING, \"\");\n\t\t\t\t\t$sqlWrk = $this->approval_status->Lookup->getSql(FALSE, $filterWrk, '', $this);\n\t\t\t\t\t$rswrk = Conn()->execute($sqlWrk);\n\t\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t\t$arwrk[1] = strtoupper($rswrk->fields('df'));\n\t\t\t\t\t\t$arwrk[2] = strtoupper($rswrk->fields('df2'));\n\t\t\t\t\t\t$this->approval_status->ViewValue = $this->approval_status->displayValue($arwrk);\n\t\t\t\t\t\t$rswrk->Close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->approval_status->ViewValue = $this->approval_status->CurrentValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->approval_status->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->approval_status->ViewCustomAttributes = \"\";\n\n\t\t\t// document_link\n\t\t\tif (!EmptyValue($this->document_link->Upload->DbValue)) {\n\t\t\t\t$this->document_link->ViewValue = $this->document_link->Upload->DbValue;\n\t\t\t} else {\n\t\t\t\t$this->document_link->ViewValue = \"\";\n\t\t\t}\n\t\t\t$this->document_link->ViewCustomAttributes = \"\";\n\n\t\t\t// transaction_date\n\t\t\t$this->transaction_date->ViewValue = $this->transaction_date->CurrentValue;\n\t\t\t$this->transaction_date->ViewValue = FormatDateTime($this->transaction_date->ViewValue, 0);\n\t\t\t$this->transaction_date->ViewCustomAttributes = \"\";\n\n\t\t\t// document_native\n\t\t\t$this->document_native->ViewValue = $this->document_native->CurrentValue;\n\t\t\t$this->document_native->CellCssStyle .= \"text-align: left;\";\n\t\t\t$this->document_native->ViewCustomAttributes = \"\";\n\n\t\t\t// expiry_date\n\t\t\t$this->expiry_date->ViewValue = $this->expiry_date->CurrentValue;\n\t\t\t$this->expiry_date->ViewValue = FormatDateTime($this->expiry_date->ViewValue, 0);\n\t\t\t$this->expiry_date->ViewCustomAttributes = \"\";\n\n\t\t\t// firelink_doc_no\n\t\t\t$this->firelink_doc_no->LinkCustomAttributes = \"\";\n\t\t\tif (!EmptyValue($this->document_link->Upload->DbValue)) {\n\t\t\t\t$this->firelink_doc_no->HrefValue = GetFileUploadUrl($this->document_link, $this->document_link->Upload->DbValue); // Add prefix/suffix\n\t\t\t\t$this->firelink_doc_no->LinkAttrs[\"target\"] = \"_blank\"; // Add target\n\t\t\t\tif ($this->isExport()) $this->firelink_doc_no->HrefValue = FullUrl($this->firelink_doc_no->HrefValue, \"href\");\n\t\t\t} else {\n\t\t\t\t$this->firelink_doc_no->HrefValue = \"\";\n\t\t\t}\n\t\t\t$this->firelink_doc_no->TooltipValue = \"\";\n\n\t\t\t// submit_no\n\t\t\t$this->submit_no->LinkCustomAttributes = \"\";\n\t\t\t$this->submit_no->HrefValue = \"\";\n\t\t\t$this->submit_no->TooltipValue = \"\";\n\n\t\t\t// revision_no\n\t\t\t$this->revision_no->LinkCustomAttributes = \"\";\n\t\t\t$this->revision_no->HrefValue = \"\";\n\t\t\t$this->revision_no->TooltipValue = \"\";\n\n\t\t\t// transmit_no\n\t\t\t$this->transmit_no->LinkCustomAttributes = \"\";\n\t\t\t$this->transmit_no->HrefValue = \"\";\n\t\t\t$this->transmit_no->TooltipValue = \"\";\n\n\t\t\t// transmit_date\n\t\t\t$this->transmit_date->LinkCustomAttributes = \"\";\n\t\t\t$this->transmit_date->HrefValue = \"\";\n\t\t\t$this->transmit_date->TooltipValue = \"\";\n\n\t\t\t// direction\n\t\t\t$this->direction->LinkCustomAttributes = \"\";\n\t\t\t$this->direction->HrefValue = \"\";\n\t\t\t$this->direction->TooltipValue = \"\";\n\n\t\t\t// approval_status\n\t\t\t$this->approval_status->LinkCustomAttributes = \"\";\n\t\t\t$this->approval_status->HrefValue = \"\";\n\t\t\t$this->approval_status->TooltipValue = \"\";\n\n\t\t\t// document_link\n\t\t\t$this->document_link->LinkCustomAttributes = \"\";\n\t\t\tif (!EmptyValue($this->document_link->Upload->DbValue)) {\n\t\t\t\t$this->document_link->HrefValue = GetFileUploadUrl($this->document_link, $this->document_link->Upload->DbValue); // Add prefix/suffix\n\t\t\t\t$this->document_link->LinkAttrs[\"target\"] = \"_blank\"; // Add target\n\t\t\t\tif ($this->isExport()) $this->document_link->HrefValue = FullUrl($this->document_link->HrefValue, \"href\");\n\t\t\t} else {\n\t\t\t\t$this->document_link->HrefValue = \"\";\n\t\t\t}\n\t\t\t$this->document_link->ExportHrefValue = $this->document_link->UploadPath . $this->document_link->Upload->DbValue;\n\t\t\t$this->document_link->TooltipValue = \"\";\n\n\t\t\t// document_native\n\t\t\t$this->document_native->LinkCustomAttributes = \"\";\n\t\t\t$this->document_native->HrefValue = \"\";\n\t\t\t$this->document_native->TooltipValue = \"\";\n\n\t\t\t// expiry_date\n\t\t\t$this->expiry_date->LinkCustomAttributes = \"\";\n\t\t\t$this->expiry_date->HrefValue = \"\";\n\t\t\t$this->expiry_date->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == ROWTYPE_ADD) { // Add row\n\n\t\t\t// firelink_doc_no\n\t\t\t$this->firelink_doc_no->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->firelink_doc_no->EditCustomAttributes = \"\";\n\t\t\tif (REMOVE_XSS)\n\t\t\t\t$this->firelink_doc_no->CurrentValue = HtmlDecode($this->firelink_doc_no->CurrentValue);\n\t\t\t$this->firelink_doc_no->EditValue = HtmlEncode($this->firelink_doc_no->CurrentValue);\n\t\t\t$curVal = strval($this->firelink_doc_no->CurrentValue);\n\t\t\tif ($curVal <> \"\") {\n\t\t\t\t$this->firelink_doc_no->EditValue = $this->firelink_doc_no->lookupCacheOption($curVal);\n\t\t\t\tif ($this->firelink_doc_no->EditValue === NULL) { // Lookup from database\n\t\t\t\t\t$filterWrk = \"\\\"firelink_doc_no\\\"\" . SearchString(\"=\", $curVal, DATATYPE_STRING, \"\");\n\t\t\t\t\t$sqlWrk = $this->firelink_doc_no->Lookup->getSql(FALSE, $filterWrk, '', $this);\n\t\t\t\t\t$rswrk = Conn()->execute($sqlWrk);\n\t\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t\t$arwrk[1] = HtmlEncode(strtoupper($rswrk->fields('df')));\n\t\t\t\t\t\t$arwrk[2] = HtmlEncode(strtoupper($rswrk->fields('df2')));\n\t\t\t\t\t\t$this->firelink_doc_no->EditValue = $this->firelink_doc_no->displayValue($arwrk);\n\t\t\t\t\t\t$rswrk->Close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->firelink_doc_no->EditValue = HtmlEncode($this->firelink_doc_no->CurrentValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->firelink_doc_no->EditValue = NULL;\n\t\t\t}\n\t\t\t$this->firelink_doc_no->PlaceHolder = RemoveHtml($this->firelink_doc_no->caption());\n\n\t\t\t// submit_no\n\t\t\t$this->submit_no->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->submit_no->EditCustomAttributes = \"\";\n\t\t\t$this->submit_no->EditValue = HtmlEncode($this->submit_no->CurrentValue);\n\t\t\t$this->submit_no->PlaceHolder = RemoveHtml($this->submit_no->caption());\n\n\t\t\t// revision_no\n\t\t\t$this->revision_no->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->revision_no->EditCustomAttributes = \"\";\n\t\t\tif (REMOVE_XSS)\n\t\t\t\t$this->revision_no->CurrentValue = HtmlDecode($this->revision_no->CurrentValue);\n\t\t\t$this->revision_no->EditValue = HtmlEncode($this->revision_no->CurrentValue);\n\t\t\t$this->revision_no->PlaceHolder = RemoveHtml($this->revision_no->caption());\n\n\t\t\t// transmit_no\n\t\t\t$this->transmit_no->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->transmit_no->EditCustomAttributes = \"\";\n\t\t\tif (REMOVE_XSS)\n\t\t\t\t$this->transmit_no->CurrentValue = HtmlDecode($this->transmit_no->CurrentValue);\n\t\t\t$this->transmit_no->EditValue = HtmlEncode($this->transmit_no->CurrentValue);\n\t\t\t$curVal = strval($this->transmit_no->CurrentValue);\n\t\t\tif ($curVal <> \"\") {\n\t\t\t\t$this->transmit_no->EditValue = $this->transmit_no->lookupCacheOption($curVal);\n\t\t\t\tif ($this->transmit_no->EditValue === NULL) { // Lookup from database\n\t\t\t\t\t$filterWrk = \"\\\"transmittal_no\\\"\" . SearchString(\"=\", $curVal, DATATYPE_STRING, \"\");\n\t\t\t\t\t$sqlWrk = $this->transmit_no->Lookup->getSql(FALSE, $filterWrk, '', $this);\n\t\t\t\t\t$rswrk = Conn()->execute($sqlWrk);\n\t\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t\t$arwrk[1] = HtmlEncode(strtoupper($rswrk->fields('df')));\n\t\t\t\t\t\t$this->transmit_no->EditValue = $this->transmit_no->displayValue($arwrk);\n\t\t\t\t\t\t$rswrk->Close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->transmit_no->EditValue = HtmlEncode($this->transmit_no->CurrentValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->transmit_no->EditValue = NULL;\n\t\t\t}\n\t\t\t$this->transmit_no->PlaceHolder = RemoveHtml($this->transmit_no->caption());\n\n\t\t\t// transmit_date\n\t\t\t$this->transmit_date->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->transmit_date->EditCustomAttributes = \"\";\n\t\t\t$this->transmit_date->EditValue = HtmlEncode(FormatDateTime($this->transmit_date->CurrentValue, 8));\n\t\t\t$this->transmit_date->PlaceHolder = RemoveHtml($this->transmit_date->caption());\n\n\t\t\t// direction\n\t\t\t$this->direction->EditCustomAttributes = \"\";\n\t\t\t$this->direction->EditValue = $this->direction->options(FALSE);\n\n\t\t\t// approval_status\n\t\t\t$this->approval_status->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->approval_status->EditCustomAttributes = \"\";\n\t\t\t$curVal = trim(strval($this->approval_status->CurrentValue));\n\t\t\tif ($curVal <> \"\")\n\t\t\t\t$this->approval_status->ViewValue = $this->approval_status->lookupCacheOption($curVal);\n\t\t\telse\n\t\t\t\t$this->approval_status->ViewValue = $this->approval_status->Lookup !== NULL && is_array($this->approval_status->Lookup->Options) ? $curVal : NULL;\n\t\t\tif ($this->approval_status->ViewValue !== NULL) { // Load from cache\n\t\t\t\t$this->approval_status->EditValue = array_values($this->approval_status->Lookup->Options);\n\t\t\t} else { // Lookup from database\n\t\t\t\tif ($curVal == \"\") {\n\t\t\t\t\t$filterWrk = \"0=1\";\n\t\t\t\t} else {\n\t\t\t\t\t$filterWrk = \"\\\"short_code\\\"\" . SearchString(\"=\", $this->approval_status->CurrentValue, DATATYPE_STRING, \"\");\n\t\t\t\t}\n\t\t\t\t$sqlWrk = $this->approval_status->Lookup->getSql(TRUE, $filterWrk, '', $this);\n\t\t\t\t$rswrk = Conn()->execute($sqlWrk);\n\t\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t\t$rowcnt = count($arwrk);\n\t\t\t\tfor ($i = 0; $i < $rowcnt; $i++) {\n\t\t\t\t\t$arwrk[$i][1] = strtoupper($arwrk[$i][1]);\n\t\t\t\t\t$arwrk[$i][2] = strtoupper($arwrk[$i][2]);\n\t\t\t\t}\n\t\t\t\t$this->approval_status->EditValue = $arwrk;\n\t\t\t}\n\n\t\t\t// document_link\n\t\t\t$this->document_link->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->document_link->EditCustomAttributes = \"\";\n\t\t\tif (!EmptyValue($this->document_link->Upload->DbValue)) {\n\t\t\t\t$this->document_link->EditValue = $this->document_link->Upload->DbValue;\n\t\t\t} else {\n\t\t\t\t$this->document_link->EditValue = \"\";\n\t\t\t}\n\t\t\tif (!EmptyValue($this->document_link->CurrentValue))\n\t\t\t\t\t$this->document_link->Upload->FileName = $this->document_link->CurrentValue;\n\t\t\tif (($this->isShow() || $this->isCopy()) && !$this->EventCancelled)\n\t\t\t\tRenderUploadField($this->document_link);\n\n\t\t\t// document_native\n\t\t\t$this->document_native->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->document_native->EditCustomAttributes = \"\";\n\t\t\t$this->document_native->EditValue = HtmlEncode($this->document_native->CurrentValue);\n\t\t\t$this->document_native->PlaceHolder = RemoveHtml($this->document_native->caption());\n\n\t\t\t// expiry_date\n\t\t\t$this->expiry_date->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->expiry_date->EditCustomAttributes = \"\";\n\t\t\t$this->expiry_date->EditValue = HtmlEncode(FormatDateTime($this->expiry_date->CurrentValue, 8));\n\t\t\t$this->expiry_date->PlaceHolder = RemoveHtml($this->expiry_date->caption());\n\n\t\t\t// Add refer script\n\t\t\t// firelink_doc_no\n\n\t\t\t$this->firelink_doc_no->LinkCustomAttributes = \"\";\n\t\t\tif (!EmptyValue($this->document_link->Upload->DbValue)) {\n\t\t\t\t$this->firelink_doc_no->HrefValue = GetFileUploadUrl($this->document_link, $this->document_link->Upload->DbValue); // Add prefix/suffix\n\t\t\t\t$this->firelink_doc_no->LinkAttrs[\"target\"] = \"_blank\"; // Add target\n\t\t\t\tif ($this->isExport()) $this->firelink_doc_no->HrefValue = FullUrl($this->firelink_doc_no->HrefValue, \"href\");\n\t\t\t} else {\n\t\t\t\t$this->firelink_doc_no->HrefValue = \"\";\n\t\t\t}\n\n\t\t\t// submit_no\n\t\t\t$this->submit_no->LinkCustomAttributes = \"\";\n\t\t\t$this->submit_no->HrefValue = \"\";\n\n\t\t\t// revision_no\n\t\t\t$this->revision_no->LinkCustomAttributes = \"\";\n\t\t\t$this->revision_no->HrefValue = \"\";\n\n\t\t\t// transmit_no\n\t\t\t$this->transmit_no->LinkCustomAttributes = \"\";\n\t\t\t$this->transmit_no->HrefValue = \"\";\n\n\t\t\t// transmit_date\n\t\t\t$this->transmit_date->LinkCustomAttributes = \"\";\n\t\t\t$this->transmit_date->HrefValue = \"\";\n\n\t\t\t// direction\n\t\t\t$this->direction->LinkCustomAttributes = \"\";\n\t\t\t$this->direction->HrefValue = \"\";\n\n\t\t\t// approval_status\n\t\t\t$this->approval_status->LinkCustomAttributes = \"\";\n\t\t\t$this->approval_status->HrefValue = \"\";\n\n\t\t\t// document_link\n\t\t\t$this->document_link->LinkCustomAttributes = \"\";\n\t\t\tif (!EmptyValue($this->document_link->Upload->DbValue)) {\n\t\t\t\t$this->document_link->HrefValue = GetFileUploadUrl($this->document_link, $this->document_link->Upload->DbValue); // Add prefix/suffix\n\t\t\t\t$this->document_link->LinkAttrs[\"target\"] = \"_blank\"; // Add target\n\t\t\t\tif ($this->isExport()) $this->document_link->HrefValue = FullUrl($this->document_link->HrefValue, \"href\");\n\t\t\t} else {\n\t\t\t\t$this->document_link->HrefValue = \"\";\n\t\t\t}\n\t\t\t$this->document_link->ExportHrefValue = $this->document_link->UploadPath . $this->document_link->Upload->DbValue;\n\n\t\t\t// document_native\n\t\t\t$this->document_native->LinkCustomAttributes = \"\";\n\t\t\t$this->document_native->HrefValue = \"\";\n\n\t\t\t// expiry_date\n\t\t\t$this->expiry_date->LinkCustomAttributes = \"\";\n\t\t\t$this->expiry_date->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == ROWTYPE_ADD || $this->RowType == ROWTYPE_EDIT || $this->RowType == ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->setupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "public function getHtml()\n {\n $header = new TableHeader($this);\n $header->addText('Dokument');\n $header->addText('Ersteller');\n $header->addEmpty();\n\n\n $fileReader = new FileReader();\n\n $contentLogModel = new ContentLogModel();\n $fileReader->addFieldByModel($contentLogModel);\n\n $userModel = new UserModel();\n $fileReader->addFieldByModel($userModel);\n\n $join = new ModelJoin($fileReader);\n $join->externalModel = $contentLogModel;\n $join->type = $fileReader->model->id;\n $join->externalType = $contentLogModel->dataId;\n\n $join = new ModelJoin($fileReader);\n $join->externalModel = $userModel;\n $join->type = $contentLogModel->userCreatedId;;\n $join->externalType = $userModel->id;\n\n $fileReader->filter->andEqual($contentLogModel->parentId, $this->dataId);\n $fileReader->filter->andEqual($contentLogModel->contentTypeId, (new FileTemplateStatus())->contentId);\n\n\n foreach ($fileReader->getData() as $fileRow) {\n\n $row = new TableRow($this);\n\n if (!$fileRow->delete) {\n $row->addHyperlink($fileRow->file->getUrl(), $fileRow->file->getFilename());\n\n } else {\n\n $stroke = new Strike($row);\n $stroke->content = $fileRow->file->getFilename();\n\n }\n // show image bzw. detail ansicht\n\n $userDisplay = $fileRow->getModelValue($userModel->displayName);\n $dateTimeCreated = new DateTime($fileRow->getModelValue($contentLogModel->dateTimeCreated));\n\n $row->addText($userDisplay . ' ' . $dateTimeCreated->getShortDateTimeLeadingZeroFormat());\n\n if (!$fileRow->delete) {\n $site = clone(FileDeleteSite::$site);\n $site->addParameter(new FileParameter($fileRow->id));\n $site->addParameter(new DataIdParameter($this->dataId));\n $row->addIconSite($site);\n } else {\n $row->addEmpty();\n }\n\n\n }\n\n return parent::getHtml();\n\n }", "public function visualizzazione(){\n $nameColumn = $this->getColumnName();\n $tuple = $this->read();\n foreach($nameColumn as $nome){\n $x = ' <td> '. $nome . ' </td> ';\n echo $x;\n }\n \n foreach($tuple as $ris){\n $str ='<tr> <td> '.$ris->getId(). ' </td> '.\n '<td> '.$ris->getNome(). '</td>'.\n '<td> '.$ris->getUsername(). '</td>'.\n '<td> '.$ris->getPassword(). '</td>'.\n '<td> '.$ris->getEmail(). '</td>'.\n '<td> '.$ris->getMuseo(). '</td>'.\n '</tr>';\n echo $str;\n };\n }", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Convert decimal values if posted back\r\n\r\n\t\tif ($this->PrecioUnitario->FormValue == $this->PrecioUnitario->CurrentValue && is_numeric(ew_StrToFloat($this->PrecioUnitario->CurrentValue)))\r\n\t\t\t$this->PrecioUnitario->CurrentValue = ew_StrToFloat($this->PrecioUnitario->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->MontoDescuento->FormValue == $this->MontoDescuento->CurrentValue && is_numeric(ew_StrToFloat($this->MontoDescuento->CurrentValue)))\r\n\t\t\t$this->MontoDescuento->CurrentValue = ew_StrToFloat($this->MontoDescuento->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->Precio_SIM->FormValue == $this->Precio_SIM->CurrentValue && is_numeric(ew_StrToFloat($this->Precio_SIM->CurrentValue)))\r\n\t\t\t$this->Precio_SIM->CurrentValue = ew_StrToFloat($this->Precio_SIM->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->Monto->FormValue == $this->Monto->CurrentValue && is_numeric(ew_StrToFloat($this->Monto->CurrentValue)))\r\n\t\t\t$this->Monto->CurrentValue = ew_StrToFloat($this->Monto->CurrentValue);\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Id_Venta_Eq\r\n\t\t// CLIENTE\r\n\t\t// Id_Articulo\r\n\t\t// Acabado_eq\r\n\t\t// Num_IMEI\r\n\t\t// Num_ICCID\r\n\t\t// Num_CEL\r\n\t\t// Causa\r\n\t\t// Con_SIM\r\n\t\t// Observaciones\r\n\t\t// PrecioUnitario\r\n\t\t// MontoDescuento\r\n\t\t// Precio_SIM\r\n\t\t// Monto\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// Id_Venta_Eq\r\n\t\t\t$this->Id_Venta_Eq->ViewValue = $this->Id_Venta_Eq->CurrentValue;\r\n\t\t\t$this->Id_Venta_Eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->ViewValue = $this->CLIENTE->CurrentValue;\r\n\t\t\t$this->CLIENTE->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\tif (strval($this->Id_Articulo->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id_Articulo`\" . ew_SearchString(\"=\", $this->Id_Articulo->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Articulo`, `Articulo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ca_articulos`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Articulo`\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Id_Articulo->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Id_Articulo->ViewValue = $this->Id_Articulo->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Articulo->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Id_Articulo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->ViewValue = $this->Acabado_eq->CurrentValue;\r\n\t\t\t$this->Acabado_eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->ViewValue = $this->Num_IMEI->CurrentValue;\r\n\t\t\t$this->Num_IMEI->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->ViewValue = $this->Num_ICCID->CurrentValue;\r\n\t\t\t$this->Num_ICCID->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->ViewValue = $this->Num_CEL->CurrentValue;\r\n\t\t\t$this->Num_CEL->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\tif (strval($this->Causa->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Causa->CurrentValue) {\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(1) <> \"\" ? $this->Causa->FldTagCaption(1) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(2) <> \"\" ? $this->Causa->FldTagCaption(2) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(3):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(3) <> \"\" ? $this->Causa->FldTagCaption(3) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(4):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(4) <> \"\" ? $this->Causa->FldTagCaption(4) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Causa->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Causa->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\tif (strval($this->Con_SIM->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Con_SIM->CurrentValue) {\r\n\t\t\t\t\tcase $this->Con_SIM->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->FldTagCaption(1) <> \"\" ? $this->Con_SIM->FldTagCaption(1) : $this->Con_SIM->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Con_SIM->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->FldTagCaption(2) <> \"\" ? $this->Con_SIM->FldTagCaption(2) : $this->Con_SIM->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Con_SIM->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Con_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->ViewValue = $this->Observaciones->CurrentValue;\r\n\t\t\t$this->Observaciones->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->ViewValue = $this->PrecioUnitario->CurrentValue;\r\n\t\t\t$this->PrecioUnitario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->ViewValue = $this->MontoDescuento->CurrentValue;\r\n\t\t\t$this->MontoDescuento->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->ViewValue = $this->Precio_SIM->CurrentValue;\r\n\t\t\t$this->Precio_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->ViewValue = $this->Monto->CurrentValue;\r\n\t\t\t$this->Monto->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->LinkCustomAttributes = \"\";\r\n\t\t\t$this->CLIENTE->HrefValue = \"\";\r\n\t\t\t$this->CLIENTE->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Articulo->HrefValue = \"\";\r\n\t\t\t$this->Id_Articulo->TooltipValue = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Acabado_eq->HrefValue = \"\";\r\n\t\t\t$this->Acabado_eq->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_IMEI->HrefValue = \"\";\r\n\t\t\t$this->Num_IMEI->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_ICCID->HrefValue = \"\";\r\n\t\t\t$this->Num_ICCID->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_CEL->HrefValue = \"\";\r\n\t\t\t$this->Num_CEL->TooltipValue = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Causa->HrefValue = \"\";\r\n\t\t\t$this->Causa->TooltipValue = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Con_SIM->HrefValue = \"\";\r\n\t\t\t$this->Con_SIM->TooltipValue = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Observaciones->HrefValue = \"\";\r\n\t\t\t$this->Observaciones->TooltipValue = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->LinkCustomAttributes = \"\";\r\n\t\t\t$this->PrecioUnitario->HrefValue = \"\";\r\n\t\t\t$this->PrecioUnitario->TooltipValue = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->MontoDescuento->HrefValue = \"\";\r\n\t\t\t$this->MontoDescuento->TooltipValue = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Precio_SIM->HrefValue = \"\";\r\n\t\t\t$this->Precio_SIM->TooltipValue = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Monto->HrefValue = \"\";\r\n\t\t\t$this->Monto->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->EditCustomAttributes = \"\";\r\n\t\t\t$this->CLIENTE->EditValue = $this->CLIENTE->CurrentValue;\r\n\t\t\t$this->CLIENTE->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->EditCustomAttributes = \"\";\r\n\t\t\tif (strval($this->Id_Articulo->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id_Articulo`\" . ew_SearchString(\"=\", $this->Id_Articulo->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Articulo`, `Articulo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ca_articulos`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Articulo`\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Id_Articulo->EditValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Id_Articulo->EditValue = $this->Id_Articulo->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Articulo->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Id_Articulo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->EditCustomAttributes = \"\";\r\n\t\t\t$this->Acabado_eq->EditValue = $this->Acabado_eq->CurrentValue;\r\n\t\t\t$this->Acabado_eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->EditCustomAttributes = \"\";\r\n\t\t\t$this->Num_IMEI->EditValue = $this->Num_IMEI->CurrentValue;\r\n\t\t\t$this->Num_IMEI->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->EditCustomAttributes = \"onchange= 'ValidaICCID(this);' \";\r\n\t\t\t$this->Num_ICCID->EditValue = $this->Num_ICCID->CurrentValue;\r\n\t\t\t$this->Num_ICCID->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->EditCustomAttributes = \"\";\r\n\t\t\t$this->Num_CEL->EditValue = $this->Num_CEL->CurrentValue;\r\n\t\t\t$this->Num_CEL->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->EditCustomAttributes = \"\";\r\n\t\t\tif (strval($this->Causa->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Causa->CurrentValue) {\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(1) <> \"\" ? $this->Causa->FldTagCaption(1) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(2) <> \"\" ? $this->Causa->FldTagCaption(2) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(3):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(3) <> \"\" ? $this->Causa->FldTagCaption(3) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(4):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(4) <> \"\" ? $this->Causa->FldTagCaption(4) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Causa->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Causa->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Con_SIM->FldTagValue(1), $this->Con_SIM->FldTagCaption(1) <> \"\" ? $this->Con_SIM->FldTagCaption(1) : $this->Con_SIM->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Con_SIM->FldTagValue(2), $this->Con_SIM->FldTagCaption(2) <> \"\" ? $this->Con_SIM->FldTagCaption(2) : $this->Con_SIM->FldTagValue(2));\r\n\t\t\t$this->Con_SIM->EditValue = $arwrk;\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->EditCustomAttributes = 'class=\"mayusculas\" onchange=\"conMayusculas(this)\" autocomplete=\"off\" ';\r\n\t\t\t$this->Observaciones->EditValue = ew_HtmlEncode($this->Observaciones->CurrentValue);\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->EditCustomAttributes = \"\";\r\n\t\t\t$this->PrecioUnitario->EditValue = $this->PrecioUnitario->CurrentValue;\r\n\t\t\t$this->PrecioUnitario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->EditCustomAttributes = \"\";\r\n\t\t\t$this->MontoDescuento->EditValue = $this->MontoDescuento->CurrentValue;\r\n\t\t\t$this->MontoDescuento->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->EditCustomAttributes = \"\";\r\n\t\t\t$this->Precio_SIM->EditValue = $this->Precio_SIM->CurrentValue;\r\n\t\t\t$this->Precio_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->EditCustomAttributes = \"\";\r\n\t\t\t$this->Monto->EditValue = $this->Monto->CurrentValue;\r\n\t\t\t$this->Monto->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// CLIENTE\r\n\r\n\t\t\t$this->CLIENTE->HrefValue = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->HrefValue = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->HrefValue = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->HrefValue = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->HrefValue = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->HrefValue = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->HrefValue = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->HrefValue = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->HrefValue = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->HrefValue = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->HrefValue = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->HrefValue = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "private function newRow(){\n\t\t$r = new HtmlBox('tr');\n\t\tfor($i=0;$i<$this->col;$i++)\n\t\t\t$r->add(new HtmlBox('td')) ;\n\t\t$this->row++;\n\t\t$this->add($r);\n\t\treturn $this;\n\t}", "function addRow($rowData, $options = array()) {\r\n\r\n\t $this->rowCount++;\r\n\r\n\t $rowalign = _get_option($options, \"align\", false);\r\n\r\n\t // Start the row, indicate even/oneven\r\n\t $html = \" <tr class=\\\"\";\r\n\t if ( _get_option($options, \"static\", false)) {\r\n\t\t\t$html .= \"static\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$html .= (($this->rowCount % 2) == 0) ? \"even\" : \"oneven\";\r\n\t\t}\r\n\r\n\t\t$html .= \" \" . _get_option($options, \"rowClass\", \"\");\r\n\r\n\t\t$html .= \"\\\"\";\r\n\r\n\t\t$style = _get_option($options, \"style\", \"\");\r\n\r\n\t if ( $style != \"\") {\r\n\t $html .= \" style=\\\"$style\\\"\";\r\n\t }\r\n\r\n // Insert user defined attributes for the tr tag\r\n foreach(_get_option($options, \"trAttributes\", array()) as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\r\n\t\t$html .= \">\\n\";\r\n\r\n\t // Draw each cell in the row\r\n\t\tfor($i = 0; $i < $this->colCount; $i++) {\r\n\r\n\t\t // Opening td tag with options\r\n \t\t$html .= \" <td\";\r\n\r\n\t\t\t$html .= \" id='cell_\" . $this->rowCount . \"_$i'\";\r\n\r\n \t\tif ($rowalign) {\r\n\t\t\t $html .= \" align=\\\"$rowalign\\\"\";\r\n\t\t\t}\r\n\t\t else if ( isset($this->columnInfo[$i][\"align\"])) {\r\n\t\t\t $html .= \" align=\\\"\" . $this->columnInfo[$i][\"align\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_array($rowData[$i]) && isset($rowData[$i][\"style\"]) ) {\r\n \t\t\t $html .= \" style=\\\"\" . $rowData[$i][\"style\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['tdAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['tdAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\r\n\t\t\t$cellContent = '';\r\n\r\n\t\t\t$html .=\"<div style='overflow:hidden' \";\r\n\r\n\t\t\t// Cell content or empty\r\n\t\t\tif ( ! is_array($rowData[$i]) ){\r\n\t\t\t $cellContent = $rowData[$i];\r\n\r\n if (is_object($cellContent) && method_exists($cellContent, '__toString'))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags((string) $cellContent)));\r\n }\r\n elseif (! is_object($cellContent))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse if ( is_array($rowData[$i]) && isset($rowData[$i][\"content\"]) ) {\r\n\t\t\t\t$cellContent = $rowData[$i][\"content\"];\r\n if (! isset($rowData[$i]['divAttributes']['title']))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $cellContent = \"&nbsp;\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['divAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['divAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\t\t\t$html .= $cellContent;\r\n\r\n\t\t\t// End of cell\r\n\t\t\t$html .= \"</div>\";\r\n\t\t\t$html .= \" </td>\\n\";\r\n\t\t}\r\n\r\n\t\t// End of row\r\n\t\t$html .= \" </tr>\\n\";\r\n\t\t$this->rowDataHtml .= $html;\r\n\t}", "protected function renderTableSeparateBlock(): string\n {\n return\n '<tbody class=\"skipped\">' .\n '<tr>' .\n '<td></td>' .\n '</tr>' .\n '</tbody>';\n }", "function display_rows() {\n\n //Récuperation des quotes\n $records = $this->items;\n\n //Récuperation des colonnes\n list( $columns, $hidden ) = $this->get_column_info();\n if(!empty($records)){\n //pour chaque quote\n foreach($records as $rec){\n\n echo '<tr id=\"record_'.$rec->id.'\">';\n foreach ( $columns as $column_name => $column_display_name ) {\n\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n $editlink = '/wp-admin/link.php?action=edit&id='.(int)$rec->id;\n\n switch ( $column_name ) {\n case \"col_id\":\techo '<td '.$attributes.'>'.stripslashes($rec->id).'</td>';\tbreak;\n case \"col_author\": echo '<td '.$attributes.'>'.stripslashes($rec->author).'</td>'; break;\n case \"col_quote\": echo '<td '.$attributes.'>'.stripslashes($rec->quote).'</td>'; break;\n case \"col_action\": echo '<td '.$attributes.'><a class=\"button\" style=\"margin-right:10px;\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=edit\">Editer</a><a class=\"button\" onclick=\"return confirm(\\'Etes-vous sur de vouloir supprimer la quote ?\\')\" href=\"admin.php?page=add_funny_quotes&quote='.stripslashes($rec->id).'&action=delete\">Supprimer</a></td>'; break;\n }\n\n }\n\n echo'</tr>';\n\n }\n }\n }", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "public function render()\r\n {\r\n $widths = $this->calculateWidths();\r\n\r\n $table = $this->renderHeaders($widths);\r\n $table .= $this->renderRows($widths);\r\n\r\n return $table;\r\n }", "public function table($element) {\n return render($element);\n }", "function render($row)\n\t{\n\t\tlist($zone,$page,$limit_to)=$row['extra'];\n\t\treturn $this->decide_template($zone,$page,$limit_to);\n\t}", "public function addRow() {\n if ($this->linesCount >= 0)\n $this->addContent('</div>');\n $this->linesCount ++;\n $this->colunsCount = 0;\n $this->addContent('<div class=\"row\" >');\n }", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $filesystem;\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$filesystem->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// id\r\n\r\n\t\t$filesystem->id->CellCssStyle = \"\";\r\n\t\t$filesystem->id->CellCssClass = \"\";\r\n\r\n\t\t// mount\r\n\t\t$filesystem->mount->CellCssStyle = \"\";\r\n\t\t$filesystem->mount->CellCssClass = \"\";\r\n\r\n\t\t// path\r\n\t\t$filesystem->path->CellCssStyle = \"\";\r\n\t\t$filesystem->path->CellCssClass = \"\";\r\n\r\n\t\t// parent\r\n\t\t$filesystem->parent->CellCssStyle = \"\";\r\n\t\t$filesystem->parent->CellCssClass = \"\";\r\n\r\n\t\t// deprecated\r\n\t\t$filesystem->deprecated->CellCssStyle = \"\";\r\n\t\t$filesystem->deprecated->CellCssClass = \"\";\r\n\r\n\t\t// gid\r\n\t\t$filesystem->gid->CellCssStyle = \"\";\r\n\t\t$filesystem->gid->CellCssClass = \"\";\r\n\r\n\t\t// snapshot\r\n\t\t$filesystem->snapshot->CellCssStyle = \"\";\r\n\t\t$filesystem->snapshot->CellCssClass = \"\";\r\n\r\n\t\t// tapebackup\r\n\t\t$filesystem->tapebackup->CellCssStyle = \"\";\r\n\t\t$filesystem->tapebackup->CellCssClass = \"\";\r\n\r\n\t\t// diskbackup\r\n\t\t$filesystem->diskbackup->CellCssStyle = \"\";\r\n\t\t$filesystem->diskbackup->CellCssClass = \"\";\r\n\r\n\t\t// type\r\n\t\t$filesystem->type->CellCssStyle = \"\";\r\n\t\t$filesystem->type->CellCssClass = \"\";\r\n\r\n\t\t// contact\r\n\t\t$filesystem->contact->CellCssStyle = \"\";\r\n\t\t$filesystem->contact->CellCssClass = \"\";\r\n\r\n\t\t// contact2\r\n\t\t$filesystem->contact2->CellCssStyle = \"\";\r\n\t\t$filesystem->contact2->CellCssClass = \"\";\r\n\r\n\t\t// rescomp\r\n\t\t$filesystem->rescomp->CellCssStyle = \"\";\r\n\t\t$filesystem->rescomp->CellCssClass = \"\";\r\n\t\tif ($filesystem->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// id\r\n\t\t\t$filesystem->id->ViewValue = $filesystem->id->CurrentValue;\r\n\t\t\t$filesystem->id->CssStyle = \"\";\r\n\t\t\t$filesystem->id->CssClass = \"\";\r\n\t\t\t$filesystem->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$filesystem->mount->ViewValue = $filesystem->mount->CurrentValue;\r\n\t\t\t$filesystem->mount->CssStyle = \"\";\r\n\t\t\t$filesystem->mount->CssClass = \"\";\r\n\t\t\t$filesystem->mount->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$filesystem->path->ViewValue = $filesystem->path->CurrentValue;\r\n\t\t\t$filesystem->path->CssStyle = \"\";\r\n\t\t\t$filesystem->path->CssClass = \"\";\r\n\t\t\t$filesystem->path->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$filesystem->parent->ViewValue = $filesystem->parent->CurrentValue;\r\n\t\t\t$filesystem->parent->CssStyle = \"\";\r\n\t\t\t$filesystem->parent->CssClass = \"\";\r\n\t\t\t$filesystem->parent->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$filesystem->deprecated->ViewValue = $filesystem->deprecated->CurrentValue;\r\n\t\t\t$filesystem->deprecated->CssStyle = \"\";\r\n\t\t\t$filesystem->deprecated->CssClass = \"\";\r\n\t\t\t$filesystem->deprecated->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// gid\r\n\t\t\tif (strval($filesystem->gid->CurrentValue) <> \"\") {\r\n\t\t\t\t$sSqlWrk = \"SELECT `id`, `name` FROM `grp` WHERE `id` = \" . ew_AdjustSql($filesystem->gid->CurrentValue) . \"\";\r\n\t\t\t\t$sSqlWrk .= \" ORDER BY `id` Asc\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup value(s) found\r\n\t\t\t\t\t$filesystem->gid->ViewValue = $rswrk->fields('id');\r\n\t\t\t\t\t$filesystem->gid->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('name');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$filesystem->gid->ViewValue = $filesystem->gid->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$filesystem->gid->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$filesystem->gid->CssStyle = \"\";\r\n\t\t\t$filesystem->gid->CssClass = \"\";\r\n\t\t\t$filesystem->gid->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$filesystem->snapshot->ViewValue = $filesystem->snapshot->CurrentValue;\r\n\t\t\t$filesystem->snapshot->CssStyle = \"\";\r\n\t\t\t$filesystem->snapshot->CssClass = \"\";\r\n\t\t\t$filesystem->snapshot->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$filesystem->tapebackup->ViewValue = $filesystem->tapebackup->CurrentValue;\r\n\t\t\t$filesystem->tapebackup->CssStyle = \"\";\r\n\t\t\t$filesystem->tapebackup->CssClass = \"\";\r\n\t\t\t$filesystem->tapebackup->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$filesystem->diskbackup->ViewValue = $filesystem->diskbackup->CurrentValue;\r\n\t\t\t$filesystem->diskbackup->CssStyle = \"\";\r\n\t\t\t$filesystem->diskbackup->CssClass = \"\";\r\n\t\t\t$filesystem->diskbackup->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\tif (strval($filesystem->type->CurrentValue) <> \"\") {\r\n\t\t\t\t$sSqlWrk = \"SELECT `id`, `name` FROM `server_type` WHERE `id` = \" . ew_AdjustSql($filesystem->type->CurrentValue) . \"\";\r\n\t\t\t\t$sSqlWrk .= \" ORDER BY `id` Asc\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup value(s) found\r\n\t\t\t\t\t$filesystem->type->ViewValue = $rswrk->fields('id');\r\n\t\t\t\t\t$filesystem->type->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('name');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$filesystem->type->ViewValue = $filesystem->type->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$filesystem->type->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$filesystem->type->CssStyle = \"\";\r\n\t\t\t$filesystem->type->CssClass = \"\";\r\n\t\t\t$filesystem->type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// contact\r\n\t\t\t$filesystem->contact->ViewValue = $filesystem->contact->CurrentValue;\r\n\t\t\t$filesystem->contact->CssStyle = \"\";\r\n\t\t\t$filesystem->contact->CssClass = \"\";\r\n\t\t\t$filesystem->contact->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// contact2\r\n\t\t\t$filesystem->contact2->ViewValue = $filesystem->contact2->CurrentValue;\r\n\t\t\t$filesystem->contact2->CssStyle = \"\";\r\n\t\t\t$filesystem->contact2->CssClass = \"\";\r\n\t\t\t$filesystem->contact2->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// rescomp\r\n\t\t\t$filesystem->rescomp->ViewValue = $filesystem->rescomp->CurrentValue;\r\n\t\t\t$filesystem->rescomp->CssStyle = \"\";\r\n\t\t\t$filesystem->rescomp->CssClass = \"\";\r\n\t\t\t$filesystem->rescomp->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$filesystem->id->HrefValue = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$filesystem->mount->HrefValue = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$filesystem->path->HrefValue = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$filesystem->parent->HrefValue = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$filesystem->deprecated->HrefValue = \"\";\r\n\r\n\t\t\t// gid\r\n\t\t\t$filesystem->gid->HrefValue = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$filesystem->snapshot->HrefValue = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$filesystem->tapebackup->HrefValue = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$filesystem->diskbackup->HrefValue = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$filesystem->type->HrefValue = \"\";\r\n\r\n\t\t\t// contact\r\n\t\t\t$filesystem->contact->HrefValue = \"\";\r\n\r\n\t\t\t// contact2\r\n\t\t\t$filesystem->contact2->HrefValue = \"\";\r\n\r\n\t\t\t// rescomp\r\n\t\t\t$filesystem->rescomp->HrefValue = \"\";\r\n\t\t} elseif ($filesystem->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\n\r\n\t\t\t// id\r\n\t\t\t$filesystem->id->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->id->EditValue = $filesystem->id->CurrentValue;\r\n\t\t\t$filesystem->id->CssStyle = \"\";\r\n\t\t\t$filesystem->id->CssClass = \"\";\r\n\t\t\t$filesystem->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$filesystem->mount->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->mount->EditValue = $filesystem->mount->CurrentValue;\r\n\t\t\t$filesystem->mount->CssStyle = \"\";\r\n\t\t\t$filesystem->mount->CssClass = \"\";\r\n\t\t\t$filesystem->mount->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$filesystem->path->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->path->EditValue = $filesystem->path->CurrentValue;\r\n\t\t\t$filesystem->path->CssStyle = \"\";\r\n\t\t\t$filesystem->path->CssClass = \"\";\r\n\t\t\t$filesystem->path->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$filesystem->parent->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->parent->EditValue = $filesystem->parent->CurrentValue;\r\n\t\t\t$filesystem->parent->CssStyle = \"\";\r\n\t\t\t$filesystem->parent->CssClass = \"\";\r\n\t\t\t$filesystem->parent->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$filesystem->deprecated->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->deprecated->EditValue = $filesystem->deprecated->CurrentValue;\r\n\t\t\t$filesystem->deprecated->CssStyle = \"\";\r\n\t\t\t$filesystem->deprecated->CssClass = \"\";\r\n\t\t\t$filesystem->deprecated->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// gid\r\n\t\t\t$filesystem->gid->EditCustomAttributes = \"\";\r\n\t\t\tif ($filesystem->gid->getSessionValue() <> \"\") {\r\n\t\t\t\t$filesystem->gid->CurrentValue = $filesystem->gid->getSessionValue();\r\n\t\t\tif (strval($filesystem->gid->CurrentValue) <> \"\") {\r\n\t\t\t\t$sSqlWrk = \"SELECT `id`, `name` FROM `grp` WHERE `id` = \" . ew_AdjustSql($filesystem->gid->CurrentValue) . \"\";\r\n\t\t\t\t$sSqlWrk .= \" ORDER BY `id` Asc\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup value(s) found\r\n\t\t\t\t\t$filesystem->gid->ViewValue = $rswrk->fields('id');\r\n\t\t\t\t\t$filesystem->gid->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('name');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$filesystem->gid->ViewValue = $filesystem->gid->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$filesystem->gid->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$filesystem->gid->CssStyle = \"\";\r\n\t\t\t$filesystem->gid->CssClass = \"\";\r\n\t\t\t$filesystem->gid->ViewCustomAttributes = \"\";\r\n\t\t\t} else {\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `id`, `name`, '' AS SelectFilterFld FROM `grp`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE $sWhereWrk\";\r\n\t\t\t$sSqlWrk .= \" ORDER BY `id` Asc\";\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", \"Please Select\", \"\"));\r\n\t\t\t$filesystem->gid->EditValue = $arwrk;\r\n\t\t\t}\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$filesystem->snapshot->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->snapshot->EditValue = ew_HtmlEncode($filesystem->snapshot->CurrentValue);\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$filesystem->tapebackup->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->tapebackup->EditValue = ew_HtmlEncode($filesystem->tapebackup->CurrentValue);\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$filesystem->diskbackup->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->diskbackup->EditValue = ew_HtmlEncode($filesystem->diskbackup->CurrentValue);\r\n\r\n\t\t\t// type\r\n\t\t\t$filesystem->type->EditCustomAttributes = \"\";\r\n\t\t\tif ($filesystem->type->getSessionValue() <> \"\") {\r\n\t\t\t\t$filesystem->type->CurrentValue = $filesystem->type->getSessionValue();\r\n\t\t\tif (strval($filesystem->type->CurrentValue) <> \"\") {\r\n\t\t\t\t$sSqlWrk = \"SELECT `id`, `name` FROM `server_type` WHERE `id` = \" . ew_AdjustSql($filesystem->type->CurrentValue) . \"\";\r\n\t\t\t\t$sSqlWrk .= \" ORDER BY `id` Asc\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup value(s) found\r\n\t\t\t\t\t$filesystem->type->ViewValue = $rswrk->fields('id');\r\n\t\t\t\t\t$filesystem->type->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('name');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$filesystem->type->ViewValue = $filesystem->type->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$filesystem->type->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$filesystem->type->CssStyle = \"\";\r\n\t\t\t$filesystem->type->CssClass = \"\";\r\n\t\t\t$filesystem->type->ViewCustomAttributes = \"\";\r\n\t\t\t} else {\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `id`, `name`, '' AS SelectFilterFld FROM `server_type`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE $sWhereWrk\";\r\n\t\t\t$sSqlWrk .= \" ORDER BY `id` Asc\";\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", \"Please Select\", \"\"));\r\n\t\t\t$filesystem->type->EditValue = $arwrk;\r\n\t\t\t}\r\n\r\n\t\t\t// contact\r\n\t\t\t$filesystem->contact->EditCustomAttributes = \"\";\r\n\t\t\tif ($filesystem->contact->getSessionValue() <> \"\") {\r\n\t\t\t\t$filesystem->contact->CurrentValue = $filesystem->contact->getSessionValue();\r\n\t\t\t$filesystem->contact->ViewValue = $filesystem->contact->CurrentValue;\r\n\t\t\t$filesystem->contact->CssStyle = \"\";\r\n\t\t\t$filesystem->contact->CssClass = \"\";\r\n\t\t\t$filesystem->contact->ViewCustomAttributes = \"\";\r\n\t\t\t} else {\r\n\t\t\t$filesystem->contact->EditValue = ew_HtmlEncode($filesystem->contact->CurrentValue);\r\n\t\t\t}\r\n\r\n\t\t\t// contact2\r\n\t\t\t$filesystem->contact2->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->contact2->EditValue = ew_HtmlEncode($filesystem->contact2->CurrentValue);\r\n\r\n\t\t\t// rescomp\r\n\t\t\t$filesystem->rescomp->EditCustomAttributes = \"\";\r\n\t\t\t$filesystem->rescomp->EditValue = ew_HtmlEncode($filesystem->rescomp->CurrentValue);\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// id\r\n\r\n\t\t\t$filesystem->id->HrefValue = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$filesystem->mount->HrefValue = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$filesystem->path->HrefValue = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$filesystem->parent->HrefValue = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$filesystem->deprecated->HrefValue = \"\";\r\n\r\n\t\t\t// gid\r\n\t\t\t$filesystem->gid->HrefValue = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$filesystem->snapshot->HrefValue = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$filesystem->tapebackup->HrefValue = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$filesystem->diskbackup->HrefValue = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$filesystem->type->HrefValue = \"\";\r\n\r\n\t\t\t// contact\r\n\t\t\t$filesystem->contact->HrefValue = \"\";\r\n\r\n\t\t\t// contact2\r\n\t\t\t$filesystem->contact2->HrefValue = \"\";\r\n\r\n\t\t\t// rescomp\r\n\t\t\t$filesystem->rescomp->HrefValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\t$filesystem->Row_Rendered();\r\n\t}", "function render_subscriber_table($table) {\n $s = '<table>';\n $s .= '<tr><th>Id</th><th>Name</th><th>Email</th></tr>';\n foreach($table as $row) {\n $id = \"$row[id]\";\n $name = \"<b>$row[name]</b>\";\n $email = \"$row[email]\";\n $s .= \"<tr><td>$id</td><td>$name</td><td>$email</td></tr>\";\n }\n $s .= '</table>';\n return $s;\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->total_gross->FormValue == $this->total_gross->CurrentValue && is_numeric(ew_StrToFloat($this->total_gross->CurrentValue)))\n\t\t\t$this->total_gross->CurrentValue = ew_StrToFloat($this->total_gross->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// row_id\n\n\t\t$this->row_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_date\n\t\t$this->auc_date->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_number\n\t\t$this->auc_number->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_place\n\t\t$this->auc_place->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// start_bid\n\t\t$this->start_bid->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// close_bid\n\t\t$this->close_bid->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_notes\n\t\t// total_sack\n\n\t\t$this->total_sack->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// total_netto\n\t\t$this->total_netto->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// total_gross\n\t\t$this->total_gross->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_status\n\t\t$this->auc_status->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// rate\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// auc_date\n\t\t$this->auc_date->ViewValue = $this->auc_date->CurrentValue;\n\t\t$this->auc_date->ViewValue = ew_FormatDateTime($this->auc_date->ViewValue, 7);\n\t\t$this->auc_date->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_date->ViewCustomAttributes = \"\";\n\n\t\t// auc_number\n\t\t$this->auc_number->ViewValue = $this->auc_number->CurrentValue;\n\t\t$this->auc_number->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_number->ViewCustomAttributes = \"\";\n\n\t\t// auc_place\n\t\t$this->auc_place->ViewValue = $this->auc_place->CurrentValue;\n\t\t$this->auc_place->ViewCustomAttributes = \"\";\n\n\t\t// start_bid\n\t\t$this->start_bid->ViewValue = $this->start_bid->CurrentValue;\n\t\t$this->start_bid->ViewValue = ew_FormatDateTime($this->start_bid->ViewValue, 11);\n\t\t$this->start_bid->CellCssStyle .= \"text-align: center;\";\n\t\t$this->start_bid->ViewCustomAttributes = \"\";\n\n\t\t// close_bid\n\t\t$this->close_bid->ViewValue = $this->close_bid->CurrentValue;\n\t\t$this->close_bid->ViewValue = ew_FormatDateTime($this->close_bid->ViewValue, 11);\n\t\t$this->close_bid->CellCssStyle .= \"text-align: center;\";\n\t\t$this->close_bid->ViewCustomAttributes = \"\";\n\n\t\t// auc_notes\n\t\t$this->auc_notes->ViewValue = $this->auc_notes->CurrentValue;\n\t\t$this->auc_notes->ViewCustomAttributes = \"\";\n\n\t\t// total_sack\n\t\t$this->total_sack->ViewValue = $this->total_sack->CurrentValue;\n\t\t$this->total_sack->ViewValue = ew_FormatNumber($this->total_sack->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_sack->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_sack->ViewCustomAttributes = \"\";\n\n\t\t// total_netto\n\t\t$this->total_netto->ViewValue = $this->total_netto->CurrentValue;\n\t\t$this->total_netto->ViewValue = ew_FormatNumber($this->total_netto->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_netto->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_netto->ViewCustomAttributes = \"\";\n\n\t\t// total_gross\n\t\t$this->total_gross->ViewValue = $this->total_gross->CurrentValue;\n\t\t$this->total_gross->ViewValue = ew_FormatNumber($this->total_gross->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_gross->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_gross->ViewCustomAttributes = \"\";\n\n\t\t// auc_status\n\t\tif (strval($this->auc_status->CurrentValue) <> \"\") {\n\t\t\t$this->auc_status->ViewValue = $this->auc_status->OptionCaption($this->auc_status->CurrentValue);\n\t\t} else {\n\t\t\t$this->auc_status->ViewValue = NULL;\n\t\t}\n\t\t$this->auc_status->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_status->ViewCustomAttributes = \"\";\n\n\t\t// rate\n\t\t$this->rate->ViewValue = $this->rate->CurrentValue;\n\t\t$this->rate->ViewCustomAttributes = \"\";\n\n\t\t\t// auc_number\n\t\t\t$this->auc_number->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_number->HrefValue = \"\";\n\t\t\t$this->auc_number->TooltipValue = \"\";\n\n\t\t\t// auc_place\n\t\t\t$this->auc_place->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_place->HrefValue = \"\";\n\t\t\t$this->auc_place->TooltipValue = \"\";\n\n\t\t\t// start_bid\n\t\t\t$this->start_bid->LinkCustomAttributes = \"\";\n\t\t\t$this->start_bid->HrefValue = \"\";\n\t\t\t$this->start_bid->TooltipValue = \"\";\n\n\t\t\t// close_bid\n\t\t\t$this->close_bid->LinkCustomAttributes = \"\";\n\t\t\t$this->close_bid->HrefValue = \"\";\n\t\t\t$this->close_bid->TooltipValue = \"\";\n\n\t\t\t// auc_notes\n\t\t\t$this->auc_notes->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_notes->HrefValue = \"\";\n\t\t\t$this->auc_notes->TooltipValue = \"\";\n\n\t\t\t// total_sack\n\t\t\t$this->total_sack->LinkCustomAttributes = \"\";\n\t\t\t$this->total_sack->HrefValue = \"\";\n\t\t\t$this->total_sack->TooltipValue = \"\";\n\n\t\t\t// total_gross\n\t\t\t$this->total_gross->LinkCustomAttributes = \"\";\n\t\t\t$this->total_gross->HrefValue = \"\";\n\t\t\t$this->total_gross->TooltipValue = \"\";\n\n\t\t\t// auc_status\n\t\t\t$this->auc_status->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_status->HrefValue = \"\";\n\t\t\t$this->auc_status->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\r\r\tglobal $conn, $Security, $ratings;\r\r\r\r\t// Call Row Rendering event\r\r\t$ratings->Row_Rendering();\r\r\r\r\t// Common render codes for all row types\r\r\t// id\r\r\r\r\t$ratings->id->CellCssStyle = \"\";\r\r\t$ratings->id->CellCssClass = \"\";\r\r\r\r\t// rating\r\r\t$ratings->rating->CellCssStyle = \"\";\r\r\t$ratings->rating->CellCssClass = \"\";\r\r\r\r\t// domain\r\r\t$ratings->domain->CellCssStyle = \"\";\r\r\t$ratings->domain->CellCssClass = \"\";\r\r\tif ($ratings->RowType == EW_ROWTYPE_VIEW) { // View row\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_ADD) { // Add row\r\r\r\r\t\t// id\r\r\t\t$ratings->id->EditCustomAttributes = \"\";\r\r\t\t$ratings->id->EditValue = ew_HtmlEncode($ratings->id->CurrentValue);\r\r\r\r\t\t// rating\r\r\t\t$ratings->rating->EditCustomAttributes = \"\";\r\r\t\t$ratings->rating->EditValue = ew_HtmlEncode($ratings->rating->CurrentValue);\r\r\r\r\t\t// domain\r\r\t\t$ratings->domain->EditCustomAttributes = \"\";\r\r\t\t$ratings->domain->EditValue = ew_HtmlEncode($ratings->domain->CurrentValue);\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_SEARCH) { // Search row\r\r\t}\r\r\r\r\t// Call Row Rendered event\r\r\t$ratings->Row_Rendered();\r\r}", "public function html() : string\n {\n $table = \"<table class=\\\"multiplicationTable\\\">\";\n\n for ($row = 1; $row <= $this->rows + 1; $row++) {\n $table .= \"<tr>\";\n\n for ($column = 1; $column <= $this->columns + 1; $column++) {\n if ($row == 1 && $column == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">X</td>\";\n } elseif ($row == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">\" . ($column - 1) . \"</td>\";\n } elseif ($column == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">\" . ($row - 1) . \"</td>\";\n } else {\n $table .= \"<td>\" . ($row - 1) * ($column - 1) . \"</td>\";\n }\n }\n\n $table .= \"</tr>\";\n }\n\n $table .= \"</table>\";\n\n return $table;\n }", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $sponsored_student;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$sponsored_student->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// sponsored_student_id\n\n\t\t$sponsored_student->sponsored_student_id->CellCssStyle = \"\"; $sponsored_student->sponsored_student_id->CellCssClass = \"\";\n\t\t$sponsored_student->sponsored_student_id->CellAttrs = array(); $sponsored_student->sponsored_student_id->ViewAttrs = array(); $sponsored_student->sponsored_student_id->EditAttrs = array();\n\n\t\t// student_firstname\n\t\t$sponsored_student->student_firstname->CellCssStyle = \"\"; $sponsored_student->student_firstname->CellCssClass = \"\";\n\t\t$sponsored_student->student_firstname->CellAttrs = array(); $sponsored_student->student_firstname->ViewAttrs = array(); $sponsored_student->student_firstname->EditAttrs = array();\n\n\t\t// student_middlename\n\t\t$sponsored_student->student_middlename->CellCssStyle = \"\"; $sponsored_student->student_middlename->CellCssClass = \"\";\n\t\t$sponsored_student->student_middlename->CellAttrs = array(); $sponsored_student->student_middlename->ViewAttrs = array(); $sponsored_student->student_middlename->EditAttrs = array();\n\n\t\t// student_lastname\n\t\t$sponsored_student->student_lastname->CellCssStyle = \"\"; $sponsored_student->student_lastname->CellCssClass = \"\";\n\t\t$sponsored_student->student_lastname->CellAttrs = array(); $sponsored_student->student_lastname->ViewAttrs = array(); $sponsored_student->student_lastname->EditAttrs = array();\n\n\t\t// student_grades\n\t\t$sponsored_student->student_grades->CellCssStyle = \"\"; $sponsored_student->student_grades->CellCssClass = \"\";\n\t\t$sponsored_student->student_grades->CellAttrs = array(); $sponsored_student->student_grades->ViewAttrs = array(); $sponsored_student->student_grades->EditAttrs = array();\n\n\t\t// student_resident_programarea_id\n\t\t$sponsored_student->student_resident_programarea_id->CellCssStyle = \"\"; $sponsored_student->student_resident_programarea_id->CellCssClass = \"\";\n\t\t$sponsored_student->student_resident_programarea_id->CellAttrs = array(); $sponsored_student->student_resident_programarea_id->ViewAttrs = array(); $sponsored_student->student_resident_programarea_id->EditAttrs = array();\n\n\t\t// group_id\n\t\t$sponsored_student->group_id->CellCssStyle = \"\"; $sponsored_student->group_id->CellCssClass = \"\";\n\t\t$sponsored_student->group_id->CellAttrs = array(); $sponsored_student->group_id->ViewAttrs = array(); $sponsored_student->group_id->EditAttrs = array();\n\n\t\t// community_community_id\n\t\t$sponsored_student->community_community_id->CellCssStyle = \"\"; $sponsored_student->community_community_id->CellCssClass = \"\";\n\t\t$sponsored_student->community_community_id->CellAttrs = array(); $sponsored_student->community_community_id->ViewAttrs = array(); $sponsored_student->community_community_id->EditAttrs = array();\n\t\tif ($sponsored_student->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// sponsored_student_id\n\t\t\t$sponsored_student->sponsored_student_id->ViewValue = $sponsored_student->sponsored_student_id->CurrentValue;\n\t\t\t$sponsored_student->sponsored_student_id->CssStyle = \"\";\n\t\t\t$sponsored_student->sponsored_student_id->CssClass = \"\";\n\t\t\t$sponsored_student->sponsored_student_id->ViewCustomAttributes = \"\";\n\n\t\t\t// student_firstname\n\t\t\t$sponsored_student->student_firstname->ViewValue = $sponsored_student->student_firstname->CurrentValue;\n\t\t\t$sponsored_student->student_firstname->CssStyle = \"\";\n\t\t\t$sponsored_student->student_firstname->CssClass = \"\";\n\t\t\t$sponsored_student->student_firstname->ViewCustomAttributes = \"\";\n\n\t\t\t// student_middlename\n\t\t\t$sponsored_student->student_middlename->ViewValue = $sponsored_student->student_middlename->CurrentValue;\n\t\t\t$sponsored_student->student_middlename->CssStyle = \"\";\n\t\t\t$sponsored_student->student_middlename->CssClass = \"\";\n\t\t\t$sponsored_student->student_middlename->ViewCustomAttributes = \"\";\n\n\t\t\t// student_lastname\n\t\t\t$sponsored_student->student_lastname->ViewValue = $sponsored_student->student_lastname->CurrentValue;\n\t\t\t$sponsored_student->student_lastname->CssStyle = \"\";\n\t\t\t$sponsored_student->student_lastname->CssClass = \"\";\n\t\t\t$sponsored_student->student_lastname->ViewCustomAttributes = \"\";\n\n\t\t\t// student_grades\n\t\t\t$sponsored_student->student_grades->ViewValue = $sponsored_student->student_grades->CurrentValue;\n\t\t\t$sponsored_student->student_grades->CssStyle = \"\";\n\t\t\t$sponsored_student->student_grades->CssClass = \"\";\n\t\t\t$sponsored_student->student_grades->ViewCustomAttributes = \"\";\n\n\t\t\t// student_applicant_student_applicant_id\n\t\t\t$sponsored_student->student_applicant_student_applicant_id->ViewValue = $sponsored_student->student_applicant_student_applicant_id->CurrentValue;\n\t\t\tif (strval($sponsored_student->student_applicant_student_applicant_id->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`student_applicant_id` = \" . ew_AdjustSql($sponsored_student->student_applicant_student_applicant_id->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `student_lastname`, `student_firstname` FROM `student_applicant`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$sponsored_student->student_applicant_student_applicant_id->ViewValue = $rswrk->fields('student_lastname');\n\t\t\t\t\t$sponsored_student->student_applicant_student_applicant_id->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('student_firstname');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$sponsored_student->student_applicant_student_applicant_id->ViewValue = $sponsored_student->student_applicant_student_applicant_id->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sponsored_student->student_applicant_student_applicant_id->ViewValue = NULL;\n\t\t\t}\n\t\t\t$sponsored_student->student_applicant_student_applicant_id->CssStyle = \"\";\n\t\t\t$sponsored_student->student_applicant_student_applicant_id->CssClass = \"\";\n\t\t\t$sponsored_student->student_applicant_student_applicant_id->ViewCustomAttributes = \"\";\n\n\t\t\t// student_resident_programarea_id\n\t\t\tif (strval($sponsored_student->student_resident_programarea_id->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`programarea_id` = \" . ew_AdjustSql($sponsored_student->student_resident_programarea_id->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `programarea_name` FROM `programarea`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$sponsored_student->student_resident_programarea_id->ViewValue = $rswrk->fields('programarea_name');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$sponsored_student->student_resident_programarea_id->ViewValue = $sponsored_student->student_resident_programarea_id->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sponsored_student->student_resident_programarea_id->ViewValue = NULL;\n\t\t\t}\n\t\t\t$sponsored_student->student_resident_programarea_id->CssStyle = \"\";\n\t\t\t$sponsored_student->student_resident_programarea_id->CssClass = \"\";\n\t\t\t$sponsored_student->student_resident_programarea_id->ViewCustomAttributes = \"\";\n\n\t\t\t// group_id\n\t\t\t$sponsored_student->group_id->ViewValue = $sponsored_student->group_id->CurrentValue;\n\t\t\t$sponsored_student->group_id->CssStyle = \"\";\n\t\t\t$sponsored_student->group_id->CssClass = \"\";\n\t\t\t$sponsored_student->group_id->ViewCustomAttributes = \"\";\n\n\t\t\t// community_community_id\n\t\t\t$sponsored_student->community_community_id->ViewValue = $sponsored_student->community_community_id->CurrentValue;\n\t\t\t$sponsored_student->community_community_id->CssStyle = \"\";\n\t\t\t$sponsored_student->community_community_id->CssClass = \"\";\n\t\t\t$sponsored_student->community_community_id->ViewCustomAttributes = \"\";\n\n\t\t\t// sponsored_student_id\n\t\t\t$sponsored_student->sponsored_student_id->HrefValue = \"\";\n\t\t\t$sponsored_student->sponsored_student_id->TooltipValue = \"\";\n\n\t\t\t// student_firstname\n\t\t\t$sponsored_student->student_firstname->HrefValue = \"\";\n\t\t\t$sponsored_student->student_firstname->TooltipValue = \"\";\n\n\t\t\t// student_middlename\n\t\t\t$sponsored_student->student_middlename->HrefValue = \"\";\n\t\t\t$sponsored_student->student_middlename->TooltipValue = \"\";\n\n\t\t\t// student_lastname\n\t\t\t$sponsored_student->student_lastname->HrefValue = \"\";\n\t\t\t$sponsored_student->student_lastname->TooltipValue = \"\";\n\n\t\t\t// student_grades\n\t\t\t$sponsored_student->student_grades->HrefValue = \"\";\n\t\t\t$sponsored_student->student_grades->TooltipValue = \"\";\n\n\t\t\t// student_resident_programarea_id\n\t\t\t$sponsored_student->student_resident_programarea_id->HrefValue = \"\";\n\t\t\t$sponsored_student->student_resident_programarea_id->TooltipValue = \"\";\n\n\t\t\t// group_id\n\t\t\t$sponsored_student->group_id->HrefValue = \"\";\n\t\t\t$sponsored_student->group_id->TooltipValue = \"\";\n\n\t\t\t// community_community_id\n\t\t\t$sponsored_student->community_community_id->HrefValue = \"\";\n\t\t\t$sponsored_student->community_community_id->TooltipValue = \"\";\n\t\t} elseif ($sponsored_student->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// sponsored_student_id\n\t\t\t$sponsored_student->sponsored_student_id->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->sponsored_student_id->EditValue = ew_HtmlEncode($sponsored_student->sponsored_student_id->AdvancedSearch->SearchValue);\n\n\t\t\t// student_firstname\n\t\t\t$sponsored_student->student_firstname->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->student_firstname->EditValue = ew_HtmlEncode($sponsored_student->student_firstname->AdvancedSearch->SearchValue);\n\t\t\t$sponsored_student->student_firstname->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->student_firstname->EditValue2 = ew_HtmlEncode($sponsored_student->student_firstname->AdvancedSearch->SearchValue2);\n\n\t\t\t// student_middlename\n\t\t\t$sponsored_student->student_middlename->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->student_middlename->EditValue = ew_HtmlEncode($sponsored_student->student_middlename->AdvancedSearch->SearchValue);\n\t\t\t$sponsored_student->student_middlename->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->student_middlename->EditValue2 = ew_HtmlEncode($sponsored_student->student_middlename->AdvancedSearch->SearchValue2);\n\n\t\t\t// student_lastname\n\t\t\t$sponsored_student->student_lastname->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->student_lastname->EditValue = ew_HtmlEncode($sponsored_student->student_lastname->AdvancedSearch->SearchValue);\n\t\t\t$sponsored_student->student_lastname->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->student_lastname->EditValue2 = ew_HtmlEncode($sponsored_student->student_lastname->AdvancedSearch->SearchValue2);\n\n\t\t\t// student_grades\n\t\t\t$sponsored_student->student_grades->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->student_grades->EditValue = ew_HtmlEncode($sponsored_student->student_grades->AdvancedSearch->SearchValue);\n\n\t\t\t// student_resident_programarea_id\n\t\t\t$sponsored_student->student_resident_programarea_id->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `programarea_id`, `programarea_name`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `programarea`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$sponsored_student->student_resident_programarea_id->EditValue = $arwrk;\n\n\t\t\t// group_id\n\t\t\t$sponsored_student->group_id->EditCustomAttributes = \"\";\n\t\t\tif (!$Security->IsAdmin() && $Security->IsLoggedIn()) { // Non system admin\n\t\t\t$sFilterWrk = \"\";\n\t\t\t$sFilterWrk = $GLOBALS[\"users\"]->AddUserIDFilter(\"\");\n\t\t\t$sSqlWrk = \"SELECT `userlevelid`, `userlevelid` FROM `users`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$sponsored_student->group_id->EditValue = $arwrk;\n\t\t\t} else {\n\t\t\t$sponsored_student->group_id->EditValue = ew_HtmlEncode($sponsored_student->group_id->AdvancedSearch->SearchValue);\n\t\t\t}\n\n\t\t\t// community_community_id\n\t\t\t$sponsored_student->community_community_id->EditCustomAttributes = \"\";\n\t\t\t$sponsored_student->community_community_id->EditValue = ew_HtmlEncode($sponsored_student->community_community_id->AdvancedSearch->SearchValue);\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($sponsored_student->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$sponsored_student->Row_Rendered();\n\t}", "function showDataTable(){\n\t\t$output = \"\";\n\t\t// print the table\n\t\t$output .= \"<table summary=\\\"\".$this->summary.\"\\\">\\n\";\n\t\t// print the caption\n\t\t$output .= \"<caption>\".$this->caption.\"</caption>\\n\";\n\t\t$output .= $this->showHeader();\n\t\t// initialise variables\n\t\t$altCounter = 0;\n\t\t$altClass = \"\";\n\t\t$h = 1;\n\t\t// loop each row\n\t\tfor ($x=0; $x<count($this->rows); $x++) {\n\t\t\t// if it is time to show the header\n\t\t\tif ($h==$this->headerRepeat){\n\t\t\t\t// show the header\n\t\t\t\t$output .= $this->showHeader();\n\t\t\t\t$h = 1;\n\t\t\t}\n\t\t\t$row = $this->rows[$x];\n\t\t\t// alternate the row classes\n\t\t\tif ($this->altClasses){\n\t\t\t\tif ($this->altClasses[$altCounter]!=\"\"){ $altClass = \" class=\\\"\".$this->altClasses[$altCounter].\"\\\"\"; } else { $altClass=\"\"; }\n\t\t\t\tif ($altCounter==count($this->altClasses)-1){ $altCounter=0; } else { $altCounter++; }\n\t\t\t}\n\t\t\t// set the parameters to nothing\n\t\t\t$params = \"\";\n\t\t\t// if there are parameters for this row set\n\t\t\tif (count($this->rowParams[$x])>0){\n\t\t\t\t// loop the parameters\n\t\t\t\twhile (list($attribute, $parameter) = each($this->rowParams[$x])) {\n\t\t\t\t\t// if the parameter is 'class'\n\t\t\t\t\tif (strtolower($attribute)==\"class\"){\n\t\t\t\t\t\t// replace the altClass variable\n\t\t\t\t\t\t$altClass = \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t// otherwise build the parameters\n\t\t\t\t\t\t$params .= \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// print the row\n\t\t\t$output .= \"\t<tr$altClass$params>\\n\";\n\t\t\t\t// set the colSpan to 0\n\t\t\t\t$colSpan = 0;\n\t\t\t\t$colSpanAttribute = \"\";\n\t\t\t\t// if this row has less columns than the number of fields\n\t\t\t\tif (count($row)<count($this->fields)){\n\t\t\t\t\t$colSpan = (count($this->fields)-count($row))+1;\n\t\t\t\t}\n\t\t\t\t// loop each cell\n\t\t\t\tfor ($i=0; $i<count($row); $i++) {\n\t\t\t\t\t$value = $row[$i];\n\t\t\t\t\t$value = $this->formatField($i, $x);\n\t\t\t\t\t// make the colspan attribute\n\t\t\t\t\tif ($colSpan>0 && $i==(count($row)-1)){ $colSpanAttribute = \" colspan=\\\"$colSpan\\\"\"; }\n\t\t\t\t\t// print the cell\n\t\t\t\t\t$output .= \"\t\t<td$colSpanAttribute>\".$value.\"</td>\\n\";\n\t\t\t\t}\n\t\t\t// end the row\n\t\t\t$output .= \"\t</tr>\\n\";\n\t\t\t// increment the header repeat variable\n\t\t\t$h++;\n\t\t}\n\t\t// end the table\n\t\t$output .= \"</table>\\n\\n\";\n\t\tprint $output;\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $tbl_profile;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$tbl_profile->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// facultyprofile_ID\n\n\t\t$tbl_profile->facultyprofile_ID->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// faculty_ID\n\t\t$tbl_profile->faculty_ID->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// faculty_name\n\t\t$tbl_profile->faculty_name->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// collectionPeriod_ID\n\t\t$tbl_profile->collectionPeriod_ID->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// cu\n\t\t$tbl_profile->cu->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// collectionPeriod_ay\n\t\t$tbl_profile->collectionPeriod_ay->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// collectionPeriod_sem\n\t\t$tbl_profile->collectionPeriod_sem->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// collectionPeriod_cutOffDate\n\t\t$tbl_profile->collectionPeriod_cutOffDate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// unitID\n\t\t$tbl_profile->unitID->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_homeUnit_ID\n\t\t$tbl_profile->facultyprofile_homeUnit_ID->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_isHomeUnit\n\t\t$tbl_profile->facultyprofile_isHomeUnit->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyGroup_CHEDCode\n\t\t$tbl_profile->facultyGroup_CHEDCode->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyRank_ID\n\t\t$tbl_profile->facultyRank_ID->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_sg\n\t\t$tbl_profile->facultyprofile_sg->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_annualSalary\n\t\t$tbl_profile->facultyprofile_annualSalary->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_fte\n\t\t$tbl_profile->facultyprofile_fte->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_tenureCode\n\t\t$tbl_profile->facultyprofile_tenureCode->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_leaveCode\n\t\t$tbl_profile->facultyprofile_leaveCode->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_disCHED_disciplineMajorCode_gen\n\t\t$tbl_profile->facultyprofile_disCHED_disciplineMajorCode_gen->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// disCHED_disciplineCode_gen\n\t\t$tbl_profile->disCHED_disciplineCode_gen->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_specificDiscipline_1_primaryTeachingLoad\n\t\t$tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_specificDiscipline_2_primaryTeachingLoad\n\t\t$tbl_profile->facultyprofile_specificDiscipline_2_primaryTeachingLoad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_labHrs_basic\n\t\t$tbl_profile->facultyprofile_labHrs_basic->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_lecHrs_basic\n\t\t$tbl_profile->facultyprofile_lecHrs_basic->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalHrs_basic\n\t\t// facultyprofile_labSCH_basic\n\n\t\t$tbl_profile->facultyprofile_labSCH_basic->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_lecSCH_basic\n\t\t$tbl_profile->facultyprofile_lecSCH_basic->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalSCH_basic\n\t\t$tbl_profile->facultyprofile_totalSCH_basic->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_labCr_ugrad\n\t\t$tbl_profile->facultyprofile_labCr_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_lecCr_ugrad\n\t\t$tbl_profile->facultyprofile_lecCr_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_mixedLabLecCr_ugrad\n\t\t$tbl_profile->facultyprofile_mixedLabLecCr_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalCr_ugrad\n\t\t$tbl_profile->facultyprofile_totalCr_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_labHrs_ugrad\n\t\t$tbl_profile->facultyprofile_labHrs_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_lecHrs_ugrad\n\t\t$tbl_profile->facultyprofile_lecHrs_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_mixedLabLecHrs_ugrad\n\t\t$tbl_profile->facultyprofile_mixedLabLecHrs_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalHrs_ugrad\n\t\t$tbl_profile->facultyprofile_totalHrs_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_labSCH_ugrad\n\t\t$tbl_profile->facultyprofile_labSCH_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_lecSCH_ugrad\n\t\t$tbl_profile->facultyprofile_lecSCH_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_mixedLabLecSCH_ugrad\n\t\t$tbl_profile->facultyprofile_mixedLabLecSCH_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalSCH_ugrad\n\t\t$tbl_profile->facultyprofile_totalSCH_ugrad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_labCr_graduate\n\t\t$tbl_profile->facultyprofile_labCr_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_lecCr_graduate\n\t\t$tbl_profile->facultyprofile_lecCr_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_mixedLabLecCr_graduate\n\t\t$tbl_profile->facultyprofile_mixedLabLecCr_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalCr_graduate\n\t\t$tbl_profile->facultyprofile_totalCr_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_labHrs_graduate\n\t\t$tbl_profile->facultyprofile_labHrs_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_lecHrs_graduate\n\t\t$tbl_profile->facultyprofile_lecHrs_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_mixedLabLecHrs_graduate\n\t\t$tbl_profile->facultyprofile_mixedLabLecHrs_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalHrs_graduate\n\t\t$tbl_profile->facultyprofile_totalHrs_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_labSCH_graduate\n\t\t$tbl_profile->facultyprofile_labSCH_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_lecSCH_graduate\n\t\t$tbl_profile->facultyprofile_lecSCH_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_mixedLabLecSCH_graduate\n\t\t$tbl_profile->facultyprofile_mixedLabLecSCH_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalSCH_graduate\n\t\t$tbl_profile->facultyprofile_totalSCH_graduate->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_researchLoad\n\t\t$tbl_profile->facultyprofile_researchLoad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_extensionServicesLoad\n\t\t$tbl_profile->facultyprofile_extensionServicesLoad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_studyLoad\n\t\t$tbl_profile->facultyprofile_studyLoad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_forProductionLoad\n\t\t$tbl_profile->facultyprofile_forProductionLoad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_administrativeLoad\n\t\t$tbl_profile->facultyprofile_administrativeLoad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_otherLoadCredits\n\t\t$tbl_profile->facultyprofile_otherLoadCredits->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_total_nonTeachingLoad\n\t\t$tbl_profile->facultyprofile_total_nonTeachingLoad->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_totalWorkloadInCreditUnits_gen\n\t\t$tbl_profile->facultyprofile_totalWorkloadInCreditUnits_gen->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// facultyprofile_remarks\n\t\t$tbl_profile->facultyprofile_remarks->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// collectionPeriod_status\n\t\t$tbl_profile->collectionPeriod_status->CellCssStyle = \"white-space: nowrap;\";\n\t\tif ($tbl_profile->RowType == UP_ROWTYPE_VIEW) { // View row\n\n\t\t\t// faculty_name\n\t\t\t$tbl_profile->faculty_name->ViewValue = $tbl_profile->faculty_name->CurrentValue;\n\t\t\t$tbl_profile->faculty_name->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyGroup_CHEDCode\n\t\t\tif (strval($tbl_profile->facultyGroup_CHEDCode->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`facultyGroup_CHEDCode` = '\" . up_AdjustSql($tbl_profile->facultyGroup_CHEDCode->CurrentValue) . \"'\";\n\t\t\t$sSqlWrk = \"SELECT `facultyGroup_description` FROM `ref_facultygroup`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `facultyGroup_description` Asc\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$tbl_profile->facultyGroup_CHEDCode->ViewValue = $rswrk->fields('facultyGroup_description');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$tbl_profile->facultyGroup_CHEDCode->ViewValue = $tbl_profile->facultyGroup_CHEDCode->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tbl_profile->facultyGroup_CHEDCode->ViewValue = NULL;\n\t\t\t}\n\t\t\t$tbl_profile->facultyGroup_CHEDCode->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyRank_ID\n\t\t\tif (strval($tbl_profile->facultyRank_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`facultyRank_ID` = \" . up_AdjustSql($tbl_profile->facultyRank_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `facultyRank_UPRank` FROM `ref_facultyrank`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `facultyRank_UPRank` Asc\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$tbl_profile->facultyRank_ID->ViewValue = $rswrk->fields('facultyRank_UPRank');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$tbl_profile->facultyRank_ID->ViewValue = $tbl_profile->facultyRank_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tbl_profile->facultyRank_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$tbl_profile->facultyRank_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_sg\n\t\t\t$tbl_profile->facultyprofile_sg->ViewValue = $tbl_profile->facultyprofile_sg->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_sg->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_annualSalary\n\t\t\t$tbl_profile->facultyprofile_annualSalary->ViewValue = $tbl_profile->facultyprofile_annualSalary->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_annualSalary->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_tenureCode\n\t\t\tif (strval($tbl_profile->facultyprofile_tenureCode->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`tenureCode_ID` = \" . up_AdjustSql($tbl_profile->facultyprofile_tenureCode->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `tenureCode_description` FROM `ref_tenurecode`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `tenureCode_description` Asc\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$tbl_profile->facultyprofile_tenureCode->ViewValue = $rswrk->fields('tenureCode_description');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$tbl_profile->facultyprofile_tenureCode->ViewValue = $tbl_profile->facultyprofile_tenureCode->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tbl_profile->facultyprofile_tenureCode->ViewValue = NULL;\n\t\t\t}\n\t\t\t$tbl_profile->facultyprofile_tenureCode->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_leaveCode\n\t\t\tif (strval($tbl_profile->facultyprofile_leaveCode->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`leaveCode_ID` = \" . up_AdjustSql($tbl_profile->facultyprofile_leaveCode->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `leaveCode_description` FROM `ref_leavecode`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `leaveCode_description` Asc\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$tbl_profile->facultyprofile_leaveCode->ViewValue = $rswrk->fields('leaveCode_description');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$tbl_profile->facultyprofile_leaveCode->ViewValue = $tbl_profile->facultyprofile_leaveCode->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tbl_profile->facultyprofile_leaveCode->ViewValue = NULL;\n\t\t\t}\n\t\t\t$tbl_profile->facultyprofile_leaveCode->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_specificDiscipline_1_primaryTeachingLoad\n\t\t\tif (strval($tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`disCHED_disciplineSpecific_code` = \" . up_AdjustSql($tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `disCHED_disciplineSpecific_nameList` FROM `ref_disciplinechedcodes_minor`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `disCHED_disciplineSpecific_nameList` Asc\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->ViewValue = $rswrk->fields('disCHED_disciplineSpecific_nameList');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->ViewValue = $tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->ViewValue = NULL;\n\t\t\t}\n\t\t\t$tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_specificDiscipline_2_primaryTeachingLoad\n\t\t\tif (strval($tbl_profile->facultyprofile_specificDiscipline_2_primaryTeachingLoad->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`disCHED_disciplineSpecific_code` = \" . up_AdjustSql($tbl_profile->facultyprofile_specificDiscipline_2_primaryTeachingLoad->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `disCHED_disciplineSpecific_nameList` FROM `ref_disciplinechedcodes_minor`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `disCHED_disciplineSpecific_nameList` Asc\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$tbl_profile->facultyprofile_specificDiscipline_2_primaryTeachingLoad->ViewValue = $rswrk->fields('disCHED_disciplineSpecific_nameList');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$tbl_profile->facultyprofile_specificDiscipline_2_primaryTeachingLoad->ViewValue = $tbl_profile->facultyprofile_specificDiscipline_2_primaryTeachingLoad->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tbl_profile->facultyprofile_specificDiscipline_2_primaryTeachingLoad->ViewValue = NULL;\n\t\t\t}\n\t\t\t$tbl_profile->facultyprofile_specificDiscipline_2_primaryTeachingLoad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_labHrs_basic\n\t\t\t$tbl_profile->facultyprofile_labHrs_basic->ViewValue = $tbl_profile->facultyprofile_labHrs_basic->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_labHrs_basic->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_lecHrs_basic\n\t\t\t$tbl_profile->facultyprofile_lecHrs_basic->ViewValue = $tbl_profile->facultyprofile_lecHrs_basic->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_lecHrs_basic->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalHrs_basic\n\t\t\t$tbl_profile->facultyprofile_totalHrs_basic->ViewValue = $tbl_profile->facultyprofile_totalHrs_basic->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalHrs_basic->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_labSCH_basic\n\t\t\t$tbl_profile->facultyprofile_labSCH_basic->ViewValue = $tbl_profile->facultyprofile_labSCH_basic->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_labSCH_basic->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_lecSCH_basic\n\t\t\t$tbl_profile->facultyprofile_lecSCH_basic->ViewValue = $tbl_profile->facultyprofile_lecSCH_basic->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_lecSCH_basic->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalSCH_basic\n\t\t\t$tbl_profile->facultyprofile_totalSCH_basic->ViewValue = $tbl_profile->facultyprofile_totalSCH_basic->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalSCH_basic->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_labCr_ugrad\n\t\t\t$tbl_profile->facultyprofile_labCr_ugrad->ViewValue = $tbl_profile->facultyprofile_labCr_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_labCr_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_lecCr_ugrad\n\t\t\t$tbl_profile->facultyprofile_lecCr_ugrad->ViewValue = $tbl_profile->facultyprofile_lecCr_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_lecCr_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_mixedLabLecCr_ugrad\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecCr_ugrad->ViewValue = $tbl_profile->facultyprofile_mixedLabLecCr_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecCr_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalCr_ugrad\n\t\t\t$tbl_profile->facultyprofile_totalCr_ugrad->ViewValue = $tbl_profile->facultyprofile_totalCr_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalCr_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_labHrs_ugrad\n\t\t\t$tbl_profile->facultyprofile_labHrs_ugrad->ViewValue = $tbl_profile->facultyprofile_labHrs_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_labHrs_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_lecHrs_ugrad\n\t\t\t$tbl_profile->facultyprofile_lecHrs_ugrad->ViewValue = $tbl_profile->facultyprofile_lecHrs_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_lecHrs_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_mixedLabLecHrs_ugrad\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecHrs_ugrad->ViewValue = $tbl_profile->facultyprofile_mixedLabLecHrs_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecHrs_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalHrs_ugrad\n\t\t\t$tbl_profile->facultyprofile_totalHrs_ugrad->ViewValue = $tbl_profile->facultyprofile_totalHrs_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalHrs_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_labSCH_ugrad\n\t\t\t$tbl_profile->facultyprofile_labSCH_ugrad->ViewValue = $tbl_profile->facultyprofile_labSCH_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_labSCH_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_lecSCH_ugrad\n\t\t\t$tbl_profile->facultyprofile_lecSCH_ugrad->ViewValue = $tbl_profile->facultyprofile_lecSCH_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_lecSCH_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_mixedLabLecSCH_ugrad\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecSCH_ugrad->ViewValue = $tbl_profile->facultyprofile_mixedLabLecSCH_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecSCH_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalSCH_ugrad\n\t\t\t$tbl_profile->facultyprofile_totalSCH_ugrad->ViewValue = $tbl_profile->facultyprofile_totalSCH_ugrad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalSCH_ugrad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_labCr_graduate\n\t\t\t$tbl_profile->facultyprofile_labCr_graduate->ViewValue = $tbl_profile->facultyprofile_labCr_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_labCr_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_lecCr_graduate\n\t\t\t$tbl_profile->facultyprofile_lecCr_graduate->ViewValue = $tbl_profile->facultyprofile_lecCr_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_lecCr_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_mixedLabLecCr_graduate\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecCr_graduate->ViewValue = $tbl_profile->facultyprofile_mixedLabLecCr_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecCr_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalCr_graduate\n\t\t\t$tbl_profile->facultyprofile_totalCr_graduate->ViewValue = $tbl_profile->facultyprofile_totalCr_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalCr_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_labHrs_graduate\n\t\t\t$tbl_profile->facultyprofile_labHrs_graduate->ViewValue = $tbl_profile->facultyprofile_labHrs_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_labHrs_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_lecHrs_graduate\n\t\t\t$tbl_profile->facultyprofile_lecHrs_graduate->ViewValue = $tbl_profile->facultyprofile_lecHrs_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_lecHrs_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_mixedLabLecHrs_graduate\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecHrs_graduate->ViewValue = $tbl_profile->facultyprofile_mixedLabLecHrs_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecHrs_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalHrs_graduate\n\t\t\t$tbl_profile->facultyprofile_totalHrs_graduate->ViewValue = $tbl_profile->facultyprofile_totalHrs_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalHrs_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_labSCH_graduate\n\t\t\t$tbl_profile->facultyprofile_labSCH_graduate->ViewValue = $tbl_profile->facultyprofile_labSCH_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_labSCH_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_lecSCH_graduate\n\t\t\t$tbl_profile->facultyprofile_lecSCH_graduate->ViewValue = $tbl_profile->facultyprofile_lecSCH_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_lecSCH_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_mixedLabLecSCH_graduate\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecSCH_graduate->ViewValue = $tbl_profile->facultyprofile_mixedLabLecSCH_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_mixedLabLecSCH_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalSCH_graduate\n\t\t\t$tbl_profile->facultyprofile_totalSCH_graduate->ViewValue = $tbl_profile->facultyprofile_totalSCH_graduate->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalSCH_graduate->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_researchLoad\n\t\t\t$tbl_profile->facultyprofile_researchLoad->ViewValue = $tbl_profile->facultyprofile_researchLoad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_researchLoad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_extensionServicesLoad\n\t\t\t$tbl_profile->facultyprofile_extensionServicesLoad->ViewValue = $tbl_profile->facultyprofile_extensionServicesLoad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_extensionServicesLoad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_studyLoad\n\t\t\t$tbl_profile->facultyprofile_studyLoad->ViewValue = $tbl_profile->facultyprofile_studyLoad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_studyLoad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_forProductionLoad\n\t\t\t$tbl_profile->facultyprofile_forProductionLoad->ViewValue = $tbl_profile->facultyprofile_forProductionLoad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_forProductionLoad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_administrativeLoad\n\t\t\t$tbl_profile->facultyprofile_administrativeLoad->ViewValue = $tbl_profile->facultyprofile_administrativeLoad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_administrativeLoad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_otherLoadCredits\n\t\t\t$tbl_profile->facultyprofile_otherLoadCredits->ViewValue = $tbl_profile->facultyprofile_otherLoadCredits->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_otherLoadCredits->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_total_nonTeachingLoad\n\t\t\t$tbl_profile->facultyprofile_total_nonTeachingLoad->ViewValue = $tbl_profile->facultyprofile_total_nonTeachingLoad->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_total_nonTeachingLoad->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_totalWorkloadInCreditUnits_gen\n\t\t\t$tbl_profile->facultyprofile_totalWorkloadInCreditUnits_gen->ViewValue = $tbl_profile->facultyprofile_totalWorkloadInCreditUnits_gen->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_totalWorkloadInCreditUnits_gen->ViewCustomAttributes = \"\";\n\n\t\t\t// facultyprofile_remarks\n\t\t\t$tbl_profile->facultyprofile_remarks->ViewValue = $tbl_profile->facultyprofile_remarks->CurrentValue;\n\t\t\t$tbl_profile->facultyprofile_remarks->ViewCustomAttributes = \"\";\n\n\t\t\t// faculty_name\n\t\t\t$tbl_profile->faculty_name->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->faculty_name->HrefValue = \"\";\n\t\t\t$tbl_profile->faculty_name->TooltipValue = \"\";\n\n\t\t\t// facultyGroup_CHEDCode\n\t\t\t$tbl_profile->facultyGroup_CHEDCode->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyGroup_CHEDCode->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyGroup_CHEDCode->TooltipValue = \"\";\n\n\t\t\t// facultyRank_ID\n\t\t\t$tbl_profile->facultyRank_ID->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyRank_ID->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyRank_ID->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_tenureCode\n\t\t\t$tbl_profile->facultyprofile_tenureCode->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_tenureCode->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_tenureCode->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_leaveCode\n\t\t\t$tbl_profile->facultyprofile_leaveCode->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_leaveCode->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_leaveCode->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_specificDiscipline_1_primaryTeachingLoad\n\t\t\t$tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_specificDiscipline_1_primaryTeachingLoad->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalHrs_basic\n\t\t\t$tbl_profile->facultyprofile_totalHrs_basic->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalHrs_basic->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalHrs_basic->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalSCH_basic\n\t\t\t$tbl_profile->facultyprofile_totalSCH_basic->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalSCH_basic->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalSCH_basic->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalCr_ugrad\n\t\t\t$tbl_profile->facultyprofile_totalCr_ugrad->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalCr_ugrad->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalCr_ugrad->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalHrs_ugrad\n\t\t\t$tbl_profile->facultyprofile_totalHrs_ugrad->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalHrs_ugrad->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalHrs_ugrad->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalSCH_ugrad\n\t\t\t$tbl_profile->facultyprofile_totalSCH_ugrad->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalSCH_ugrad->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalSCH_ugrad->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalCr_graduate\n\t\t\t$tbl_profile->facultyprofile_totalCr_graduate->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalCr_graduate->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalCr_graduate->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalHrs_graduate\n\t\t\t$tbl_profile->facultyprofile_totalHrs_graduate->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalHrs_graduate->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalHrs_graduate->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalSCH_graduate\n\t\t\t$tbl_profile->facultyprofile_totalSCH_graduate->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalSCH_graduate->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalSCH_graduate->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_total_nonTeachingLoad\n\t\t\t$tbl_profile->facultyprofile_total_nonTeachingLoad->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_total_nonTeachingLoad->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_total_nonTeachingLoad->TooltipValue = \"\";\n\n\t\t\t// facultyprofile_totalWorkloadInCreditUnits_gen\n\t\t\t$tbl_profile->facultyprofile_totalWorkloadInCreditUnits_gen->LinkCustomAttributes = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalWorkloadInCreditUnits_gen->HrefValue = \"\";\n\t\t\t$tbl_profile->facultyprofile_totalWorkloadInCreditUnits_gen->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($tbl_profile->RowType <> UP_ROWTYPE_AGGREGATEINIT)\n\t\t\t$tbl_profile->Row_Rendered();\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language, $rekeningju;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$rekeningju->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// NoRek\r\n\t\t// Keterangan\r\n\t\t// debet\r\n\t\t// kredit\r\n\t\t// kode_bukti\r\n\t\t// tanggal\r\n\t\t// kode_otomatis_master\r\n\r\n\t\t$rekeningju->kode_otomatis_master->CellCssStyle = \"white-space: nowrap;\";\r\n\r\n\t\t// tanggal_nota\r\n\t\t// kode_otomatis\r\n\r\n\t\t$rekeningju->kode_otomatis->CellCssStyle = \"white-space: nowrap;\";\r\n\r\n\t\t// kode_otomatis_tingkat\r\n\t\t$rekeningju->kode_otomatis_tingkat->CellCssStyle = \"white-space: nowrap;\";\r\n\r\n\t\t// id\r\n\t\t$rekeningju->id->CellCssStyle = \"white-space: nowrap;\";\r\n\r\n\t\t// apakah_original\r\n\t\tif ($rekeningju->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// NoRek\r\n\t\t\tif (strval($rekeningju->NoRek->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Norek` = '\" . ew_AdjustSql($rekeningju->NoRek->CurrentValue) . \"'\";\r\n\t\t\t$sSqlWrk = \"SELECT `Norek`, `Keterangan` FROM `rekening2`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\r\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Norek` Asc\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$rekeningju->NoRek->ViewValue = $rswrk->fields('Norek');\r\n\t\t\t\t\t$rekeningju->NoRek->ViewValue .= ew_ValueSeparator(0,1,$rekeningju->NoRek) . $rswrk->fields('Keterangan');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$rekeningju->NoRek->ViewValue = $rekeningju->NoRek->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$rekeningju->NoRek->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$rekeningju->NoRek->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Keterangan\r\n\t\t\t$rekeningju->Keterangan->ViewValue = $rekeningju->Keterangan->CurrentValue;\r\n\t\t\t$rekeningju->Keterangan->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// debet\r\n\t\t\t$rekeningju->debet->ViewValue = $rekeningju->debet->CurrentValue;\r\n\t\t\t$rekeningju->debet->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// kredit\r\n\t\t\t$rekeningju->kredit->ViewValue = $rekeningju->kredit->CurrentValue;\r\n\t\t\t$rekeningju->kredit->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// kode_bukti\r\n\t\t\t$rekeningju->kode_bukti->ViewValue = $rekeningju->kode_bukti->CurrentValue;\r\n\t\t\t$rekeningju->kode_bukti->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// tanggal\r\n\t\t\t$rekeningju->tanggal->ViewValue = $rekeningju->tanggal->CurrentValue;\r\n\t\t\t$rekeningju->tanggal->ViewValue = ew_FormatDateTime($rekeningju->tanggal->ViewValue, 7);\r\n\t\t\t$rekeningju->tanggal->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// tanggal_nota\r\n\t\t\t$rekeningju->tanggal_nota->ViewValue = $rekeningju->tanggal_nota->CurrentValue;\r\n\t\t\t$rekeningju->tanggal_nota->ViewValue = ew_FormatDateTime($rekeningju->tanggal_nota->ViewValue, 7);\r\n\t\t\t$rekeningju->tanggal_nota->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// kode_otomatis\r\n\t\t\t$rekeningju->kode_otomatis->ViewValue = $rekeningju->kode_otomatis->CurrentValue;\r\n\t\t\t$rekeningju->kode_otomatis->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// kode_otomatis_tingkat\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->ViewValue = $rekeningju->kode_otomatis_tingkat->CurrentValue;\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// apakah_original\r\n\t\t\t$rekeningju->apakah_original->ViewValue = $rekeningju->apakah_original->CurrentValue;\r\n\t\t\t$rekeningju->apakah_original->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// NoRek\r\n\t\t\t$rekeningju->NoRek->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->NoRek->HrefValue = \"\";\r\n\t\t\t$rekeningju->NoRek->TooltipValue = \"\";\r\n\r\n\t\t\t// Keterangan\r\n\t\t\t$rekeningju->Keterangan->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->Keterangan->HrefValue = \"\";\r\n\t\t\t$rekeningju->Keterangan->TooltipValue = \"\";\r\n\r\n\t\t\t// debet\r\n\t\t\t$rekeningju->debet->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->debet->HrefValue = \"\";\r\n\t\t\t$rekeningju->debet->TooltipValue = \"\";\r\n\r\n\t\t\t// kredit\r\n\t\t\t$rekeningju->kredit->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kredit->HrefValue = \"\";\r\n\t\t\t$rekeningju->kredit->TooltipValue = \"\";\r\n\r\n\t\t\t// kode_bukti\r\n\t\t\t$rekeningju->kode_bukti->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kode_bukti->HrefValue = \"\";\r\n\t\t\t$rekeningju->kode_bukti->TooltipValue = \"\";\r\n\r\n\t\t\t// tanggal\r\n\t\t\t$rekeningju->tanggal->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->tanggal->HrefValue = \"\";\r\n\t\t\t$rekeningju->tanggal->TooltipValue = \"\";\r\n\r\n\t\t\t// tanggal_nota\r\n\t\t\t$rekeningju->tanggal_nota->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->tanggal_nota->HrefValue = \"\";\r\n\t\t\t$rekeningju->tanggal_nota->TooltipValue = \"\";\r\n\r\n\t\t\t// kode_otomatis\r\n\t\t\t$rekeningju->kode_otomatis->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kode_otomatis->HrefValue = \"\";\r\n\t\t\t$rekeningju->kode_otomatis->TooltipValue = \"\";\r\n\r\n\t\t\t// kode_otomatis_tingkat\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->HrefValue = \"\";\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->TooltipValue = \"\";\r\n\r\n\t\t\t// apakah_original\r\n\t\t\t$rekeningju->apakah_original->LinkCustomAttributes = \"\";\r\n\t\t\t$rekeningju->apakah_original->HrefValue = \"\";\r\n\t\t\t$rekeningju->apakah_original->TooltipValue = \"\";\r\n\t\t} elseif ($rekeningju->RowType == EW_ROWTYPE_ADD) { // Add row\r\n\r\n\t\t\t// NoRek\r\n\t\t\t$rekeningju->NoRek->EditCustomAttributes = \"\";\r\n\t\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Norek`, `Norek` AS `DispFld`, `Keterangan` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld` FROM `rekening2`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\r\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Norek` Asc\";\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\"));\r\n\t\t\t$rekeningju->NoRek->EditValue = $arwrk;\r\n\r\n\t\t\t// Keterangan\r\n\t\t\t$rekeningju->Keterangan->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->Keterangan->EditValue = ew_HtmlEncode($rekeningju->Keterangan->CurrentValue);\r\n\r\n\t\t\t// debet\r\n\t\t\t$rekeningju->debet->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->debet->EditValue = ew_HtmlEncode($rekeningju->debet->CurrentValue);\r\n\r\n\t\t\t// kredit\r\n\t\t\t$rekeningju->kredit->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kredit->EditValue = ew_HtmlEncode($rekeningju->kredit->CurrentValue);\r\n\r\n\t\t\t// kode_bukti\r\n\t\t\t$rekeningju->kode_bukti->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kode_bukti->EditValue = ew_HtmlEncode($rekeningju->kode_bukti->CurrentValue);\r\n\r\n\t\t\t// tanggal\r\n\t\t\t$rekeningju->tanggal->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->tanggal->EditValue = ew_HtmlEncode(ew_FormatDateTime($rekeningju->tanggal->CurrentValue, 7));\r\n\r\n\t\t\t// tanggal_nota\r\n\t\t\t$rekeningju->tanggal_nota->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->tanggal_nota->EditValue = ew_HtmlEncode(ew_FormatDateTime($rekeningju->tanggal_nota->CurrentValue, 7));\r\n\r\n\t\t\t// kode_otomatis\r\n\t\t\t$rekeningju->kode_otomatis->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kode_otomatis->CurrentValue = unik();\r\n\r\n\t\t\t// kode_otomatis_tingkat\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->CurrentValue = $_SESSION[\"kode_otomatis_tingkat\"];\r\n\r\n\t\t\t// apakah_original\r\n\t\t\t$rekeningju->apakah_original->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->apakah_original->EditValue = ew_HtmlEncode($rekeningju->apakah_original->CurrentValue);\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// NoRek\r\n\r\n\t\t\t$rekeningju->NoRek->HrefValue = \"\";\r\n\r\n\t\t\t// Keterangan\r\n\t\t\t$rekeningju->Keterangan->HrefValue = \"\";\r\n\r\n\t\t\t// debet\r\n\t\t\t$rekeningju->debet->HrefValue = \"\";\r\n\r\n\t\t\t// kredit\r\n\t\t\t$rekeningju->kredit->HrefValue = \"\";\r\n\r\n\t\t\t// kode_bukti\r\n\t\t\t$rekeningju->kode_bukti->HrefValue = \"\";\r\n\r\n\t\t\t// tanggal\r\n\t\t\t$rekeningju->tanggal->HrefValue = \"\";\r\n\r\n\t\t\t// tanggal_nota\r\n\t\t\t$rekeningju->tanggal_nota->HrefValue = \"\";\r\n\r\n\t\t\t// kode_otomatis\r\n\t\t\t$rekeningju->kode_otomatis->HrefValue = \"\";\r\n\r\n\t\t\t// kode_otomatis_tingkat\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->HrefValue = \"\";\r\n\r\n\t\t\t// apakah_original\r\n\t\t\t$rekeningju->apakah_original->HrefValue = \"\";\r\n\t\t} elseif ($rekeningju->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\n\r\n\t\t\t// NoRek\r\n\t\t\t$rekeningju->NoRek->EditCustomAttributes = \"\";\r\n\r\n\t\t\t// Keterangan\r\n\t\t\t$rekeningju->Keterangan->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->Keterangan->EditValue = ew_HtmlEncode($rekeningju->Keterangan->CurrentValue);\r\n\r\n\t\t\t// debet\r\n\t\t\t$rekeningju->debet->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->debet->EditValue = ew_HtmlEncode($rekeningju->debet->CurrentValue);\r\n\r\n\t\t\t// kredit\r\n\t\t\t$rekeningju->kredit->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kredit->EditValue = ew_HtmlEncode($rekeningju->kredit->CurrentValue);\r\n\r\n\t\t\t// kode_bukti\r\n\t\t\t$rekeningju->kode_bukti->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->kode_bukti->EditValue = ew_HtmlEncode($rekeningju->kode_bukti->CurrentValue);\r\n\r\n\t\t\t// tanggal\r\n\t\t\t$rekeningju->tanggal->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->tanggal->EditValue = ew_HtmlEncode(ew_FormatDateTime($rekeningju->tanggal->CurrentValue, 7));\r\n\r\n\t\t\t// tanggal_nota\r\n\t\t\t$rekeningju->tanggal_nota->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->tanggal_nota->EditValue = ew_HtmlEncode(ew_FormatDateTime($rekeningju->tanggal_nota->CurrentValue, 7));\r\n\r\n\t\t\t// kode_otomatis\r\n\t\t\t$rekeningju->kode_otomatis->EditCustomAttributes = \"\";\r\n\r\n\t\t\t// kode_otomatis_tingkat\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->EditCustomAttributes = \"\";\r\n\r\n\t\t\t// apakah_original\r\n\t\t\t$rekeningju->apakah_original->EditCustomAttributes = \"\";\r\n\t\t\t$rekeningju->apakah_original->EditValue = ew_HtmlEncode($rekeningju->apakah_original->CurrentValue);\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// NoRek\r\n\r\n\t\t\t$rekeningju->NoRek->HrefValue = \"\";\r\n\r\n\t\t\t// Keterangan\r\n\t\t\t$rekeningju->Keterangan->HrefValue = \"\";\r\n\r\n\t\t\t// debet\r\n\t\t\t$rekeningju->debet->HrefValue = \"\";\r\n\r\n\t\t\t// kredit\r\n\t\t\t$rekeningju->kredit->HrefValue = \"\";\r\n\r\n\t\t\t// kode_bukti\r\n\t\t\t$rekeningju->kode_bukti->HrefValue = \"\";\r\n\r\n\t\t\t// tanggal\r\n\t\t\t$rekeningju->tanggal->HrefValue = \"\";\r\n\r\n\t\t\t// tanggal_nota\r\n\t\t\t$rekeningju->tanggal_nota->HrefValue = \"\";\r\n\r\n\t\t\t// kode_otomatis\r\n\t\t\t$rekeningju->kode_otomatis->HrefValue = \"\";\r\n\r\n\t\t\t// kode_otomatis_tingkat\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->HrefValue = \"\";\r\n\r\n\t\t\t// apakah_original\r\n\t\t\t$rekeningju->apakah_original->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($rekeningju->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$rekeningju->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$rekeningju->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$rekeningju->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($rekeningju->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$rekeningju->Row_Rendered();\r\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// id\r\n\t\t// datetime\r\n\t\t// script\r\n\t\t// user\r\n\t\t// action\r\n\t\t// table\r\n\t\t// field\r\n\t\t// keyvalue\r\n\t\t// oldvalue\r\n\t\t// newvalue\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->ViewValue = $this->id->CurrentValue;\r\n\t\t\t$this->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->ViewValue = $this->datetime->CurrentValue;\r\n\t\t\t$this->datetime->ViewValue = ew_FormatDateTime($this->datetime->ViewValue, 5);\r\n\t\t\t$this->datetime->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->ViewValue = $this->script->CurrentValue;\r\n\t\t\t$this->script->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->ViewValue = $this->user->CurrentValue;\r\n\t\t\t$this->user->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->ViewValue = $this->action->CurrentValue;\r\n\t\t\t$this->action->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->ViewValue = $this->_table->CurrentValue;\r\n\t\t\t$this->_table->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->ViewValue = $this->_field->CurrentValue;\r\n\t\t\t$this->_field->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->ViewValue = $this->keyvalue->CurrentValue;\r\n\t\t\t$this->keyvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->ViewValue = $this->oldvalue->CurrentValue;\r\n\t\t\t$this->oldvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->ViewValue = $this->newvalue->CurrentValue;\r\n\t\t\t$this->newvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->LinkCustomAttributes = \"\";\r\n\t\t\t$this->datetime->HrefValue = \"\";\r\n\t\t\t$this->datetime->TooltipValue = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->LinkCustomAttributes = \"\";\r\n\t\t\t$this->script->HrefValue = \"\";\r\n\t\t\t$this->script->TooltipValue = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->LinkCustomAttributes = \"\";\r\n\t\t\t$this->user->HrefValue = \"\";\r\n\t\t\t$this->user->TooltipValue = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->LinkCustomAttributes = \"\";\r\n\t\t\t$this->action->HrefValue = \"\";\r\n\t\t\t$this->action->TooltipValue = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->LinkCustomAttributes = \"\";\r\n\t\t\t$this->_table->HrefValue = \"\";\r\n\t\t\t$this->_table->TooltipValue = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->LinkCustomAttributes = \"\";\r\n\t\t\t$this->_field->HrefValue = \"\";\r\n\t\t\t$this->_field->TooltipValue = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->keyvalue->HrefValue = \"\";\r\n\t\t\t$this->keyvalue->TooltipValue = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->oldvalue->HrefValue = \"\";\r\n\t\t\t$this->oldvalue->TooltipValue = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->newvalue->HrefValue = \"\";\r\n\t\t\t$this->newvalue->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->EditCustomAttributes = \"\";\r\n\t\t\t$this->datetime->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->datetime->CurrentValue, 5));\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->EditCustomAttributes = \"\";\r\n\t\t\t$this->script->EditValue = ew_HtmlEncode($this->script->CurrentValue);\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->EditCustomAttributes = \"\";\r\n\t\t\t$this->user->EditValue = ew_HtmlEncode($this->user->CurrentValue);\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->EditCustomAttributes = \"\";\r\n\t\t\t$this->action->EditValue = ew_HtmlEncode($this->action->CurrentValue);\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->EditCustomAttributes = \"\";\r\n\t\t\t$this->_table->EditValue = ew_HtmlEncode($this->_table->CurrentValue);\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->EditCustomAttributes = \"\";\r\n\t\t\t$this->_field->EditValue = ew_HtmlEncode($this->_field->CurrentValue);\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->keyvalue->EditValue = ew_HtmlEncode($this->keyvalue->CurrentValue);\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->oldvalue->EditValue = ew_HtmlEncode($this->oldvalue->CurrentValue);\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->newvalue->EditValue = ew_HtmlEncode($this->newvalue->CurrentValue);\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// datetime\r\n\r\n\t\t\t$this->datetime->HrefValue = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->HrefValue = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->HrefValue = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->HrefValue = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->HrefValue = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->HrefValue = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->HrefValue = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->HrefValue = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function ods_render_row($row, $data = array()) {\n $cells = $row->getElementsByTagName('table-cell');\n\n foreach ($cells as $cell) {\n $value_type = $cell\n ->getAttribute('office:value-type');\n\n //get text data\n $p1 = $cell\n ->getElementsByTagName('p'); \n\n foreach ($p1 as $p) {\n\n $orig_cell_text = $p->nodeValue;\n\n $data_val = false;\n\n if (!empty($orig_cell_text)) {\n if ($this->string_has_params($orig_cell_text)) {\n\n if ($this->parse_string_is_once_param($orig_cell_text)) {\n $param_key = $this->parse_string_extract_param($orig_cell_text);\n\n if ($this->parse_param_exists($param_key, $data)) {\n\n $data_val = $this->parse_param_value(\n $param_key, $data\n );\n $this->ods_cell_set_val($cell, $p, $data_val, array());\n }\n } else {\n $p->nodeValue = $this->parse_string($orig_cell_text, $data);\n }\n }\n }\n }\n \n $this->ods_render_cell_images($cell, $data); \n \n }\n return $row;\n }", "function Row($data){\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++){\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n \t//Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n \t//Draw the border\n\t $this->Rect($x,$y,$w,$h);\n \t//Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\n\t //Go to the next line\n\t $this->Ln($h);\n\t}", "private function _getNoteTableRow($label,$value,$noLtGtReplace=0){\t\n\t\t$value = htmlspecialchars($value);\n\t\tif( $noLtGtReplace == 0 ){ $value = str_replace(array('&lt;','&gt;'),array('|lt|','|gt|'),$value); }\n\t\treturn '<tr valign=\"top\"><td>'.htmlspecialchars($label).'</td><td>'.$value.'</td></tr>';\n\t}", "public function renderRow($title = '',$message = '') {\n $o = array();\n $o[] = '<tr>';\n if ($title != '' && $message != '') {\n $o[] = '<th>'.$title.'</th>';\n $o[] = '<td>'.$message.'</td>';\n } else if ($title != '') {\n $o[] = '<th colspan=\"2\">'.$title.'</th>';\n } else {\n $o[] = '<td colspan=\"2\">'.$message.'</td>';\n }\n $o[] = '</tr>';\n return implode(\"\\n\",$o);\n }", "function create_row($binary, $course, $question, $score, $dir, $file) {\n $file_path = $dir.'/'.$file;\n $output = \"<tr class='file_list_\".$binary.\" table_item'>\n <td>\".$course.\"</td>\n <td>\".$question.\"</td>\n <td class='score'>\".intval($score).\"</td>\n <td>\".$dir.\"</td>\n <td>\".$file.\"</td>\n <td class='icon_container'><form class='list_form' method='post' action='\".htmlspecialchars($_SERVER['PHP_SELF']).\"'>\n <button type='image' name='button_value' class='icon delete' title='Frage Löschen' value='delete_file' method='post'></button>\n <button type='image' name='button_value' class='icon edit' title='Frage Editieren' value='edit_file' method='post'></button>\n <input type='hidden' name='file_path' value='\".$file_path.\"'>\n </form>\n </td></tr>\";\n\n return $output;\n }" ]
[ "0.7392005", "0.71538615", "0.71287346", "0.699601", "0.69462675", "0.69455254", "0.6901714", "0.6862465", "0.68075067", "0.67820907", "0.67734426", "0.67584944", "0.67566746", "0.6701989", "0.6633299", "0.6632162", "0.66064864", "0.65792876", "0.6564608", "0.65602064", "0.6555775", "0.6548587", "0.6543219", "0.6473371", "0.6462004", "0.6436837", "0.6436247", "0.6414658", "0.6384891", "0.6382991", "0.6381334", "0.637814", "0.6362658", "0.6362577", "0.63418865", "0.6322491", "0.6321694", "0.63180274", "0.63145965", "0.6266724", "0.62408", "0.6230924", "0.62260437", "0.6223032", "0.6220547", "0.62160254", "0.62110645", "0.6206623", "0.6202088", "0.6198397", "0.6189131", "0.61845", "0.61799943", "0.61799145", "0.61799145", "0.6179402", "0.61617315", "0.615414", "0.61516684", "0.61367095", "0.6133199", "0.6127664", "0.6126815", "0.61232877", "0.61084366", "0.61084366", "0.61084366", "0.6107974", "0.6107974", "0.61071384", "0.6106718", "0.6106039", "0.6096138", "0.60956085", "0.608332", "0.6078252", "0.60779154", "0.60734344", "0.6073198", "0.6072669", "0.6065814", "0.60583955", "0.6054972", "0.60523546", "0.6044414", "0.6034041", "0.60327107", "0.6032113", "0.6028913", "0.60278964", "0.6027836", "0.6027059", "0.6025732", "0.6021293", "0.6019978", "0.6017077", "0.601593", "0.5991382", "0.599002", "0.59877956" ]
0.6896531
7
Print Array as Tablerows (HTML) Recursive calls posible
public function row_array($array, $array_node = null, $array_level = 0) { if ($array_level == 0) { $out .= debug::row_double("<b>Key</b>", "<b>Value</b>"); } foreach ($array as $key => $value) { $shift = str_repeat("&nbsp;&nbsp;", $array_level); if ($array_level==0) { $caption = $key; } else { $caption = "[".$key."]"; }; // walk types if (is_array($value)) { $out .= debug::row_double($shift.$array_node.$caption, "(".gettype($value).")"); $out .= $this->row_array($value, $array_node.$caption, $array_level+1); } elseif (is_object($value)) { $out .= debug::row_double($shift.$array_node.$caption, "(".gettype($value).")&nbsp;"); $out .= $this->row_array(get_object_vars($value), $array_node.$caption, $array_level+1); } elseif (is_scalar($value)) { $out .= debug::row_double($shift.$array_node.$caption, "(".gettype($value).")&nbsp;".htmlentities($value)); } else { $out .= debug::row_double($shift.$array_node.$caption, "(".gettype($value).")&nbsp;Error: Can not display Debug- Value!!!"); } } return $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dumpTable($passedArray) {\n\techo '<br><table border=\"1\" cellpadding=\"3\" frame=\"border\" rules=\"all\">';\n\tforeach($passedArray as $row) {\n\t\techo '<tr><td>';\n\t\techo implode('</td><td>', $row);\n\t\techo '</td></tr>';\n\t}\n\techo '</table><br>';\n\t@ob_flush();\n\t@flush();\t\n\treturn;\n}", "function dumpTable($passedArray) {\n\t\n\techo '<br><table border=\"1\" cellpadding=\"3\" frame=\"border\" rules=\"all\">';\n\tforeach($passedArray as $row) {\n\t\techo '<tr><td>';\n\t\techo implode('</td><td>', $row);\n\t\techo '</td></tr>';\n\t}\n\techo '</table><br>';\n\t@ob_flush();\n\t@flush();\n\n\treturn;\n}", "function da( $TheArray ){ // Note: the function is recursive\r\n\tif(!is_array($TheArray)){\r\n\t\treturn \"no array\";\r\n\t}\r\n\techo \"<table border=0>\\n\";\r\n\t$Keys = array_keys( $TheArray );\r\n\tforeach( $Keys as $OneKey ){\r\n\t\techo \"<tr>\\n\";\r\n\t\techo \"<td bgcolor='#727450'>\";\r\n\t\techo \"<B>\" . $OneKey . \"</B>\";\r\n\t\techo \"</td>\\n\";\r\n\t\techo \"<td bgcolor='#C4C2A6'>\";\r\n\t\tif ( is_array($TheArray[$OneKey]) ){\r\n\t\t\tda($TheArray[$OneKey]);\r\n\t\t}else{\r\n\t\t\techo $TheArray[$OneKey];\r\n\t\t}\r\n\t\techo \"</td>\\n\";\r\n\t\techo \"</tr>\\n\";\r\n\t}\r\n\techo \"</table>\\n\";\r\n}", "public static function printArray($array, $border) {\r\n\r\n/* This function loops through a simple (1D)\r\n array and prints out all the values in a \r\n table. This is used for diagnostic\r\n purposes primarily, although there \r\n can be other applications. */\r\n \r\n // Check that the array exists\r\n if (!$array) {\r\n echo \"No array specified.<BR><BR>\";\r\n return;\r\n }\r\n \r\n else {\r\n // Start table\r\n echo \"<TABLE BORDER=$border>\";\r\n \r\n // Print the array in table cells\r\n foreach ($array as $value) {\r\n echo \"<TR><TD>$value</TD></TR>\"; \r\n } // end of while loop\r\n \r\n // End table and return\r\n echo \"</TABLE>\";\r\n return;\r\n } // end of else\r\n\r\n}", "public function outputFunction($array, $depth=0, $tab=\"&nbsp;&nbsp;\") {\n foreach ($array as $key=>$value) {\n // line break\n for ($i=0; $i<$depth; $i++) echo $tab;\n if (is_numeric($key)) {\n echo $key.' => ';\n }\n else {\n echo '\\''.$key.'\\' => ';\n }\n if (is_array($value)) {\n echo 'array('.\"\\n\";\n $this->outputFunction($value, $depth+1);\n // line break\n for ($i=0; $i<$depth; $i++) echo $tab;\n echo '),'.\"\\n\";\n }\n else {\n // value\n if (is_numeric($value)) {\n echo $value.','.\"\\n\";\n }\n else {\n echo '\\''.$value.'\\','.\"\\n\";\n }\n }\n }\n }", "function printTable($array,$m,$n){\necho \"<br>\"; \nfor ($i = 0; $i <= $m; $i++) \n{ \nfor ($j = 0; $j <= $n; $j++) \n{ \n echo $array[$i][$j].\" \";\n}\n echo \"<br>\";\n}\n\n echo \"<br>\";\n echo \"<br>\";\n}", "function printr($array, $print = true) { //imprime o devuelve la cadena\n if ($print)\n return print_r($array, true);\n else\n echo '<pre>' . print_r($array, true) . '</pre>'; //tabula bien gracias a los <pre>\n }", "function tableauToHTML(array $tab)\n{\n echo \"<table>\";\n foreach ($tab as $i => $ligne) {\n echo \"<tr>\";\n foreach ($ligne as $j => $valeur) {\n echo \"<td>$valeur</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "function print_r_html ($arr) {\n\techo \"<pre>\";\n print_r($arr);\n echo \"</pre>\";\n}", "public static function print_rHTML($array)\r\n\t{\r\n\t\tif( ! self::isHTML() ) return;\r\n\t\tCommon::print_r($text);\r\n\t}", "function htmldump ( $array ) {\r\n\t\tforeach($array as $key => $val) {\r\n\t\t\t$return .= $this->ul(\r\n\t\t\t\t\t\t$this->li($this->font($key)) .\r\n\t\t\t\t\t\t\t$this->ul(\r\n\t\t\t\t\t\t\t\t$this->font(is_array($val) ? $this->htmldump($val) : $this->li($val))\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "function array2table($array, $recursive = false, $return = false, $null = '&nbsp;')\n\t{\n\t // Sanity check\n\t if (empty($array) || !is_array($array)) {\n\t return false;\n\t }\n\n\t if (!isset($array[0]) || !is_array($array[0])) {\n\t $array = array($array);\n\t }\n\n\t // Start the table\n\t $table = \"<table>\\n\";\n\t\t$head = array_keys($array[0]);\n\tif (!is_numeric($head[0])) {\n\t // The header\n\t $table .= \"\\t<tr>\";\n\t // Take the keys from the first row as the headings\n\t foreach (array_keys($array[0]) as $heading) {\n\t $table .= '<th>' . $heading . '</th>';\n\t }\n\t $table .= \"</tr>\\n\";\n\t}\n\t // The body\n\t foreach ($array as $row) {\n\t $table .= \"\\t<tr>\" ;\n\t foreach ($row as $cell) {\n\t $table .= '<td>';\n\n\t // Cast objects\n\t if (is_object($cell)) { $cell = (array) $cell; }\n\n\t if ($recursive === true && is_array($cell) && !empty($cell)) {\n\t // Recursive mode\n\t $table .= \"\\n\" . $this->array2table($cell, true, true) . \"\\n\";\n\t } else {\n\t $table .= (strlen($cell) > 0) ?\n\t\t\t\t\thtmlspecialchars((string) $cell) :\n\t\t\t\t\t$null;\n\t }\n\n\t $table .= '</td>';\n\t }\n\n\t $table .= \"</tr>\\n\";\n\t }\n\n\t // End the table\n\t $table .= '</table>';\n\n\t // Method of output\n\t if ($return === false) {\n\t echo $table;\n\t } else {\n\t return $table;\n\t }\n\t}", "function printTable($arg_array)\r\n\t\t{\r\n\t\techo \"<table border=1>\";\r\n\t\tforeach($arg_array[0] as $key=>$value)\r\n\t\t\t{\r\n\t\t\techo \"<th>\".$key.\"</th>\";\r\n\t\t\t}\r\n\t\techo \"<tr>\";\r\n\t\tforeach($arg_array as $row =>$record)\r\n\t\t\t{\r\n\t\t\tforeach($record as $column_head => $value)\r\n\t\t\t\t{\r\n\t\t\t\techo \"<td>\".$value.\"</td>\";\r\n\t\t\t\t}\r\n\t\t\techo \"</tr>\";\t\r\n\t\t\t}\r\n\t\techo \"</table>\";\r\n\t\t}", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "function arrayToTable($array_assoc):void {\n if (is_array($array_assoc)) {\n echo '<table class=\"table\">';\n echo '<thead>';\n echo '<tr>';\n list($table_title) = $array_assoc;\n foreach ($table_title as $key => &$value):\n echo '<th>' . $key . '</th>';\n endforeach;\n echo '</tr>';\n echo '</thead>';\n foreach ($array_assoc as &$master):\n echo '<tr>';\n foreach ($master as &$slave):\n echo '<td>' . $slave . '</td>';\n endforeach;\n echo '</tr>';\n endforeach;\n echo '</table>';\n }\n}", "static function DisplayArray($array)\r\n {\r\n $depth = 0;\r\n if (is_array($array))\r\n {\r\n echo \"Array (<br />\";\r\n for($i = 0; $i < count($array); $i ++)\r\n {\r\n if (is_array($array[$i]))\r\n {\r\n DisplayInlineArray($array[$i], $depth + 1, $i);\r\n }\r\n else\r\n {\r\n echo \"[\" . $i . \"] => \" . $array[$i];\r\n echo \"<br />\";\r\n $depth = 0;\r\n }\r\n }\r\n echo \")<br />\";\r\n }\r\n else\r\n {\r\n echo \"Variabele is geen array\";\r\n }\r\n }", "function display2DArray($array,$printoptionsflag){\n\t\tif($array==null){\n\t\t\tprint \"No results were found!\";\n\t\t} else {\n\t\t\tprint \"<table class=\\\"clients\\\"><tr>\";\n\t\t\t$first = $array[0];\n\t\t\t$keys = array_keys($first); //Return the keys of the array, use first element;\n\t\t\tfor ($i=0;$i<count($keys);$i++){\n\t\t\t\tprint \"<td>\".$keys[$i].\"</td>\\n\";\n\t\t\t}\n\t\t\tprint \"</tr>\";\n\t\t\tfor ($j=0;$j<count($array);$j++){\n\t\t\t\tprint \"<tr>\";\n\t\t\t\tfor ($i=0;$i<(count($keys));$i++){\n\t\t\t\t\tprint \"<td>\".$array[$j][$keys[$i]].\"</td>\\n\";\n\t\t\t\t}\n\t\t\t\tif ($printoptionsflag){\n\t\t\t\t\t$this->printOptions($array[$j]['Client_ID']);\n\t\t\t\t}\n\t\t\t\tprint \"</tr>\\n\";\n\t\t\t}\n\t\t\tprint \"</table>\\n\";\n\t\t}\n\t}", "function pprint($array, $file_name='array'){\n /**\n * Pretty print Arrays - in collapsible and scrollable boxes\n *\n * @param Array to be printed\n * @param String as name of the printed box\n *\n * @return HTML non semantic...\n */\n $id = random_int(0, 999);\n echo '<style type=\"text/css\">input#'.$id.':checked ~ div.ijwe {display: none;}</style>';\n echo '<br><div style=\"background-color:#b1b1b1; border: 1px solid #949494; width:96%; margin: auto;\">';\n echo '<input type=\"checkbox\" id=\"toggle-'.$id.'\" style=\"display:inline; width:15px; background-color:transparent;\"><label style=\" white-space:nowrap; clear: both; width:0px;\" for=\"toggle-'.$id.'\"><h3 style=\"display:inline; line-height: 2px; margin: 1em;\">'.$file_name.':</h3></label>';\n echo '<div class=\"ijwe\" style=\"background-color:#c4c4c4; overflow-y: scroll; padding: 0.3em; max-height:400px;\"><pre><xmp>';\n print_r($array);\n echo '</xmp></pre></div>';\n echo '</div>';\n}", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function dump_array($array)\n{\n\n\t$_str = \"<table bgcolor = '%s'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table><br>\";\n\n\tif(is_array($array)){\n\n\t\t$size = count($array);\n\t\t$string = \"\";\n\n\t\tif($size) {\n\n\t\t\t$string .= \"{ <br>\";\n\n\t\t\tforeach($array as $a => $b) {\n\n\t\t\t\tif(is_array($b)) { $b = dump_array($b); }\n\t\t\t\tif(is_object($b)) { $b = dump_array(object_to_array($b)); }\n\t\t\t\t$string .= \"&nbsp;&nbsp;&nbsp;&nbsp;<b>$a = '$b'</b><br>\";\n\n \t\t}\n\n\t\t\t$string .= \" }<br>\";\n\t\t}\n\n\t\t$r = sprintf($_str, '#DACE0B', $string);\n\n\t\treturn $r;\n\n } else { return $array; }\n}", "function tabla03($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table border=\\\"0\\\">\";\n\tforeach( $array01 as $value ){\n\t\tforeach( $value as $key => $value){\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t\t}\n\t\t// linea en blanco\n\t\t$array02[$i++] = \"<tr><td></td><td></td></tr>\\n\";\n\t}\n\t$array02[$i++] = \"</table>\";\n\treturn $array02;\n\n// foreach( $array02 as $value ){\n//\techo $value;\n//}\n}", "public static function print2DArray($array, $border) {\r\n\r\n/* This function loops through an associative\r\n array and prints out all the values in a \r\n table. This is used for diagnostic\r\n purposes primarily, although there \r\n can be other applications. */\r\n \r\n // Check that the array exists\r\n if (!$array) {\r\n echo \"No array specified.<BR><BR>\";\r\n return;\r\n }\r\n \r\n else {\r\n // Start table\r\n echo \"<TABLE BORDER=$border>\";\r\n \r\n // Print the array in table cells\r\n while (list($key, $value) = each ($array)) {\r\n echo \"<TR><TD>$key</TD><TD>$value</TD></TR>\"; \r\n } // end of while loop\r\n \r\n // End table and return\r\n echo \"</TABLE>\";\r\n return;\r\n } // end of else\r\n\r\n}", "function buildTable($array){\n // start table\n $html = '<table class=\"table\">';\n // data rows\n foreach( $array as $key=>$value){\n $html .= '<tr>';\n foreach($value as $key2=>$value2){\n $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n }\n $html .= '</tr>';\n }\n\n // finish table and return it\n\n $html .= '</table>';\n return $html;\n}", "function pre_print_r($array){\n\n\techo '<pre style=\"font-family: monospace; font-size: 14px; text-align:left!important\">';\n\tprint_r($array);\n\techo '</pre>';\n\n}", "public function print(bool $html = true, int $level = 0) : Arr {\n \n $arr = $this;\n\n $br = $html ? '<br>' : \"\\n\";\n $sp = $html ? '&nbsp;&nbsp;&nbsp;' : ' ';\n\n foreach($arr as $k => $v) {\n for($i = 0; $i<$level; ++$i) {\n echo $sp;\n }\n echo \"$k = \";\n\n if (is_array($v)) {\n\n $arrv = arr($v);\n\n if (!$arrv->isAssoc()) {\n\n if (!$arrv->isEmpty()) {\n\n echo '[';\n\n $arrv->foreach(function($key, $value) use($arrv, $html, $level, $sp, $br) {\n\n if (is_string($value)) {\n echo \"'$value'\";\n }\n\n else if (is_bool($value)) {\n echo $value ? 'true' : 'false';\n }\n\n else if (is_array($value)) {\n\n $arr = arr($value);\n $assoc = $arr->isAssoc();\n $b = $assoc ? '{' : '[';\n\n echo $br;\n forn($level+1, function($index) use($sp) {\n echo $sp;\n });\n\n echo \"$b $br\";\n\n arr($value)->print($html, $level + 2);\n\n forn($level + 1, function($index) use($sp) {\n echo $sp;\n });\n\n echo \"$b $br\";\n\n } else echo $value;\n\n });\n\n forn($level, function() use($sp) {\n echo $sp;\n });\n\n echo \"]$sp\";\n } else {\n echo \"{ }$sp\";\n }\n\n } else {\n\n if (!$arrv->isEmpty()) {\n echo \"{ $br\";\n $arrv->print($html, $level + 1);\n forn($level, function() use($sp) {\n echo $sp;\n });\n echo \"}$br\";\n\n } else {\n echo \"{ }$br\";\n }\n\n }\n\n } else if (is_bool($v)) {\n\n echo $v ? 'true' : 'false';\n echo $br;\n\n } else if (is_string($v)) {\n echo \"'$v'$br\";\n\n } else {\n echo \"$v $br\";\n }\n }\n\n return $this;\n }", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "function angela_print_array($arr, $spaces = 0)\n{\n\t$sp=$spaces+1;\n\t\n\tif (is_array($arr))\n\t\tforeach ( $arr as $arrkey => $arrval )\n\t\t{\n\t\t\tfor ($i=0; $i<$spaces; $i++) echo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"; \n\t\t\techo \"[$arrkey] => <br>\\n\";\n\t\t\tangela_print_array($arrval, $sp);\n\t\t}\n\telse\n\t{\n\t\tfor ($i=0; $i<$spaces; $i++) echo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"; \n\t\tif (!isset($arr))\n\t\t\techo \"-- empty --<br>\";\n\t\telse\n\t\t\techo \"$arr <br>\";\n\t}\n}", "function printArray($array){\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n }", "function printTails ($bottomList) {\t\n\n echo \"<table align=center valign=bottom width=100%>\";\n\n echo \"<tr bgcolor=><td align=center class=fixedlinings>&nbsp;\\n\";\n\n $tabs = \"\";\n\n foreach ($bottomList as $entry){\n\n if ($tabs){\n\n echo \" | \";\n\n }\n\n else {\n\n $tabs = 1;\n\n }\n\n echo $entry, \"\\n\";\n\n }\n\n echo \"&nbsp;</td></tr>\";\n\n\n\n}", "private function printArray($array){\n\t\techo \"<pre>\".print_r($array,true).\"</pre>\";\n\t}", "static function printr($array)\n {\n echo '<pre>' . print_r($array, true) . '</pre>';\n }", "function makeMultiDimTable($array)\n {\n $totalkeys = 0;\n $totalvalues = 0;\n echo \"<table>\";\n echo \"<thead><tr><td>Keys</td><td>Values</td></tr></thead>\";\n echo \"<tbody>\";\n foreach($array as $key => $value)\n {\n echo \"<tr><td>\" . $key . \"</td><td>\" . $value . \"</td></tr>\";\n $totalkeys += $key;\n $totalvalues += $value;\n }\n echo \"<tr><td colspan=2>Totals</td></tr>\";\n echo \"<tr><td>\" . $totalkeys . \"</td><td>\" . $totalvalues . \"</td></tr>\";\n echo \"</tbody>\";\n }", "function printArray($array){\n print '<pre>';\n print_r($array);\n print '</pre>';\n}", "function\teeps_printr($a, $level)\t{\n if (is_array($a))\t{\n $name = key($a);\n echo\t\"<br>\";\n for ($i = 0; $i < $level*2; $i++)\techo \"&nbsp;&nbsp;\";\n echo \"<strong>ARRAY $name</strong>\";\n foreach ($a as $e)\t{\n eeps_printr($e, $level + 1);\n }\n }\n else {\n if (strlen($a) != 0)\t{\n echo\t\"<br>\";\n for ($i = 0; $i < $level*2; $i++)\techo \"&nbsp;&nbsp;\";\n echo \"$a\";\n }\n }\n}", "function printArray($data)\r\n{\r\n\techo \"<pre>\";\r\n\tprint_r($data);\r\n\techo \"</pre>\";\r\n}", "function DisplayArray($array) {\n foreach ($array as $value) {\n if (is_array($value)) {\n DisplayArray($value);\n } else {\n echo $value . \"<br>\";\n }\n }\n }", "function tabla01($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table id=\\\"one-column-emphasis\\\" >\\n\n <colgroup>\\n\n \t<col class=\\\"oce-first\\\" />\\n\n </colgroup>\\n\n <tbody>\\n\";\n\tforeach( $array01 as $key => $value){\n\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t}\n\t$array02[$i++] = \"</tbody>\\n</table>\\n\";\n\treturn $array02;\n/*\n<table id=\\\"one-column-emphasis\\\" >\n <colgroup>\n \t<col class=\\\"oce-first\\\" />\n </colgroup>\n <tbody>\n \t<tr>\n \t<td></td>\n </tr>\n </tbody>\n</table>\n*/\n}", "function echoContentsWithEOL($data)\r\n{\r\n if (is_array($data))\r\n {\r\n foreach ($data as $subItem)\r\n {\r\n echoContents($subItem);\r\n }\r\n }\r\n \r\n else\r\n { \r\n echo $data.PHP_EOL;\r\n }\r\n}", "function print_array($array) {\n\n echo \"<pre>\";\n\n print_r($array);\n\n echo \"</pre>\";\n\n }", "function echoResultsQREE ($rows) \r{\r \techo \"<table cellpadding=7>\\n\";\r \tforeach ($rows as $row) {\r\t\techo \"\\n\\n\\n<tr>\\n<td valign=top>\\n\";\r\t\techoDocumentLink($row);\r\t\techo \"<td><font color=blue>\".$row[0].\"</font><br>\";\r\t\techoTwoSentences($row[3],$row[4],$row[5],$row[6],$row[7],false);\r \t}\r \techo \"</table>\\n\";\r}", "function drawTable($dataArray)\n{\n $dom = new DOMDocument();\n $table = $dom->createElement('table');\n $table->setAttribute('class', 'log-table');\n\n foreach ($dataArray as $row)\n {\n $tr = $dom->createElement('tr');\n $table->appendChild($tr);\n\n $td = $dom->createElement('td', $row);\n $tr->appendChild($td);\n\n $table->appendChild($tr);\n }\n\n $dom->appendChild($table);\n echo $dom->saveHTML();\n}", "function _pre($array) { echo '<pre>'; print_r ($array); echo '</pre>'; }", "public function getOutput() {\n $output = array();\n $output[] = '<style>.rb-debug td, .rb-debug th { border: 1px solid #aaa; padding: 3px;}.rb-debug td { text-align: left; }.rb-debug th { font-weight: bold; background-color: #eee; vertical-align: top; }.rb-debug { border: 1px solid #aaa; }</style>';\n $output[] = '<table class=\"rb-debug\" cellspacing=\"0\">';\n\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.header'));\n\n if (!empty($this->query)) {\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.table'),$this->query->getTable());\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.query'),nl2br($this->query->toSql()));\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.pdo_query'),nl2br($this->query->toSql(false)));\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.params'),'<pre>'.var_export($this->query->getParams(),true).'</pre>');\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.total'),$this->total);\n }\n\n if (!empty($this->messages)) {\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.messages'));\n foreach ($this->messages as $message) {\n $output[] = $this->renderRow('',$message);\n }\n }\n \n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.results'));\n\n $idx = 0;\n foreach ($this->results as $result) {\n $row = array();\n $row[] = '<table>';\n foreach ($result as $col => $val) {\n $row[] = $this->renderRow($col,$val == '' ? ' ' : $val);\n }\n $row[] = '</table>';\n $output[] = $this->renderRow('#'.$idx,implode(\"\\n\",$row));\n $idx++;\n }\n $output[] = '</table>';\n return implode(\"\\n\",$output);\n }", "function print_array($data){\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n }", "function vievRandomBigArray($array){\n echo '<table border=\"1\">';\n for ($y=0; $y < count($array); $y++){\n echo '<tr>';\n for ($x=0; $x < count($array[$y]); $x++){\n echo \"<td>\".$array[$y][$x].'</td>';\n }\n echo \"</tr>\";\n }\n echo '</table>';\n}", "private function arrayToPrint()\n\t{\n\t\t$this->view->addToReplace($this->langArr);\n\t\t$this->view->addToReplace($this->arrRender);\n\t\t$this->arrRender['CONTENT'] = $this->view\n\t\t\t->setTemplateFile('employeeedit')->renderFile();\n\t\t$this->view->addToReplace($this->arrRender);\n\t\t$this->view->setTemplateFile('index')->templateRender();\n\t}", "function print_table($data)\n{\n\t$col_width = array();\n\n\t// pre-calculate column width\n\tforeach ($data as $row) {\n\t\tforeach ($row as $col => $value) {\n\t\t\t$col_width[$col] = max(@$col_width[$col], mb_strlen(var_export($value, true)));\n\t\t}\n\t}\n\n\t// include key width\n\tforeach ($col_width as $label => & $width) {\n\t\t$width = max(mb_strlen($label), $width);\n\t}\n\t\n\t// show table header\n\techo \"\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\t$pad = ($width - mb_strlen($label)) / 2.;\n\t\techo \"| \", str_repeat(' ', floor($pad)), $label, str_repeat(' ', ceil($pad)), \" \";\n\t}\n\techo \"|\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n \";\n\n\t// show table\n\tforeach ($data as $row) {\n\t\tforeach ($row as $col => $value) {\n\t\t\t$value_str = var_export($value, true);\n\t\t\t$pad = $col_width[$col] - mb_strlen($value_str);\n\t\t\tif (is_numeric($value)) {\n\t\t\t\techo \"| \", str_repeat(' ', $pad), $value_str, \" \";\n\t\t\t} else {\n\t\t\t\techo \"| \", $value_str, str_repeat(' ', $pad), \" \";\n\t\t\t}\n\t\t}\n\t\techo \"|\\n \";\n\t}\n\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n\\n\";\n}", "function beginChildren()\n {\n echo \"<tr>\";\n }", "function affichageTableau($tableau)\n{\n foreach ($tableau as $element) {\n echo \"[\",$element,\"]\",\"\\t\";\n }\n return $tableau;\n}", "function printTable ($backArray, $geoArray, $socArray, $enerArray, $commArray) {\n \n \n // Variables to check the categories array sizes\n $backSize = count($backArray);\n $geoSize = count($geoArray);\n $socSize = count($socArray);\n $enerSize = count($enerArray);\n $commSize = count($commArray);\n \n \n // Error checking if nothing was selected\n \n if ($backSize != 0 || $geoSize != 0 || $socSize != 0 || $enerSize != 0 || $commSize != 0) {\n \n // open the table border\n print \"<table><tr>\";\n \n if ($backSize != 0) {\n \n for ($i = 0; $i < $backSize; $i++) {\n \n if ($backArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($backArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n \n }\n if ($backArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($backArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n \n }\n \n if ($backArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($backArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n \n }\n }\n }\n \n if ($geoSize != 0) {\n \n for ($i = 0; $i < $geoSize; $i++) {\n \n if ($geoArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($geoArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n }\n \n if ($geoArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($geoArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n }\n \n if ($geoArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($geoArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n \n }\n }\n }\n \n if ($socSize != 0) {\n for ($i = 0; $i < $socSize; $i++) {\n \n if ($socArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($socArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n }\n if ($socArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($socArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n \n }\n if ($socArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($socArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n }\n }\n }\n if ($enerSize != 0) { \n \n for ($i = 0; $i < $enerSize; $i++) {\n \n if ($enerArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($enerArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n }\n \n if ($enerArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($enerArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n \n }\n \n if ($enerArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($enerArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n \n }\n }\n } \n if ($commSize != 0) { \n \n for ($i = 0; $i < $commSize; $i++) {\n if ($commArray[$i][0] == 0) {\n \n $cleanStr = substr_replace($commArray[$i], \"\", 0,1);\n \n print \"<th>\" . $cleanStr . \"</th>\";\n }\n if ($commArray[$i][0] == 1) {\n \n print \"<tr>\";\n \n $cleanStr1 = substr_replace($commArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr1 . \"</td>\";\n \n }\n if ($commArray[$i][0] == 2) {\n \n $cleanStr2 = substr_replace($commArray[$i], \"\", 0,1);\n \n print \"<td>\" . $cleanStr2 . \"</td>\";\n \n print \"</tr>\";\n }\n }\n }\n print \"</tr></table>\";\n \n print \"<hr>\";\n \n echo \"<h3>\" . \"Chart of the Data Selected\" . \"</h2>\";\n \n }\n else {\n echo \"<h2>\" . \"No data Selected\" . \"</h2>\";\n \n }\n }", "private function htmlFromArray($hierarchicalArray) {\n $html = '';\n foreach($hierarchicalArray as $item) {\n $html .= \"<ul>\";\n $html .= \"<li style='color: \". ( ($item['status'] == 1) ? \"green\" : \"red\" ) .\"'>\". $item['title'] . \"<span style='color:black;'> --- \". $item['total_points'] .\"</span></li>\";\n if(count($item['children']) > 0) {\n $html .= $this->htmlFromArray($item['children']);\n }\n $html .= \"</ul>\";\n }\n return $html;\n }", "function printArray($array, $indent = ' > ', $withKey = true)\n{\n if($withKey)\n {\n foreach($array as $key => $value)\n {\n if(is_array($value))\n {\n echo \"$indent$key \\t=> {\" . PHP_EOL;\n printArray($value, \"$indent\\t\");\n echo \"$indent}\" . PHP_EOL;\n }\n else\n {\n echo \"$indent$key \\t=> $value\" . PHP_EOL;\n }\n }\n }\n}", "function printr($t) {\n\techo \"<pre class='printr'>\";\n\tprint_r($t);\n\techo \"</pre>\";\n}", "function print_array($array)\r\n{\r\n\techo '<pre>';\r\n\tprint_r($array);\r\n\techo '</pre>';\r\n}", "function print_r_slim($arr, $no_print=false)\r\n{\r\n $out = print_r($arr, true);\r\n\r\n $out = str_replace(\" \", \"\", $out);\r\n $out = str_replace(\"\\n\", \", \", $out);\r\n $out = str_replace(\", )\", \"), \", $out);\r\n $out = str_replace(\", , \", \"\", $out);\r\n $out = str_replace(\", (, \", \"(\", $out);\r\n $out = str_replace(\"Array, \", \"Array\", $out);\r\n $out = str_replace(\"Object\", \" Object\", $out);\r\n\r\n if (!$no_print)\r\n {\r\n echo $out;\r\n return;\r\n }\r\n\r\n return $out;\r\n}", "function DumpResultRows($ResultArray,$BackgroundColor,$Color,$Text,$Odd=false)\n{\n\tif (count($ResultArray)):?>\n<tr style='background-color:<?php exho ($BackgroundColor);?>;color:<?php exho ($Color)?>;font-weight:bold;'>\n<td colspan='4' >\n\t<?php exho (count($ResultArray)); \n\techo \" {$Text}\";\n\t?>\n\t\n</td>\n</tr>\n<?php \n\t\t$n=0;\n\t\tforeach ($ResultArray as $test)\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\techo \"<td width='50' align='center'>\\n\\t\\t\";\n\t\t\techo ++$n;\n\t\t\techo \"\\n</td>\";\n\t\t\t$t=$test->failedTest();\n\t\t\techo \"<td>\\n\\t\\t\";\n\t\t\techo get_class($t);\n\t\t\techo \" :: \";\n\t\t\techo $t->getName();\n\t\t\techo \"\\n</td>\";\n\t\t\techo \"<td>\\n\\t\\t\";\n\t\t\t$e=new Exception();\n \t\t\techo $test->getExceptionAsString();\n\t\t\techo \"</td>\";\n\t\t\techo \"<td>\\n\\t\\t\";\n\t\t\t$trace=($test->thrownException()->getTrace());\n\t\t\tif ($Odd)\n\t\t\t{\n\t\t\t\t$file=$trace[0]['file'];\n\t\t\t\t$line=$trace[0]['line'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isset($trace[3]['file']))\n\t\t\t\t{\n\t\t\t\t\t$file=$trace[3]['file'];\n\t\t\t\t\t$line=$trace[3]['line'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$file=$line=null;\n\t\t\t}\n\t\t\tif ($file!==null)\n\t\t\t{\n\t\t\t\t$dir=substr($file, 0,strlen(jf::root()));\n\t\t\t\t$dir=substr($file,0,strpos($file,DIRECTORY_SEPARATOR,strlen($dir)+1));\n\t\t\t\t$dir=substr($file,0,strpos($file,DIRECTORY_SEPARATOR,strlen($dir)+1));\n\t\t\t\t$filename=substr($file,strlen($dir)+1);\n\t\t\t\techo $dir.\"/<strong>{$filename}</strong> :{$line}\";\n\t\t\t}\n\t\t\telse\n\t\t\t\techo \"File: Could not determine, probably because of fatal error.\";\n\t\t\t\n\t\t\techo \"\\n</td>\\n\";\n\t\t\techo \"</tr>\\n\";\n\t\t}\n\t\t?>\n\t<?php \n\tendif;\t\n}", "function html_table($data) {\r\n\r\n $row = mysqli_fetch_assoc($data);\r\n $rows = array();\r\n array_push($rows, $row);\r\n $attributes = array_keys($row);\r\n\r\n if(mysqli_num_rows($data) > 0) {\r\n while($row = mysqli_fetch_assoc($data)) {\r\n array_push($rows, $row);\r\n }\r\n }\r\n\r\n print(\"<table>\\n\");\r\n print(\"<tr>\\n\");\r\n for($i = 0; $i < count($attributes); $i++) {\r\n print(\"<th>{$attributes[$i]}</th>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n for($j = 0; $j < count($rows); $j++) {\r\n print(\"<tr>\\n\");\r\n foreach($attributes as $attribute) {\r\n print(\"<td>{$rows[$j][$attribute]}</td>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n }\r\n\r\n print(\"</table>\\n\");\r\n\r\n}", "function printr($array, $return = false) {\n $str = '<pre>' . print_r($array, true) . '</pre>';\n if (!$return) {\n echo $str;\n } else {\n return $str;\n }\n}", "function printArray($array){\n\t\tforeach ($array as $key => $value) {\n\t\t\tprint(\"{$key}: $value<br />\");\n\t\t}\n\t}", "function pr($array)\n{\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n}", "function print_array($file_path=\"\", $row_sep = \"\\n\", $col_sep = \"\\t\") {\n if($this->arr != null && count($this->arr) > 0){\n $row = 0;\n //starting buffer to print\n ob_start();\n foreach($this->arr as $row){\n echo implode($col_sep, $row);\n echo $row_sep;\n }\n $contents = ob_get_contents();\n ob_end_clean(); //clean buffer and close it\n\n //write to a file if it is provided\n if(strlen($file_path) > 0){\n file_put_contents($file_path,$contents);\n } else {\n //print to console\n echo $contents;\n }\n } else {\n echo \"Empty array. Nothing to print.\";\n }\n }", "function echoResult($myarray){\n\t\t\t$ctr = 1;\n\t\t\tforeach($myarray as $entry){\n\t\t\t\techo \"<p>$ctr : $entry</p>\";\n\t\t\t\t$ctr += 1;\n\t\t\t}\n\t\t}", "function printArray($tempArray)\n{\n\tfor ($i = 0; $i < count($tempArray); $i++)\n\t{\n\t\tfor ($j = 0; $j < count($tempArray[$i]); $j++)\n\t\t{\n\t\t\tif ($tempArray[$i][$j] == $tempArray[$i][\"0\"])\n\t\t\t{\n\t\t\t\techo \"<h2>\" . \"----=\" . $tempArray[$i][$j] . \"=----<br>\" . \"</h2>\" ;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo $j . \". \" . $tempArray[$i][$j]. \"<br>\";\n\t\t\t}\n\t\t}\n\t\techo \"<br>\";\n\t}\n}", "function print_pre($array){\n\t\techo '<pre>';\n\t\tprint_r($array);\n\t\techo '</pre>';\n\t}", "function printArray($array){\n // will accept arrays of values or arrays of arrays\n\n $c = \"\"; // for the comma :)\n $o = \"\"; // the output\n\n foreach($array as $item){\n if (is_array($item)){\n $o .= $c . printArray($item);\n }\n else{\n $o .= $c . $item;\n }\n $c = ',';\n }\n \n $o = \"[\" . $o . \"]\";\n\n return $o;\n}", "function print_email_tabs($tabrows, $selected=NULL, $inactive=NULL, $activated=NULL, $return=false) {\n global $CFG;\n\n/// $inactive must be an array\n if (!is_array($inactive)) {\n $inactive = array();\n }\n\n/// $activated must be an array\n if (!is_array($activated)) {\n $activated = array();\n }\n\n/// Convert the tab rows into a tree that's easier to process\n if (!$tree = convert_tabrows_to_tree($tabrows, $selected, $inactive, $activated)) {\n return false;\n }\n\n/// Print out the current tree of tabs (this function is recursive)\n\n $output = email_convert_tree_to_html($tree);\n\n $output = \"\\n\\n\".'<div class=\"tabtree\">'.$output.'</div><div class=\"clearer\"> </div>'.\"\\n\\n\";\n\n/// We're done!\n\n if ($return) {\n return $output;\n }\n echo $output;\n}", "function echoContents($data)\r\n{\r\n if (is_array($data))\r\n {\r\n foreach ($data as $subItem)\r\n {\r\n echoContents($subItem);\r\n }\r\n }\r\n \r\n else\r\n { \r\n echo $data;\r\n }\r\n}", "function display() {\r\n echo '<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\r\n echo '<tr>'; \r\n for ($pos = 0; $pos < 9; $pos++) { \r\n echo $this->show_cell($pos); \r\n if ($pos % 3 == 2) {\r\n echo '</tr><tr>';\r\n } \r\n }\r\n echo '</tr>';\r\n echo '</table>';\r\n }", "static function dump_table ($rows)\n\t{\n\t\t$first_row = true;\n\t\t$keys = array();\n\t\t$lengths = array();\n\t\tforeach ($rows as $row) {\n\t\t\tforeach ($row as $key => $value) {\n\t\t\t\tif ($first_row) {\n\t\t\t\t\t$keys[] = $key;\n\t\t\t\t\t$lengths[$key] = strlen($key);\n\t\t\t\t}\n\t\t\t\t$val_len = strlen((string)$value);\n\t\t\t\tif ($val_len > $lengths[$key])\n\t\t\t\t\t$lengths[$key] = $val_len;\n\t\t\t}\n\t\t\t$first_row = false;\n\t\t}\n\t\tforeach ($keys as $i => $key) {\n\t\t\t$key_len = strlen($key);\n\t\t\tif ($key_len < $lengths[$key]) {\n\t\t\t\t$keys[$i] .= str_repeat(' ', $lengths[$key] - $key_len);\n\t\t\t}\n\t\t}\n\t\techo PHP_EOL;\n\t\techo implode(\"\\t\", $keys);\n\t\techo PHP_EOL;\n\t\tforeach ($rows as $i => $row) {\n\t\t\tforeach ($row as $key => $value) {\n\t\t\t\t$val_len = strlen((string)$value);\n\t\t\t\tif ($val_len < $lengths[$key]) {\n\t\t\t\t\t$row[$key] .= str_repeat(' ', $lengths[$key] - $val_len);\n\t\t\t\t}\n\t\t\t}\n\t\t\techo implode(\"\\t\", $row);\n\t\t\techo PHP_EOL;\n\t\t}\n\t}", "public function easyPrint($array, $die = 0) {\n\t\tprint \"<pre>\";\n\t\tprint_r($array);\n\t\tprint \"</pre>\";\t\n $die == 1 ? die() : \"\";\n\t}", "public function pp($arr){\n $retStr = \"<dl>\\n\";\n if (is_array($arr)){\n foreach ($arr as $key=>$val){\n if (is_array($val)){\n\t\t$retStr .= \"<dt>\" . $key . \" => </dt>\\n<dd>\" . $this->pp($val) . \"</dd>\\n\";\n\t\t}\n\t else{\n\t\t$retStr .= \"<dt>\" . $key . \" => </dt>\\n<dd>\" . $val . \"</dd>\\n\";\n\t\t}\n }\n }\n $retStr .= \"</dl>\\n\";\n return $retStr;\n}", "function dump_array($the_array)\n{\n echo \"<ul>\";\n\n foreach ($the_array as $key1 => $value1) {\n echo \"<li><span class='key'>$key1</span>\";\n\n # If the value is itself an array, then print that as well.\n if (is_array($value1)) {\n echo \"<ul>\";\n foreach ($value1 as $key2 => $value2) {\n $pvalue = $value2;\n if (is_array($value2)) {\n $pvalue = \"&lt;an array&gt;\";\n }\n echo \"<li><span class='key'>$key2</span><span class='value'> $pvalue</span></li>\\n\";\n } # end inner foreach ($value1 as $key2 => $value2)\n echo \"</ul></li>\\n\";\n } else {\n echo \"<span class='value'> $value1</span></li>\\n\";\n }\n } # end outer foreach ($the_array as $key1 => $value1)\n echo \"</ul>\\n\";\n}", "function printTable($resultFromSQL, $namesOfColumnsArray)\n{\n echo \"<br>Here is the output, nicely formatted:<br>\";\n echo \"<table>\";\n echo \"<tr>\";\n // iterate through the array and print the string contents\n foreach ($namesOfColumnsArray as $name) {\n echo \"<th>$name</th>\";\n }\n echo \"</tr>\";\n\n while ($row = OCI_Fetch_Array($resultFromSQL, OCI_BOTH)) {\n echo \"<tr>\";\n $string = \"\";\n\n // iterates through the results returned from SQL query and\n // creates the contents of the table\n for ($i = 0; $i < sizeof($namesOfColumnsArray); $i++) {\n $string .= \"<td>\" . $row[\"$i\"] . \"</td>\";\n }\n echo $string;\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function print(): void\n {\n $values = $this->table->getValues();\n $size = $this->table->getSize();\n echo \"<table>\";\n foreach ($values as $index => $row) {\n if ($index === 1) {\n echo \"<tr><th>*</th>\";\n foreach ($row as $cell) {\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</th>\";\n }\n echo \"</tr>\";\n }\n echo \"<tr>\";\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>{$index}</th>\";\n foreach ($row as $cell) {\n echo \"<td style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function make_list(array $array)\n {\n echo \"<ul>\";\n \n foreach($array as $numb)\n {\n make_tag(\"li\", $numb);\n }\n\n echo \"</ul>\";\n }", "function printArray($array)\n\t{\n\t\tif (empty($array) and !is_array($array) ){\n\t\t\treturn FALSE;\n\t\t}else{\n\t\t\techo \"<pre>\";\n\t\t\tprint_r( $array );\n\t\t\techo \"</pre>\";\n\t\t}\n\t\t\n\t}", "public function array2table($array, $table = true) {\n $out = '';\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n\n /** if (!isset($tableHeader)) { \n $tableHeader =\n '<tr><th>' .\n implode('</th><th>', array_keys($value)) .\n '</th></tr>';\n } **/ \n array_keys($value);\n\n $out .= \"\\n<tr>\";\n $out .= $this->array2table($value, false);\n $out .= \"</tr>\\n\";\n } else {\n \n $out .= \"<td>$value</td>\";\n\n }\n }\n // build it up \n if ($table) { \n $sort_buttons = $this->BuildSortButtons(); \n \n return \"\\n<table>\\n\" . $sort_buttons . $out . \"\\n</table>\\n\";\n\n } else {\n \n return $out;\n } \n }", "function print_r_xml($arr,$wrapper = 'data',$cycle = 1)\n{\n\t//useful vars\n\t$new_line = \"\\n\";\n\n\t//start building content\n\tif($cycle == 1) { $output = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>'.$new_line; }\n\t$output.= tabify($cycle - 1).'<'.$wrapper.'>'.$new_line;\n\tforeach($arr as $key => $val)\n\t{\n\t\tif(!is_array($val))\n\t\t{\n\t\t\t$output.= tabify($cycle).'<'.htmlspecialchars($key).'>'.$val.'</'.htmlspecialchars($key).'>'.$new_line;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$output.= print_r_xml($val,$key,$cycle + 1).$new_line;\n\t\t}\n\t}\n\t$output.= tabify($cycle - 1).'</'.$wrapper.'>';\n\n\t//return the value\n\treturn $output;\n}", "function printTable ($rows, $cols) {\n echo \"<table border=1>\";\n\n for ($i=0; $i<$rows; $i++) {\n echo \"<tr>\";\n for ($j=0; $j<$cols; $j++) {\n echo \"<td> Content </td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "protected function renderArray() {}", "function dump($array) {\n\treturn \"<pre>\" . htmlentities(print_r($array, 1)) . \"</pre>\";\n}", "function titulopersonal(){\n print (\"\\n<tr>\");\n if($this->titulo !=\"\")\n foreach ($this->titulo as $titulo){\n print (\"\\n<th>$titulo</th>\");\n }\n print (\"\\n<tr>\"); \n }", "function toTable($data)\n{\n//print_r($data);\n\t$keys = $data[0];\n\t$keys = array_flip($keys);\n\t$result = \"<table>\\n\\t<tr>\";\n\tforeach($keys as $key)\n\t{\n\t\t$result .= '<th>' . $key . '</th>';\n\t}\n\t$result .= \"</tr>\\n\";\n\t$counter = 0;\n\tforeach($data as $item)\n\t{\n\t\t$counter++;\n\t\tif ($counter % 2 == 1)\n\t\t{\n\t\t\t$result .= \"\\t<tr>\";\n\t\t} else\n\t\t{\n\t\t\t$result .= \"\\t<tr class=\\\"odd\\\">\";\n\t\t}\n\t\tforeach($item as $value)\n\t\t{\n\t\t\t$result .= '<td>' . $value . '</td>';\n\t\t}\n\t\t$result .= \"</tr>\\n\";\n\t}\n\t$result .= \"</table>\\n\";\n\treturn $result;\n}", "function getTable($array, $firstLineHeader = true, $lastLineFooter = true, $withTableStructure = true)\n{\n\t$ret = '';\n\n\t$rows = count($array);\n\t$cols = isset($array[0]) ? count($array[0]) : 0;\n\t$i = 0;\n\n\tif($firstLineHeader)\n\t{\n\t\t$ret .= '<tr class=\"tableHeaderRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellR\">';\n\t\t\telse if($j == 0)\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellL\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableHeaderCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\n\t\t$i++;\n\t}\n\n\tfor(; $i < $rows; $i++)\n\t{\n\t\t$ret .= '<tr class=\"tableRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBR\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTR\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellR\">';\n\t\t\t}\n\t\t\telse if($j == 0)\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBL\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTL\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellL\">';\n\t\t\t}\n\t\t\telse if($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t$ret .= '<td class=\"tableCellB\">';\n\t\t\telse if($i == 0)\n\t\t\t\t$ret .= '<td class=\"tableCellT\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\t}\n\n\tif($withTableStructure)\n\t\t$ret = '<p/><table class=\"tableMain\">' . $ret . '</table>';\n\n\treturn $ret;\n}", "function draw_table($rows) {\n \n echo \"<table border=1 cellspacing=1>\"; //Set up border and spacing\n echo \"<tr>\"; //Begin the table row insertion for header row\n \n foreach($rows[0] as $key => $item) {\n \n echo \"<th>$key</th>\";\n \n }\n \n echo \"</tr>\";\n \n // Insert data into each row\n foreach ($rows as $row) {\n \n echo \"<tr>\";\n \n foreach ($row as $key => $item) {\n \n echo \"<td>$item</td>\"; //Table data\n \n }\n \n echo \"</tr>\";\n \n }\n \n echo \"</table>\";\n \n }", "private static function pretty_print($result, $n) {\n\t\tfor ($i = 0; $i < $n; $i++) {\n\t\t\t$m = $result[$i]->Count();\n\t\t\t$crawl = $result[$i]->Tail();\n\t\t\tfor ($j = 0; $j < $m; $j++) {\n\t\t\t\techo \"Line : \" . $i;\n\t\t\t\techo \"\\t\\t Value : \" . $crawl->Value();\n\t\t\t\techo \"\\t\\t Column: \" . $crawl->Column();\n\t\t\t\t$crawl = $crawl->Next();\n\t\t\t\techo \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "function alist ($array) { //This function prints a text array as an html list.\n $alist = \"<ul>\";\n for ($i = 0; $i < sizeof($array); $i++) {\n $alist .= \"<li>$array[$i]\";\n }\n $alist .= \"</ul>\";\n return $alist;\n}", "function printarr($a, $descr = '') \r\n{\r\n\tif (!is_array($a)) \r\n\t{\r\n\t\tob_start();\r\n\t\tif (!empty($descr))\r\n\t\t{\r\n\t\t\tprintbr('<b>' . $descr . '</b>');\r\n\t\t}\r\n\t\tvar_dump($a);\r\n\t\t$str = ob_get_clean();\r\n\t\tprintNicely($str);\r\n\t} else {\r\n\t\tob_start();\r\n\t\tprint '<pre>';\r\n\t\tif (!empty($descr))\r\n\t\t{\r\n\t\t\tprint('<b>' . $descr . '</b>' . \"\\n\");\r\n\t\t}\r\n\t\tprint_r($a);\r\n\t\tprint '</pre>';\r\n\t\t$str = ob_get_clean();\r\n\t\tprintNicely($str);\r\n\t}\r\n}", "public function renderItems()\n {\n $this->dataProvider->setPagination(false);\n\n $rows=[];\n $this->renderLevel($rows,0,0);\n\n return implode($this->separator, $rows);\n }", "function myShowArray($data)\n{\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "function dumpArray($elements) {\n $result = \"<ol>\\n\";\n foreach ($elements as $key => $value) {\n if (is_array($value)) {\n $result .= \"<li>Key <b>$key</b> is an array\n containing:\\n\" . dumpArray($value) . \"</li>\";\n } else {\n $value = nl2br(htmlspecialchars($value));\n $result .= \"<li>Key <b>$key</b> has value [<b>$value</b>]</li>\\n\";\n }\n }\n return $result . \"</ol>\\n\";\n}", "function preShow( $arr, $returnAsString=false ) {\n $ret = '<pre>' . print_r($arr, true) . '</pre>';\n if ($returnAsString)\n return $ret;\n else\n echo $ret;\n}", "function printArray($objArray) {\r\n\t\tglobal $global_config;\r\n\t\tif($global_config[\"debug_mode\"] == \"1\"){\r\n\t\t\tif(is_array($objArray)) {\r\n\t\t\t\tprint \"<PRE>\";\r\n\t\t\t\tprint_r($objArray);\r\n\t\t\t\tprint \"</PRE>\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tprint $objArray.\" <br> \";\r\n\t\t}\t\r\n\t}", "function diplayArray($array){\n echo '<pre>';\n var_dump($array);\n echo'</pre>';\n}", "function ImprimirCabeceraTabla($tabla){\n echo \"<table><tr>\";\n foreach ($tabla as $valor){\n\n echo \"<th>\".$valor.\"</th>\";\n \n }\n echo \"</tr>\";\n}", "public function printAll(){\n $temp = $this->head;\n while($temp != NULL){\n echo $temp->data . \" \";\n $temp = $temp->next;\n }\n }", "function tabla02($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table border=\\\"1\\\">\";\n\tforeach( $array01 as $key => $value){\n\t\tif ( $key == 'id' or $key == 'ID' or $key == 'Id'){\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td> - </td></tr>\\n\";\n\t\t} else{\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t\t}\n\t}\n\t$array02[$i++] = \"</table>\";\n\treturn $array02;\n}" ]
[ "0.7108732", "0.70985436", "0.7022756", "0.69265306", "0.683821", "0.68299365", "0.67564076", "0.6723232", "0.67154455", "0.6690552", "0.6672917", "0.6643778", "0.66384465", "0.6572679", "0.6572679", "0.65692836", "0.6523946", "0.6475298", "0.6471714", "0.64633816", "0.64633816", "0.64633816", "0.64579344", "0.64231145", "0.6413749", "0.63847286", "0.63841826", "0.636771", "0.6351803", "0.63513565", "0.63211673", "0.63201296", "0.6302826", "0.62746495", "0.627354", "0.6265517", "0.6254521", "0.6229622", "0.62273335", "0.6208846", "0.6191729", "0.6185881", "0.6185492", "0.61783355", "0.6162843", "0.61582464", "0.61221033", "0.6116689", "0.6101766", "0.60937065", "0.6092889", "0.60923386", "0.60841614", "0.60783464", "0.6074957", "0.60727143", "0.605462", "0.60381013", "0.60308737", "0.60300773", "0.6029998", "0.60215443", "0.6008544", "0.6002833", "0.5999173", "0.59736407", "0.59666985", "0.59657246", "0.5962814", "0.5961649", "0.5958333", "0.5952349", "0.59504044", "0.5948644", "0.5938122", "0.5933199", "0.59296685", "0.59158444", "0.59116954", "0.5907752", "0.590534", "0.5904022", "0.59033537", "0.58959997", "0.5887684", "0.5886022", "0.58836573", "0.5878322", "0.5865676", "0.5865643", "0.5847106", "0.5845957", "0.5830858", "0.5829946", "0.582159", "0.5812414", "0.5810012", "0.58069336", "0.5802877", "0.5802379" ]
0.60580677
56
Generating DebugTable (Simple HTML)
public function show() { if ($this->mode > 0) { $this->tracker("END DEBUG-CLASS"); $out .= "<div align=\"left\"><table width=\"100%\" border=\"0\" cols=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; /* $out .= debug::row_top("<a name=\"debug_top\"><b>Quicknavi</b></a>"); $out .= debug::row_single("<a href=\"#debugtracker\">Debugtracker</a>&nbsp;|&nbsp;" ."<a href=\"#debugvars\">User-Debugvars</a>&nbsp;|&nbsp;" ."<a href=\"#post\">\$_POST</a>&nbsp;|&nbsp;" ."<a href=\"#get\">\$_GET</a>&nbsp;|&nbsp;" ."<a href=\"#cookie\">\$_COOKIE</a>&nbsp;|&nbsp;" ."<a href=\"#session\">\$_SESSION</a>&nbsp;|&nbsp;" ."<a href=\"#server\">\$_SERVER</a>&nbsp;|&nbsp;" ."<a href=\"#files\">\$_FILES</a>&nbsp;|&nbsp;" ."<a href=\"#sql_querys\">SQL-Querys</a>");*/ $out .= debug::row_top("<a name=\"debugtracker\"><b>Debugtracker</b></a>"); $out .= debug::row_single($this->timer_show()); /* $out .= debug::row_top("<a name=\"debugvars\"><b>Userdefined Debugvars</b></a>"); $out .= debug::row_array($this->debugvars); $out .= debug::row_top("<a name=\"post\"><b>\$_POST-Data</b></a>"); $out .= debug::row_array($_POST); $out .= debug::row_top("<a name=\"get\"><b>\$_GET-Data</b></a>"); $out .= debug::row_array($_GET); $out .= debug::row_top("<a name=\"cookie\"><b>\$_COOKIE-Data</b></a>"); $out .= debug::row_array($_COOKIE); $out .= debug::row_top("<a name=\"session\"><b>\$_Session-Data</b></a>"); $out .= debug::row_array($_SESSION); $out .= debug::row_top("<a name=\"server\"><b>\$_SERVER-Data</b></a>"); $out .= debug::row_array($_SERVER); $out .= debug::row_top("<a name=\"files\"><b>\$_FILES-Data</b></a>"); $out .= debug::row_array($_FILES); */ $out .= debug::row_top("<a name=\"sql_querys\"><b>SQL-Querys (".count($this->sql_query_list).")</b></a>"); $out .= $this->query_fetchlist(); $out .= "</table></div>"; // Mode 2 write complete Debugvars to a file. The directory has to be protected. if ($this->mode == "2") { echo $this->mode; $file_handle = fopen($this->debug_path."debug_".time().".htm", "a"); fputs($file_handle, $out); fclose($file_handle); } return $out; } else { return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function printDebug() {\n foreach ($this->debug_results as $index => $oDebugInfo) {\n $str.= '<table style=\"padding:0;border:1px solid black; background:rgba(0,0,0,0.1); margin:5px;max-width:100%;\">';\n $str.= '<tbody style=\"padding:0;margin:0;\">';\n $str.= '<tr style=\"margin:0;padding:0\">';\n $str.= '<td colspan=2 style=\"vertical-align: top; min-width:150px;text-align:left;margin:0;padding:0;\"><div style=\"font-size:20px;background:rgba(0,0,0,0.5);color:white;padding:4px;width:fit-content;width:-moz-fit-content;width:-webkit-fit-content\">Petición #' . ($index + 1) . '</div></td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Funcion</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->function . '</td>';\n $str.= '</tr>';\n $str.= '<tr style=\"vertical-align: top; min-width:150px;text-align:left;\">';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Tipo de petición</th>';\n $str.= '<td>' . strtoupper($oDebugInfo->debug_request_type) . '</td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Tiempo de actualización:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->maxTimeElapsed . 's</td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Tiempo gastado:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->timeSpent . '</td>';\n $str.= '</tr>';\n if ($oDebugInfo->debug_request_type == DebugInfo::DEBUG_REQUEST_TYPE_URL) {\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Resource Url:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">[' . $oDebugInfo->url_request_type . '] ' . $oDebugInfo->resourceUrl . '</td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Url Params:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">';\n if (is_array($oDebugInfo->params)) {\n $str.= '<ul style=\"list-style:none;padding:0;\">';\n foreach ($oDebugInfo->params as $key => $value) {\n $str.= '<li>' . $key . ' = ' . $value . '</li>';\n }\n $str.= '</ul>';\n } else {\n $str.= $oDebugInfo->params;\n }\n $str.= '</td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Full url:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\"><a href=\"' . $oDebugInfo->fullUrl . '\" target=\"_blank\">' . $oDebugInfo->fullUrl . '</a></td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">HTTP CODE:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->last_http_code . '</td>';\n $str.= '</tr>';\n if ($oDebugInfo->last_http_code != 200 && $oDebugInfo->exception) {\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\"><font color=\"red\">Excepción:</font></th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\"><font color=\"red\">';\n $str.= '<strong>' . $oDebugInfo->exception->getCode() . ' - ' . $oDebugInfo->exception->getMessage() . '</strong>';\n $str.= '<ul style=\"padding-left:10px;margin:0;\">';\n foreach ($oDebugInfo->exception->getTrace() as $trace) {\n $str.= '<li>' . $trace['file'] . ' (' . $trace['line'] . ') - ' . $trace['class'] . '-><strong>' . $trace['function'] . '(' . implode(',', $trace['args']) . ')</strong></li>';\n }\n $str.= '</ul>';\n $str.= '</font></td>';\n $str.= '</tr>';\n }\n } elseif ($oDebugInfo->debug_request_type == DebugInfo::DEBUG_REQUEST_TYPE_CACHE) {\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Cache Index:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\"><a target=\"_blank\" href=\"' . str_replace('/', '\\\\', \\LolApi\\Cache\\CacheManager::$static_cache_folder) . $oDebugInfo->cacheIndex . '.json\">' . $oDebugInfo->cacheIndex . '</a></td>';\n $str.= '</tr>';\n }\n if ($oDebugInfo->last_http_code == 200) {\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Datos:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->data . '</td>';\n $str.= '</tr>';\n }\n $str.= '</tbody>';\n $str.= '</table>';\n }\n\n $str.= '<ul>';\n $str.= '<li>Tiempo total dedicado: ' . $this->debug_time_spent . '</li>';\n $str.= '<li>Peticiones de URL: ' . $this->debug_total_url_requests . '</li>';\n $str.= '<li>Peticiones de Caché: ' . $this->debug_total_cache_requests . '</li>';\n $str.= '<li>Número total de peticiones: ' . $this->getTotalRequests() . '</li>';\n $str.= '</ul>';\n $str.= '</div>';\n return $str;\n }", "public function getOutput() {\n $output = array();\n $output[] = '<style>.rb-debug td, .rb-debug th { border: 1px solid #aaa; padding: 3px;}.rb-debug td { text-align: left; }.rb-debug th { font-weight: bold; background-color: #eee; vertical-align: top; }.rb-debug { border: 1px solid #aaa; }</style>';\n $output[] = '<table class=\"rb-debug\" cellspacing=\"0\">';\n\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.header'));\n\n if (!empty($this->query)) {\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.table'),$this->query->getTable());\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.query'),nl2br($this->query->toSql()));\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.pdo_query'),nl2br($this->query->toSql(false)));\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.params'),'<pre>'.var_export($this->query->getParams(),true).'</pre>');\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.total'),$this->total);\n }\n\n if (!empty($this->messages)) {\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.messages'));\n foreach ($this->messages as $message) {\n $output[] = $this->renderRow('',$message);\n }\n }\n \n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.results'));\n\n $idx = 0;\n foreach ($this->results as $result) {\n $row = array();\n $row[] = '<table>';\n foreach ($result as $col => $val) {\n $row[] = $this->renderRow($col,$val == '' ? ' ' : $val);\n }\n $row[] = '</table>';\n $output[] = $this->renderRow('#'.$idx,implode(\"\\n\",$row));\n $idx++;\n }\n $output[] = '</table>';\n return implode(\"\\n\",$output);\n }", "public function print(): void\n {\n $values = $this->table->getValues();\n $size = $this->table->getSize();\n echo \"<table>\";\n foreach ($values as $index => $row) {\n if ($index === 1) {\n echo \"<tr><th>*</th>\";\n foreach ($row as $cell) {\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</th>\";\n }\n echo \"</tr>\";\n }\n echo \"<tr>\";\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>{$index}</th>\";\n foreach ($row as $cell) {\n echo \"<td style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function getHtml() {\r\n\t $html = \"\\n<!-- Begin myTable generated code -->\\n\";\r\n\t $html .= \"\\n<!-- myTable: HEADER -->\\n\";\r\n\t $html .= $this->_getHeaderHtml();\r\n\t $html .= \"\\n<!-- myTable: ROWS -->\\n\";\r\n\t\t$html .= $this->getRowHtml();\r\n\t $html .= \"\\n<!-- myTable: FOOTER -->\\n\";\r\n\t\t$html .= $this->_getFooterHtml();\r\n\t $html .= \"\\n<!-- myTable: SLIDER -->\\n\";\r\n\t\t//$html .= $this->_getSliderHtml();\r\n\t $html .= \"\\n<!-- myTable: SCRIPTS -->\\n\";\r\n\t\t$html .= $this->_getScripts();\r\n\t\t$html .= \"\\n<!-- End myTable generated code -->\\n\";\r\n\r\n\t\treturn $html;\r\n\t}", "public function display_table_contents() {\n\t\t// Display what is in the table.\n\t\tprintf(\n\t\t\t'<p>%s</p>',\n\t\t\tesc_html( __( 'Currently in the database:', 'autowpdb-example-plugin' ) )\n\t\t);\n\n\t\tif ( empty( $this->table_contents ) ) {\n\t\t\tesc_html_e( 'Nothing yet.', 'autowpdb-example-plugin' );\n\t\t\treturn;\n\t\t}\n\n\t\t$table_contents = $this->dump_data( $this->table_contents );\n\n\t\tif ( strpos( $table_contents, '<pre' ) !== 0 ) {\n\t\t\t// Classic output.\n\t\t\tprintf( '<pre>%s</pre>', esc_html( $table_contents ) );\n\t\t\treturn;\n\t\t}\n\n\t\t// Xdebug.\n\t\techo wp_kses(\n\t\t\t$table_contents,\n\t\t\t[\n\t\t\t\t'b' => [],\n\t\t\t\t'font' => [\n\t\t\t\t\t'color' => true,\n\t\t\t\t],\n\t\t\t\t'i' => [],\n\t\t\t\t'pre' => [\n\t\t\t\t\t'class' => true,\n\t\t\t\t\t'dir' => true,\n\t\t\t\t],\n\t\t\t\t'small' => [],\n\t\t\t]\n\t\t);\n\t}", "function writeAsHtmlTable() \r\n\t{\r\n\t\t\t// Import Package Utility\r\n\t\t\tinclude_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY); \t\t\t\r\n\t\tRDFUtil::writeHTMLTable($this->getMemModel());\r\n\t}", "function dumpTable($passedArray) {\n\t\n\techo '<br><table border=\"1\" cellpadding=\"3\" frame=\"border\" rules=\"all\">';\n\tforeach($passedArray as $row) {\n\t\techo '<tr><td>';\n\t\techo implode('</td><td>', $row);\n\t\techo '</td></tr>';\n\t}\n\techo '</table><br>';\n\t@ob_flush();\n\t@flush();\n\n\treturn;\n}", "public function getTable() {\n\t\tglobal $wpdb;\n\t\t$results = $wpdb->get_results( \"SELECT * FROM {$this->debug_table} ORDER BY `id` DESC\" );\n\t\tif ( empty( $results ) ) {\n\t\t\tprint '<p>' . __( 'Debugging table is currently empty.', 'post-expirator' ) . '</p>';\n\t\t\treturn;\n\t\t}\n\t\tprint '<table class=\"post-expirator-debug\">';\n\t\tprint '<tr><th class=\"post-expirator-timestamp\">' . __( 'Timestamp', 'post-expirator' ) . '</th>';\n\t\tprint '<th>' . __( 'Message', 'post-expirator' ) . '</th></tr>';\n\t\tforeach ( $results as $result ) {\n\t\t\tprint '<tr><td>' . $result->timestamp . '</td>';\n\t\t\tprint '<td>' . $result->message . '</td></tr>';\n\t\t}\n\t\tprint '</table>';\n\t}", "public function getHTML()\n {\n $rowIDs = $this->rowID;\n $numberOfColumns = $this->tableColumns;\n $html = \"\";\n $rowCounter = 0;\n\n $html .= \"<table class='table'>\";\n\n if ($this->tableHead != null) {\n $html .= \"<tr>\";\n\n foreach ($this->tableHead as $head) {\n $html .= \"<th>$head</th>\";\n }\n $html .= \"</tr>\";\n }\n $html .= \"<tr>\";\n\n $i = 0;\n foreach ($this->tableData as $data) {\n if (($i) % $numberOfColumns == 0) {\n $html .= \"</tr><tr id='$rowIDs[$rowCounter]'>\";\n $rowCounter++;\n }\n//\n $html .= \"<td>$data</td>\";\n $i++;\n\n }\n $html .= \"</tr>\";\n\n $html .= \"</table>\";\n\n return $html;\n\n }", "function dumpTable($passedArray) {\n\techo '<br><table border=\"1\" cellpadding=\"3\" frame=\"border\" rules=\"all\">';\n\tforeach($passedArray as $row) {\n\t\techo '<tr><td>';\n\t\techo implode('</td><td>', $row);\n\t\techo '</td></tr>';\n\t}\n\techo '</table><br>';\n\t@ob_flush();\n\t@flush();\t\n\treturn;\n}", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<p class=left>Description:</p>\\n\";\n\t}", "public function print_table_description()\n {\n }", "public function write() {\n\t\t$table = '<table '.$this->addHTML.'>';\n\t\tif(!is_null($this->tableInfo['head'])) {\n\t\t\t$table .= '<thead><tr>';\n\t\t\tforeach($this->tableInfo['head'] as $value) {\n\t\t\t\t$table .= '<th>'.$value.'</th>';\n\t\t\t}\n\t\t\tif($this->crud) {\n\t\t\t\t\t$table .= '<th>Options</th>';\t\n\t\t\t}\n\t\t\t$table .= '</tr></thead>';\n\t\t}\n\t\t$table .= '<tbody>';\n\t\tif(isset($this->tableInfo['rows'])) {\n\t\t\tforeach($this->tableInfo['rows'] as $row) {\n\t\t\t\t$table .= '<tr>';\n\t\t\t\tforeach($row as $key => $column) {\n\t\t\t\t\tif(($key != $this->crud_id) OR $this->show_crud_id) {\n\t\t\t\t\t\t$table .= '<td>'.$column.'</td>';\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($this->crud && isset($row[$this->crud_id])) {\n\t\t\t\t\t$table .= '<td>';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Details/'.$row[$this->crud_id].'\" title=\"Details\"><i class=\"fa fa-search\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Edit/'.$row[$this->crud_id].'\" title=\"Edit\"><i class=\"fa fa-wrench\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Delete/'.$row[$this->crud_id].'\" title=\"Delete\"><i class=\"fa fa-trash\"></i></a>';\n\t\t\t\t\t$table .= '</td>';\n\t\t\t\t}\n\t\t\t\t$table .= '</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$table .= '<tr>';\n\t\t\t$table .= '<td>';\n\t\t\t$table .= 'No Data to show here.';\n\t\t\t$table .= '</td>';\n\t\t\t$table .= '</tr>';\t\n\t\t}\n\t\t\n\t\t$table .= '</tbody></table>';\n\t\treturn $table;\n\t}", "function showDataTable(){\n\t\t$output = \"\";\n\t\t// print the table\n\t\t$output .= \"<table summary=\\\"\".$this->summary.\"\\\">\\n\";\n\t\t// print the caption\n\t\t$output .= \"<caption>\".$this->caption.\"</caption>\\n\";\n\t\t$output .= $this->showHeader();\n\t\t// initialise variables\n\t\t$altCounter = 0;\n\t\t$altClass = \"\";\n\t\t$h = 1;\n\t\t// loop each row\n\t\tfor ($x=0; $x<count($this->rows); $x++) {\n\t\t\t// if it is time to show the header\n\t\t\tif ($h==$this->headerRepeat){\n\t\t\t\t// show the header\n\t\t\t\t$output .= $this->showHeader();\n\t\t\t\t$h = 1;\n\t\t\t}\n\t\t\t$row = $this->rows[$x];\n\t\t\t// alternate the row classes\n\t\t\tif ($this->altClasses){\n\t\t\t\tif ($this->altClasses[$altCounter]!=\"\"){ $altClass = \" class=\\\"\".$this->altClasses[$altCounter].\"\\\"\"; } else { $altClass=\"\"; }\n\t\t\t\tif ($altCounter==count($this->altClasses)-1){ $altCounter=0; } else { $altCounter++; }\n\t\t\t}\n\t\t\t// set the parameters to nothing\n\t\t\t$params = \"\";\n\t\t\t// if there are parameters for this row set\n\t\t\tif (count($this->rowParams[$x])>0){\n\t\t\t\t// loop the parameters\n\t\t\t\twhile (list($attribute, $parameter) = each($this->rowParams[$x])) {\n\t\t\t\t\t// if the parameter is 'class'\n\t\t\t\t\tif (strtolower($attribute)==\"class\"){\n\t\t\t\t\t\t// replace the altClass variable\n\t\t\t\t\t\t$altClass = \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t// otherwise build the parameters\n\t\t\t\t\t\t$params .= \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// print the row\n\t\t\t$output .= \"\t<tr$altClass$params>\\n\";\n\t\t\t\t// set the colSpan to 0\n\t\t\t\t$colSpan = 0;\n\t\t\t\t$colSpanAttribute = \"\";\n\t\t\t\t// if this row has less columns than the number of fields\n\t\t\t\tif (count($row)<count($this->fields)){\n\t\t\t\t\t$colSpan = (count($this->fields)-count($row))+1;\n\t\t\t\t}\n\t\t\t\t// loop each cell\n\t\t\t\tfor ($i=0; $i<count($row); $i++) {\n\t\t\t\t\t$value = $row[$i];\n\t\t\t\t\t$value = $this->formatField($i, $x);\n\t\t\t\t\t// make the colspan attribute\n\t\t\t\t\tif ($colSpan>0 && $i==(count($row)-1)){ $colSpanAttribute = \" colspan=\\\"$colSpan\\\"\"; }\n\t\t\t\t\t// print the cell\n\t\t\t\t\t$output .= \"\t\t<td$colSpanAttribute>\".$value.\"</td>\\n\";\n\t\t\t\t}\n\t\t\t// end the row\n\t\t\t$output .= \"\t</tr>\\n\";\n\t\t\t// increment the header repeat variable\n\t\t\t$h++;\n\t\t}\n\t\t// end the table\n\t\t$output .= \"</table>\\n\\n\";\n\t\tprint $output;\n\t}", "function drawTable($dataArray)\n{\n $dom = new DOMDocument();\n $table = $dom->createElement('table');\n $table->setAttribute('class', 'log-table');\n\n foreach ($dataArray as $row)\n {\n $tr = $dom->createElement('tr');\n $table->appendChild($tr);\n\n $td = $dom->createElement('td', $row);\n $tr->appendChild($td);\n\n $table->appendChild($tr);\n }\n\n $dom->appendChild($table);\n echo $dom->saveHTML();\n}", "public function html()\n {\n return $this->builder()\n ->setTableId('visit-table')\n ->minifiedAjax()\n ->parameters([\n 'stateSave' => true,\n 'dom' => \"B<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>>rtip\",\n 'buttons' => ['reload', 'reset'],\n 'order' => [0, 'desc'],\n 'lengthMenu' => [\n [10, 25, 50, 100],\n ['10', '25', '50', '100']\n ],\n 'processing' => false,\n ])\n ->columns($this->getColumns());\n }", "public function visualizzazione(){\n $nameColumn = $this->getColumnName();\n $tuple = $this->read();\n foreach($nameColumn as $nome){\n $x = ' <td> '. $nome . ' </td> ';\n echo $x;\n }\n \n foreach($tuple as $ris){\n $str ='<tr> <td> '.$ris->getId(). ' </td> '.\n '<td> '.$ris->getNome(). '</td>'.\n '<td> '.$ris->getUsername(). '</td>'.\n '<td> '.$ris->getPassword(). '</td>'.\n '<td> '.$ris->getEmail(). '</td>'.\n '<td> '.$ris->getMuseo(). '</td>'.\n '</tr>';\n echo $str;\n };\n }", "function dumpLayoutContents()\r\n {\r\n if($this->usetables)\r\n {\r\n $class=\"\";\r\n echo \"<table id=\\\"{$this->_name}_table\\\">\\n\";\r\n echo \" <tr>\\n\";\r\n\r\n if((($this->ControlState & csDesigning) == csDesigning) || ($this->controls->count() == 0))\r\n {\r\n echo \"<td $class><span $class>$this->Caption</span>\\n\";\r\n }\r\n else\r\n {\r\n echo \"<td>\\n\";\r\n }\r\n }\r\n\r\n if(($this->ControlState & csDesigning) != csDesigning)\r\n {\r\n $this->callEvent('onshow', array());\r\n $this->Layout->dumpLayoutContents();\r\n }\r\n\r\n if($this->usetables)\r\n {\r\n echo \" </td>\\n\";\r\n echo \" </tr>\\n\";\r\n echo \" </table>\\n\";\r\n }\r\n\r\n }", "public function getTableContent() {\n\t\treturn \"<tr data-key='\" . $this -> getKey() . \"'><td>\" . $this -> key . \"</td><td contenteditable='true'>\" . $this -> value . \"</td><td>\" . $this -> dataType . \"</td></tr>\";\n\t}", "private function prepare_table()\n {\n global $g_dirs;\n\n $l_dao = new isys_cmdb_dao($this->database);\n $l_quicky = new isys_ajax_handler_quick_info();\n\n $l_table = \"<table width=\\\"100%\\\" class=\\\"report_listing\\\">\";\n\n foreach ($this->m_its_arr as $l_obj_id => $l_title) {\n unset($this->m_obj_arr);\n $l_table .= \"<tr style=\\\"\\\"><td onclick=\\\"collapse_it_service('\" . $l_obj_id . \"')\\\" id=\\\"\" . $l_obj_id . \"\\\" class=\\\"report_listing\\\"><img id=\\\"\" . $l_obj_id .\n \"_plusminus\\\" src=\\\"\" . $g_dirs[\"images\"] . \"dtree/nolines_plus.gif\\\" class=\\\"vam\\\">\";\n\n $l_table .= $l_quicky->get_quick_info($l_obj_id, $l_dao->get_obj_name_by_id_as_string($l_obj_id), C__LINK__OBJECT);\n\n $l_table .= \"<img src=\\\"\" . $g_dirs[\"images\"] . \"ajax-loading.gif\\\" id=\\\"ajax_loading_view_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\" class=\\\"vam\\\" /></td></tr>\";\n\n $l_table .= \"<tr id=\\\"childs_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\"><td><div id=\\\"childs_content_\" . $l_obj_id . \"\\\"></div>\";\n $l_table .= \"</td></tr>\";\n }\n\n $l_table .= \"</table>\";\n\n return $l_table;\n }", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = '';\n\t\t\t$columns = array_keys($this->json['columns']);\n\t\t\t$count = 0; \n\t\t\t$array = array(); \n\t\t\tforeach ($this->json['columns'] as $column) {\n\t\t\t\tif ($column['sortavailable'] == 'n') { $array[] = $count; }\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t\n\t\t\t$tb = new Table(\"class=table table-striped table-bordered table-condensed table-excel|id=table\");\n\t\t\t$tb->tablesection('thead');\n\t\t\t\t$tb->tr();\n\t\t\t\tforeach($this->json['columns'] as $column) {\n\t\t\t\t\t$class = DplusWire::wire('config')->textjustify[$column['headingjustify']];\n\t\t\t\t\t$tb->th(\"class=$class\", $column['heading']);\n\t\t\t\t}\n\t\t\t$tb->closetablesection('thead');\n\t\t\t$tb->tablesection('tbody');\n\t\t\t\tforeach ($this->json['data']['lots'] as $lot) {\n\t\t\t\t\t$tb->tr();\n\t\t\t\t\tforeach($columns as $column) {\n\t\t\t\t\t\t$class = DplusWire::wire('config')->textjustify[$this->json['columns'][$column]['datajustify']];\n\t\t\t\t\t\t$tb->td(\"class=$class\", $lot[$column]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t$tb->closetablesection('tbody');\n\t\t\t$content = $tb->close();\n\t\t\treturn $content;\n\t\t}", "function Render()\n\t{\n\t\t$strTableName = $this->_strName;\n\t\t$strVixenTable = \"Vixen.table.{$strTableName}\";\n\n\t\techo \"\n<script type='text/javascript'>\n\t{$strVixenTable} = Object();\n\t{$strVixenTable}.collapseAll = TRUE;\n\t{$strVixenTable}.linked = TRUE;\n\t{$strVixenTable}.totalRows = 0;\n\t{$strVixenTable}.row = Array();\n</script>\";\n\t\t\t\n\t\t\n\t\t$strPageSize = $this->_intPageSize > 0 ? \" page_size='{$this->_intPageSize}' \" : \"\";\n\n\t\techo \"<table border='0' cellpadding='3' cellspacing='0' class='Listing' width='100%' id='$strTableName'$strPageSize>\\n\";\n\t\t\n\t\t// Build headers\n\t\techo \"<tr class='First'>\\n\";\n\t\t$intHeaderCount = 0;\n\t\t$intSortLimit = ($this->_bolSortable && is_array($this->_arrSortFields)) ? count ($this->_arrSortFields) : -1;\n\t\tforeach ($this->_arrHeader AS $objField)\n\t\t{\n\t\t\t$strAlign = $this->_arrAlignments[$intHeaderCount];\n\t\t\t$strSortLabel = \"\";\n\t\t\tif ($intHeaderCount <= $intSortLimit)\n\t\t\t{\n\t\t\t\tif ($this->_arrSortFields[$intHeaderCount] !== NULL)\n\t\t\t\t{\n\t\t\t\t\t$strSortLabel = \" TABLE_SORT='\" . $this->_arrSortFields[$intHeaderCount] . \"' \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$strSortLabel = \" NO_TABLE_SORT='1' \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \" <th width='{$this->_arrWidths[$intHeaderCount]}' align='$strAlign'$strSortLabel>\". $objField .\"</th>\\n\";\n\t\t\t$intHeaderCount++;\n\t\t}\n\t\techo \"</tr>\\n\";\n\t\t\n\t\t// Build rows\n\t\t$intRow = -1;\n\t\tforeach ($this->_arrRows AS $objRow)\n\t\t{\n\t\t\t$intRow++;\n\t\t\t$strClass = ($intRow % 2) ? 'Odd' : 'Even';\n\t\t\t$strStyle = \"\";\n\t\t\t\n\t\t\tif (isset($objRow['OnClick']))\n\t\t\t{\n\t\t\t\t// Escape special chars\n\t\t\t\t$strOnClick = \"onclick='\". htmlspecialchars($objRow['OnClick'], ENT_QUOTES) .\"'\";\n\t\t\t\t$strStyle .= \"cursor:pointer;\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strOnClick = \"\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"<tr id='\" . $strTableName . \"_\" . $intRow . \"' class='$strClass' $strOnClick style='$strStyle'>\\n\";\n\t\t\t\n\t\t\t$intColCount = 0;\n\t\t\t// Build fields\n\t\t\tforeach ($objRow['Columns'] as $objField)\n\t\t\t{\n\t\t\t\t$strWidth = '';\n\t\t\t\t// Work out which width to use\n\t\t\t\t//TODO! After setting the widths once in the header, you shouldn't have to set them again, but we are anyway.\n\t\t\t\t//This could cut down the size of the html file generated\n\t\t\t\t/*if (isset($objRow['Widths']))\n\t\t\t\t{\n\t\t\t\t\t// Use the width specific to this row and column\n\t\t\t\t\t$strWidth = \"width='\". $objRow['Widths'][$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Use the general width of this column\n\t\t\t\t\t$strWidth = \"width='\". $this->_arrWidths[$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t// Work out which alignment to use\n\t\t\t\tif (isset($objRow['Alignments']))\n\t\t\t\t{\n\t\t\t\t\t// Use the alignment specific to this row and column\n\t\t\t\t\t$strAlignment = \"align='\". $objRow['Alignments'][$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Use the general alignment of this column\n\t\t\t\t\t$strAlignment = \"align='\". $this->_arrAlignments[$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Work out how many columns, this column spans\n\t\t\t\t$strColSpan = \"\";\n\t\t\t\tif (isset($objRow['ColSpans']))\n\t\t\t\t{\n\t\t\t\t\t// colspan values have been declared for this row\n\t\t\t\t\t$strColSpan = \"colspan='\". $objRow['ColSpans'][$intColCount] .\"'\";\n\t\t\t\t\t\n\t\t\t\t\t// If using ColSpans do not use row widths\n\t\t\t\t\t$strWidth = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"<td $strWidth $strAlignment $strColSpan>\";\n\t\t\t\techo \"$objField\";\n\t\t\t\techo \"</td>\\n\";\n\t\t\t\t$intColCount++;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Build detail\n\t\t\tif ($this->_bolDetails)\n\t\t\t{\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td colspan=\". count($this->_arrHeader) .\" style='padding: 0px 1px 1px 1px;'>\";\n\t\t\t\techo \"<div id='\" . $strTableName . \"_\" . $intRow . \"DIV-DETAIL' style='display: block; overflow:hidden;'>\";\n\t\t\t\techo $objRow['Detail'];\n\t\t\t\techo \"</div>\";\n\t\t\t\techo \"</td>\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t// Build tooltip\n\t\t\tif ($this->_bolToolTips)\n\t\t\t{\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td colspan=4 style='padding-top: 0px; padding-bottom: 0px'>\";\n\t\t\t\techo \"<div id='\" . $strTableName . \"_\" . $intRow . \"DIV-TOOLTIP' style='display: none;'>\";\n\t\t\t\techo $objRow['ToolTip'];\n\t\t\t\techo \"</div>\\n\";\n\t\t\t\techo \"</td>\";\n\t\t\t}\n\t\t\n\t\t\techo \"\\n<script type='text/javascript'>\";\n\t\t\techo \"objRow = Object();\\n\";\n\t\t\t\n\t\t\techo \"objRow.selected = false;\\n\";\n\t\t\techo \"objRow.up = true;\\n\";\n\n\t\t\tif ($this->_bolLinked)\n\t\t\t{\n\t\t\t\tif (is_array($objRow['Index']))\n\t\t\t\t{\n\t\t\t\t\t// add Indexes to objRow\n\t\t\t\t\techo \"objIndex = Object();\";\n\t\t\t\t\t\n\t\t\t\t\tforeach ($objRow['Index'] as $strIndexName=>$arrValues)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"objIndex.{$strIndexName} = Array();\";\n\t\t\t\t\t\tforeach ($arrValues as $strValue)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"objIndex.{$strIndexName}.push('$strValue');\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo \"objRow.index = objIndex;\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\techo \"{$strVixenTable}.row.push(objRow);\\n\";\n\t\t\techo \"</script>\\n\";\n\t\t\techo \"</tr>\\n\";\n\t\t}\n\t\t$intRowCount = $intRow + 1;\n\t\techo \"</table>\\n\";\n\t\t\n\t\techo \"<script type='text/javascript'>{$strVixenTable}.totalRows = $intRowCount;</script>\\n\";\t\n\t\t\n\t\tif ($this->_bolRowHighlighting)\n\t\t{\n\t\t\t// The following \"Vixen.AddCommand\" method breaks down when you try dynamicly inserting a VixenTable into\n\t\t\t// the DOM, because AddCommand only triggers the command when the body.onload event is triggered\n\t\t\t//echo \"<script type='text/javascript'>Vixen.AddCommand('Vixen.Highlight.Attach','\\'$strTableName\\'', $intRowCount);</script>\";\n\t\t\techo \"<script type='text/javascript'>Vixen.Highlight.Attach('$strTableName');</script>\";\n\t\t}\n\t\t\n\t\tif ($this->_bolToolTips)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.Tooltip.Attach('$strTableName');</script>\";\n\t\t}\n\t\t\n\t\tif ($this->_bolDetails)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.Slide.Attach('$strTableName', TRUE);</script>\\n\";\n\t\t}\n\t\t\n\t\tif ($this->_bolLinked)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"{$strVixenTable}.linked = TRUE;\";\n\t\t\t\n\t\t\techo \"objLink = Object();\\n\";\n\t\t\t\n\t\t\tforeach ($this->_arrLinkedTables AS $strTableName=>$arrIndexes)\n\t\t\t{\n\t\t\t\techo \"objLink.{$strTableName} = Array();\\n\";\n\t\t\t\tforeach ($arrIndexes AS $strIndex)\n\t\t\t\t{\n\t\t\t\t\techo \"objLink.{$strTableName}.push('$strIndex');\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"{$strVixenTable}.link = objLink;\\n\";\n\t\t\t\n\t\t\techo \"</script>\\n\";\n\t\t\t\t/*'link':\n\t\t\t{\n\t\t\t\t'AccountInvoices' :\n\t\t\t\t[\n\t\t\t\t\t'Invoice'\n\t\t\t\t]\n\t\t\t},*/\n\t\t}\n\t\t\n\t\tif ($this->_bolSortable)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.TableSort.prepare('$strTableName');</script>\\n\";\n\t\t}\n\t}", "function table($level){\n\t\treturn \"<div class=\\\"word quoted final\\\"><span>\".htmlspecialchars($this->id).\"</span></div>\";\t\n\t}", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "function tabelKoppenVeilingen(){\n\tprint(\"<table class='ui celled fixed basic table' border='1px'> \n\t <tr>\n\t\t <td>Object Nr</td> \n\t\t <td>Titel</td>\n\t\t <td>Verkoper</td>\n\t\t <td>Koper</td>\n\t\t <td></td>\n\t\t <td></td>\n\t </tr>\"); \n}", "public function drawTable()\n {\n echo \"<table border='1'>\";\n for ($i = 0; $i < $this->m; $i++) {\n echo \"<tr>\";\n for ($j = 0; $j < $this->n; $j++) {\n if ($this->isInSolution($i, $j, $this->matrix)) {\n echo \"<td bgcolor='#9acd32'>\";\n } else {\n echo \"<td>\";\n }\n echo $this->matrix[$i][$j];\n echo \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "public function displayInfoTable() {\n $html = \"\n <tr>\n <td>$this->id</td>\n <td>$this->email</td>\n <td>$this->firstName</td>\n <td>$this->lastName</td>\n <td>$this->phone</td>\n <td>$this->birthday</td>\n <td>$this->gender</td>\n <td>$this->password</td>\n </tr>\";\n return $html;\n }", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "function write_table_head()//scrie capul de tabel pentru perioadele de vacanta\r\n{\r\n\t$output = \"\";\r\n\tadd($output,'<table width=\"500px\" cellpadding=\"1\" cellspacing=\"1\" class=\"special\">');\r\n\tadd($output,'<tr class=\"tr_head\"><td>Nr</td><td>Data inceput</td><td>Data sfarsit</td></tr>');\r\n\t\r\n\treturn $output;\r\n}", "function print_pure_table($query_result, $headers) {\n echo \"<table class=\\\"pure-table pure-table-bordered\\\">\";\n if ($headers) {\n echo $headers;\n } else {\n echo \"<thead><tr>\";\n for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n $fieldname = pg_field_name($query_result, $i);\n echo \"<th>$fieldname</th>\";\n }\n echo \"</tr></thead>\";\n }\n \n echo \"<tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</tbody>\";\n echo \"</table>\";\n }", "function getTableHtml(){\n\t\treturn $this->translator->basicTable($this->table, 'test');\n\t}", "public function html()\n {\n return $this->builder()\n ->setTableId('automobile-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom('frtip')\n ->orderBy(1);\n }", "function display() {\r\n echo '<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\r\n echo '<tr>'; \r\n for ($pos = 0; $pos < 9; $pos++) { \r\n echo $this->show_cell($pos); \r\n if ($pos % 3 == 2) {\r\n echo '</tr><tr>';\r\n } \r\n }\r\n echo '</tr>';\r\n echo '</table>';\r\n }", "function printHTML()\n {\n\n $keys = array_keys($this->fields);\n\n $this->openBlockHeader(\"CASPSR Admin\");\n?>\n\n <table width=\"100%\">\n<?\n \n echo \" <tr>\\n\";\n echo \" <th>Host</th>\\n\";\n echo \" <th>RAC</th>\\n\";\n echo \" <th>OMSA</th>\\n\";\n for ($i=0; $i<count($keys); $i++) \n {\n $k = $keys[$i];\n echo \" <th>\".$this->fields[$k].\"</th>\\n\";\n }\n echo \" </tr>\\n\";\n\n for ($i=0; $i<count($this->dells); $i++) \n {\n echo \" <tr>\\n\";\n echo \" <td>\".$this->dells[$i].\"</td>\\n\";\n if ($this->rac_links[$this->dells[$i]] != \"\")\n echo \" <td><a href='\".$this->rac_links[$this->dells[$i]].\"'>link</a></td>\\n\";\n else\n echo \" <td></td>\\n\";\n if ($this->omsa_links[$this->dells[$i]] != \"\")\n echo \" <td><a href='\".$this->omsa_links[$this->dells[$i]].\"'>link</a></td>\\n\";\n else\n echo \" <td></td>\\n\";\n\n for ($j=0; $j<count($keys); $j++) \n {\n echo \" <td id='\".$this->dells[$i].\"_\".$keys[$j].\"'></td>\\n\";\n }\n echo\" </tr>\\n\";\n }\n\n for ($i=0; $i<count($this->gpus); $i++) \n {\n echo \" <tr>\\n\";\n echo \" <td>\".$this->gpus[$i].\"</td>\\n\";\n if ($this->rac_links[$this->gpus[$i]] != \"\")\n echo \" <td><a href='\".$this->rac_links[$this->gpus[$i]].\"'>link</a></td>\\n\";\n else\n echo \" <td></td>\\n\";\n if ($this->omsa_links[$this->gpus[$i]] != \"\")\n echo \" <td><a href='\".$this->omsa_links[$this->gpus[$i]].\"'>link</a></td>\\n\";\n else\n echo \" <td></td>\\n\";\n\n for ($j=0; $j<count($keys); $j++) \n {\n echo \" <td id='\".$this->gpus[$i].\"_\".$keys[$j].\"'></td>\\n\";\n }\n echo\" </tr>\\n\";\n }\n?>\n </table>\n <script type='text/javascript'>\n get_rac_info();\n </script>\n<?\n $this->closeBlockHeader();\n \n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom('lBfr<\"table-responsive\"t>ip')\n ->orderBy(0,'DESC')\n ->buttons(\n ['csv', 'excel', 'print', 'reset']\n );\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction()\n ->dom('lBfr<\"table-responsive\"t>ip')\n ->orderBy(0,'DESC')\n ->buttons(\n ['csv', 'excel', 'print', 'reset']\n );\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->addAction()\n ->minifiedAjax()\n ->dom('lBfr<\"table-responsive\"t>ip')\n ->orderBy(0)\n ->buttons(\n ['csv','excel', 'print', 'reset']\n );\n }", "function print_table($database_connection, $table_name) {\r\n\r\n $attributes = get_attributes($database_connection, $table_name);\r\n $tuples = get_rows($database_connection, $table_name);\r\n\r\n print(\"<table>\\n\");\r\n print(\"<tr>\\n\");\r\n for($i = 0; $i < count($attributes); $i++) {\r\n print(\"<th>{$attributes[$i]}</th>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n for($j = 0; $j < count($tuples); $j++) {\r\n print(\"<tr>\\n\");\r\n foreach($attributes as $attribute) {\r\n print(\"<td>{$tuples[$j][$attribute]}</td>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n }\r\n\r\n print(\"</table>\\n\");\r\n }", "public function getTableContent() {\n\t\treturn \"<tr><td>\" . $this -> getWorldId() . \"</td><td>\" . $this -> getPlayers() . \"</td><td>\" . $this -> getIp() .\"</td><td>\" . Utils::time_elapsed_string(strtotime($this -> getLastResponse())) . \" ago</tr>\";\t\n\t}", "public function to_html_raw()\n {\n $html = \"\";\n if(count($this->data))\n {\n $html = \"<tr>\";\n foreach($this->data as $key => $val)\n {\n $html .= \"<td>\".$val.\"</td>\"; \n } \n $html .= \"</tr>\";\n }\n return $html; \n }", "public function show_table_sturcture()\n\t{\n\t\t$str_input_html = \"\";\n\t\t$table = \"default_module_test\";\n\t\t$table = $this->db->escape_str($table);\n\t\t//$sql = \"DESCRIBE `$table`\";\n\t\t//$desc = $this->db->where('Field','sorts')->query($sql)->row();\n\t\t$desc = Easy_Database_Manage::get_table_desc($table);\n\t\techo \"<pre>\";\n\t\techo print_r($desc);\n\t\techo \"</pre>\";\n\t\n\t}", "protected function renderTableSeparateBlock(): string\n {\n return\n '<tbody class=\"skipped\">' .\n '<tr>' .\n '<td></td>' .\n '</tr>' .\n '</tbody>';\n }", "public function print_html()\n\t{\n\t\t$ausgabe=\"<tr> <td>$this->vorname</td> <td>$this->name</td> <td>$this->strasse</td> <td>$this->wohnort</td> <td>$this->nummer</td></tr>\";\n\t\treturn $ausgabe;\n\t}", "protected function generateHtml() : string\n {\n $output = '<html><head><script src=\"sorttable.js\" type=\"text/javascript\"></script></head><body>';\n\n $output .= $this->generateReportFrontPage();\n\n $output .= $this->generateHtmlBody();\n\n $output .= $this->generateHtmlFooter();\n\n $output .= '</body></html>';\n\n return $output;\n }", "public function table()\n\t{\n\t\t$this->datatables->select('experiment_id, user_id_caller, id');\n\t\t$this->datatables->from('caller');\n\n\t\t$this->datatables->edit_column('experiment_id', '$1', 'experiment_get_link_by_id(experiment_id)');\n\t\t$this->datatables->edit_column('user_id_caller', '$1', 'user_get_link_by_id(user_id_caller)');\n\t\t$this->datatables->edit_column('id', '$1', 'caller_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }", "function print_table($query_result) {\n echo \"<table>\";\n echo \"<tr>\";\n for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n $fieldname = pg_field_name($query_result, $i);\n echo \"<th>$fieldname</th>\";\n }\n echo \"</tr>\";\n\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "public function build_unit_details_table()\n\t{\n global $CFG;\n\t\t$retval = \"<div id='unitName$this->id' class='tooltipContentT'>\".\n \"<div><h3>$this->name</h3>\";\n \n if ($this->comments != ''){\n $retval .= \"<br><div style='background-color:#FF9;'>\".bcgt_html($this->comments, true).\"</div><br>\";\n }\n \n $retval .= \"<table><tr><th>\".get_string('criteriaName','block_bcgt').\"</th>\".\n \"<th>\".get_string('criteriaDetails','block_bcgt').\"</th></tr>\";\n\t\tif($criteriaList = $this->criterias)\n\t\t{\n require_once($CFG->dirroot.'/blocks/bcgt/plugins/bcgtbtec/classes/sorters/BTECCriteriaSorter.class.php');\n $criteriaSorter = new BTECCriteriaSorter();\n usort($criteriaList, array($criteriaSorter, \"ComparisonDelegateByNameObject\"));\n\t\t\t//Sort the criteria on P, M and then D\n\t\t\tforeach($criteriaList AS $criteria)\n\t\t\t{\n\t\t\t\t$retval .= \"<tr><td>\".$criteria->get_name().\"</td><td>\".$criteria->get_details().\"</td></tr>\";\n\t\t\t}\n\t\t}\n\t\t$retval .= \"</table></div></div>\";\n\t\treturn $retval;\n\t}", "public function displayBuildingTable()\n {\n echo \"\n <tr>\n <td>\" . getBuildingRoomCount( $this->id ) . \"</td>\n <td>\n <a href='helper/buildVncFile.php?buildingId=\" . $this->id . \"' class='btn medium bg-blue-alt tooltip-button' data-placement='top' title='Building Info'>\n <i class='glyph-icon icon-info'></i>\n </a>\n <a href='buildingRooms.php?buildingId=\" . $this->id . \"' class='btn medium bg-black font-white tooltip-button' data-placement='top' title='Rooms in Building'>\n <i class='glyph-icon icon-building-o'></i>\n </a>\n </td>\n <td class='font-bold text-left'>\" . $this->name . \"</td>\n <td class='font-bold text-left'>\" . $this->description . \"</td>\n </tr>\n \";\n }", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$_activeTree= $this;\n\t\t\n\t\t$this->writeScript();\n\t\t$width = is_numeric($this->width) ? \"{$this->width}px\" : $this->width;\n\t\t$height = is_numeric($this->height) ? \"{$this->height}px\" : $this->height;\n\t\t\n\t\tif ($this->selectMode == \"single\")\n\t\t{\n?>\n<input type='hidden' name='<?echo $this->id ?>' id='<?echo $this->id?>' value='<?echo $this->value ?>'/>\n<? \n\t\t}\n?><table id=\"<?echo $this->id?>_table\" class=\"<? echo $this->style?>\" cellpadding=\"0\" cellspacing=\"0\" <? if ($this->width) echo \"style='width:{$width}'\"; ?>>\n\t\t <? \n\t\t if ($this->title)\n\t\t {\n\t\t ?>\t\t \n\t\t <tr>\n\t\t <th><? echo $this->title?></th>\n\t\t </tr>\n\t\t <?\n\t\t }\n\t\t ?>\n\t\t <tr>\n\t\t <td>\n\t\t <div style=\"padding: 0; margin: 0; width: 100%;<? if ($this->height > 0) { ?> height: <?echo $this->height?>px;<? } ?><?if ($this->scroll) echo \"overflow: auto\"?>\">\n<?\n\t\t$this->writeNodes();\n?>\n\t\t </div>\n\t\t </td>\n\t\t </tr>\n\t\t</table>\n<?\n\t\t$_activeTree = null;\n\t}", "private function createHTML(string $id): void {\n $table = $this->table[$id];\n $columns = $this->columns[$id];\n $where = $this->where[$id];\n $order = $this->order[$id];\n $buttons = $this->buttons[$id];\n $settings = $this->settings[$id];\n\n // Tilføj HTML klasse til tabellen hvis sortering er aktiveret\n $hasSorting = '';\n if(!empty($settings['ajaxsort']) && $settings['ajaxsort']) {\n $hasSorting = ' has-sorting';\n }\n\n // Start udskrivning af tabel og udskriv søgefelt hvis det er aktiveret\n echo \"<table id='$id' class='RCMSTable $hasSorting' style='width: 100%'>\";\n if(!empty($settings['searchbar']) && $settings['searchbar']) {\n echo '<tr>';\n echo '<td class=\"searchtd\" colspan=\"' . (count($columns) + count($buttons)) . '\"><input type=\"text\" class=\"searchbar\" placeholder=\"Søgefelt...\" /></td>';\n echo '</tr>';\n }\n\n // Udskriv tabel hovedet\n echo '<tr>';\n foreach ($columns as $column) {\n $sortKey = $column['column'] ?? '';\n $initialSortDir = $column['initial_sort_dir'] ?? '';\n $initialSortDir = $initialSortDir ? \"data-initial-sort-dir='$initialSortDir'\" : '';\n\n // Tjek om sortering er aktiveret og udskriv derefter\n if(!empty($settings['ajaxsort']) && $settings['ajaxsort']) {\n if (!empty($column['enable_ajax_sort']) && $column['enable_ajax_sort']) {\n echo \"<th class='th-can-sort' $initialSortDir data-sort-key=\\\"$sortKey\\\">\" . $column['label'] . \"</th>\";\n } else {\n echo '<th>' . $column['label'] . '</th>';\n }\n } else {\n echo '<th>' . $column['label'] . '</th>';\n }\n }\n foreach ($buttons as $button) {\n echo \"<th></th>\";\n }\n\n echo '</tr>';\n\n $rows = $this->retrieveData($table, $columns, $where, $order, $settings);\n\n // Udskriv alle rækkerne\n $this->buildRows($id, $rows);\n\n echo '</table>';\n }", "public function html() : string\n {\n $table = \"<table class=\\\"multiplicationTable\\\">\";\n\n for ($row = 1; $row <= $this->rows + 1; $row++) {\n $table .= \"<tr>\";\n\n for ($column = 1; $column <= $this->columns + 1; $column++) {\n if ($row == 1 && $column == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">X</td>\";\n } elseif ($row == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">\" . ($column - 1) . \"</td>\";\n } elseif ($column == 1) {\n $table .= \"<td class=\\\"bold highlighted\\\">\" . ($row - 1) . \"</td>\";\n } else {\n $table .= \"<td>\" . ($row - 1) * ($column - 1) . \"</td>\";\n }\n }\n\n $table .= \"</tr>\";\n }\n\n $table .= \"</table>\";\n\n return $table;\n }", "public function render()\n\t{\n\n\t\t$table = \"<table\";\n\n\t\t// Add all attributes\n\t\tforeach ($this->attributes as $key => $value) {\n\t\t\t$table .= ' ' . $key . '=\"' . $value .'\"';\n\t\t}\n\n\t\t$table .= \">\"; // Close table\n\n\t\t// Add the head\n\t\tif ($this->showHeadRow) {\n\t\t\t$table .= \"<thead><tr>\";\n\n\t\t\t// Show the number header.\n\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t$table .= \"<th>#</th>\";\n\t\t\t}\n\n\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t$columnHeadTitle = isset($column['headTitle']) ? $column['headTitle'] : $column[0];\n\t\t\t\t$table .= \"<th>\" . $columnHeadTitle . \"</th>\";\n\t\t\t}\n\n\t\t\t$table .= \"</tr></thead>\"; // finish head\n\t\t}\n\n\t\t// Body\n\t\t$table .= \"<tbody>\";\n\n\t\t$row = $this->numberColumnOffset;\n\n\t\tif (count($this->data) == 0) {\n\t\t\t// Show a no data entry\n\t\t\t$colspan = count($this->columns) + ($this->showNumberColumn ? 1 : 0);\n\t\t\t$table .= '<tr><td colspan=\"'.$colspan.'\"><p align=\"center\" style=\"font-weight:bold;\">Keine Einträge</p></td></tr>';\n\t\t}\n\t\telse {\n\t\t\tforeach ($this->data as $dataObject) {\n\n\t\t\t\t// Row attributes\n\t\t\t\t$attributes = $this->rowAttributes;\n\t\t\t\tif (!is_array($attributes)) {\n\t\t\t\t\tif (is_callable($this->rowAttributes)) {\n\t\t\t\t\t\t$callable = $this->rowAttributes;\n\t\t\t\t\t\t$attributes = $callable($dataObject);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$attributeString = '';\n\t\t\t\tif ($attributes) {\t\t// Add attributes if we have some\n\t\t\t\t\tforeach ($attributes as $attributeName => $attributeValue) {\n\t\t\t\t\t\t$attributeString .= $attributeName . '=\"' . $attributeValue . '\" ' ;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($this->rowIdDataMethod) {\n\t\t\t\t\t// method name or closure?\n\t\t\t\t\t$id = '';\n\t\t\t\t\tif (is_string($this->rowIdDataMethod)) {\n\t\t\t\t\t\t$id = $dataObject->{$this->rowIdDataMethod}(); // Call the row data method\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($this->rowIdDataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\t\t\t\t\t\t\t// we got a closure\n\t\t\t\t\t\t\t$closure = $this->rowIdDataMethod;\n\t\t\t\t\t\t\t$id = $closure($dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t$table .= '<tr id=\"'. $id .'\" ' . $attributeString . '>'; // Start row with id\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$table .= \"<tr \". $attributeString .\">\";\t// Start row without id\n\t\t\t\t}\n\n\t\t\t\t// Number?\n\t\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t\t$table .= \"<td>\" . $row . \"</td>\";\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\t$dataMethod = isset($column['dataMethod']) ? $column['dataMethod'] : $column[1];\n\t\t\t\t\tif (is_string($dataMethod)) {\n\t\t\t\t\t\t// Just call the method an insert the return value into the table cell\n\t\t\t\t\t\t$table .= \"<td>\". $dataObject->$dataMethod() .\"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($dataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\n\t\t\t\t\t\t\t// Call the closure and get the result\n\t\t\t\t\t\t\t$value = $dataMethod($dataObject, $this);\n\n\t\t\t\t\t\t\t$table .= \"<td>\". $value .\"</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$table .= \"</tr>\";\t// End the table row\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\t// Render the footer row\n\t\t\t$table = $this->renderFooter($table);\n\n\t\t}\n\n\t\t$table .= \"</tbody>\";\n\n\t\t$table .= \"</table>\";\n\t\treturn $table;\n\t}", "public function table()\n\t{\n\t\t$this->datatables->select('testcat.test_id AS test_id, testcat_id, gender, age, score, percentile, percentile.id AS id');\n\t\t$this->datatables->from('percentile');\n\t\t$this->datatables->join('testcat', 'testcat.id = percentile.testcat_id');\n\n\t\t$this->datatables->edit_column('test_id', '$1', 'test_get_link_by_id(test_id)');\n\t\t$this->datatables->edit_column('testcat_id', '$1', 'testcat_get_link_by_id(testcat_id)');\n\t\t$this->datatables->edit_column('gender', '$1', 'gender(gender)');\n\t\t$this->datatables->edit_column('id', '$1', 'percentile_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "function display_report()\n {\n $out = '<div>';\n $out .= '<table id=\"resultsTable\">';\n $out .= '<thead>';\n if(isset($this->header))\n {\n if(!$this->has_split_header())\n {\n $out .= '<tr>';\n foreach($this->header AS $head)\n {\n $out .= '<th>'.$head.'</th>';\n } \n $out .= '</tr>';\n }\n else\n {\n //foreach row\n foreach($this->header AS $row)\n {\n $out .= '<tr>';\n foreach($row AS $rowObj)\n {\n $columnCount = isset($rowObj->colCount) ? $rowObj->colCount : 1;\n $columnContent = $rowObj->content;\n $out .= '<th colspan=\"'.$columnCount.'\">'.$columnContent.'</th>';\n }\n $out .= '</tr>';\n }\n } \n }\n $out .= '</thead>';\n $out .= '<tbody>';\n if(isset($this->data))\n {\n foreach($this->data AS $row)\n {\n $out .= '<tr>';\n foreach($row AS $cell)\n {\n if(is_a($cell, 'stdClass'))\n {\n $out .= $this->build_cell($cell);\n }\n else\n {\n $out .= '<td>'.$cell.'</td>';\n }\n } \n $out .= '</tr>';\n }\n }\n //count the last row\n// $out .= '<tr>';\n// for($i=0;$i<count($row);$i++)\n// {\n// $out .= '<td class=\"emptyrow\"><div class=\"emptycell\">X</div></td>';\n// }\n// $out .= '</tr>';\n $out .= '</tbody>';\n $out .= '</table>';\n $out .= '</div>';\n \n return $out;\n }", "function printTable($arg_array)\r\n\t\t{\r\n\t\techo \"<table border=1>\";\r\n\t\tforeach($arg_array[0] as $key=>$value)\r\n\t\t\t{\r\n\t\t\techo \"<th>\".$key.\"</th>\";\r\n\t\t\t}\r\n\t\techo \"<tr>\";\r\n\t\tforeach($arg_array as $row =>$record)\r\n\t\t\t{\r\n\t\t\tforeach($record as $column_head => $value)\r\n\t\t\t\t{\r\n\t\t\t\techo \"<td>\".$value.\"</td>\";\r\n\t\t\t\t}\r\n\t\t\techo \"</tr>\";\t\r\n\t\t\t}\r\n\t\techo \"</table>\";\r\n\t\t}", "public function html()\n {\n return $this->builder()\n ->setTableId('order-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->orderBy(0);\n }", "function html_table_data($dbtable, $sqlquery = NULL){\n\t\t$i = 1;\n\t\t$db = ADONewConnection('mysql'); \n\t $db->debug = true; \n\t $db->Connect('localhost', 'xxxx', 'xxxx', 'xxxx'); \n\t if(!$db)\n\t \tdie(\"Database conn failed\");\n\t \t\n\t $rs = $db->GetAssoc(\"select * from $dbtable\");\n\t if (!$rs) {\n\t \tdie(\"Sql statement error\");\n\t } \n\t print (\"<div id=\\\"demo\\\"><table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" border=\\\"0\\\" class=\\\"display\\\" id=\\\"example\\\">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>ID</th>\n\t\t\t\t<th>School</th>\n\t\t\t\t<th>Level</th>\n\t\t\t\t<th>Enrollment</th>\n\t\t\t</tr>\n\t\t</thead><tbody>\");\n\t foreach ($rs as $row){\n\t \techo(\"<tr id=\\\"$i\\\" class=\\\"gradeA\\\"><td>\".\n\t \t$row['id'].\"</td><td>\".$row['school'].\"</td><td class=\\\"center\\\">\".\n\t \t$row['level'].\"</td><td class=\\\"center\\\">\".$row['enrollment'].\"</td>\n\t\t\t</tr>\");\n\t \t$i++;\t \t\t\n\t }\n\t\t echo (\"</tbody>\n\t\t\t\t\t<tfoot>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>ID</th>\n\t\t\t\t\t\t<th>School</th>\n\t\t\t\t\t\t<th>Level</th>\n\t\t\t\t\t\t<th>Enrollment</th>\t\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tfoot>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\");\n\t $db->Close();\n\t}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->setTableAttribute('class', 'table table-hover')\n ->parameters([\n 'dom' => 'lBfrtip',\n 'responsive' => false,\n 'stateSave' => true,\n 'filterDefinitions' => $this->getFilterDefinition(),\n 'filterRules' => $this->filterRules,\n 'headerFilters' => true,\n 'buttons' => DataTableHelper::buttons(),\n 'regexp' => true\n\n ]);\n }", "function display() {\n echo'<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\n echo'<tr>'; //first row\n for ($pos = 0; $pos < 9; $pos++) {\n echo $this->show_cell($pos);\n if ($pos % 3 == 2)\n echo '</tr><tr>'; //next square is in a new row\n }\n echo'</tr>';\n echo'</table>';\n }", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "function showTestTable(&$dbh,$d)\n {\n $shown = 0;\n $dbh->QueryResult('SELECT ID,VAL FROM OCI8_CLASS_TEST_TABLE ORDER BY ID');\n while($data = $dbh->FetchResult())\n {\n printf(\"%5d. %s%s\",$data['ID'],$data['VAL'],$d['LF']);\n $shown++;\n }\n $dbh->FreeResult();\n if(!$shown)\n {\n printf(\"No data in table.%s\",$d['LF']);\n }\n }", "public function SummaryLine_HTML_row() {\n\t$sCatNum = $this->CatNum();\n\t$htLink = $this->ShopLink($sCatNum);\n\t$sName = $this->NameString();\n\t$sStats = $this->RenderStatus_HTML_cells();\n\treturn \"\\n<tr><td>$htLink</td><td>&ldquo;$sName&rdquo;</td>$sStats</tr>\";\n }", "function draw_table($rows) {\n \n echo \"<table border=1 cellspacing=1>\"; //Set up border and spacing\n echo \"<tr>\"; //Begin the table row insertion for header row\n \n foreach($rows[0] as $key => $item) {\n \n echo \"<th>$key</th>\";\n \n }\n \n echo \"</tr>\";\n \n // Insert data into each row\n foreach ($rows as $row) {\n \n echo \"<tr>\";\n \n foreach ($row as $key => $item) {\n \n echo \"<td>$item</td>\"; //Table data\n \n }\n \n echo \"</tr>\";\n \n }\n \n echo \"</table>\";\n \n }", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'centry_exit_log.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "public function start_output() {\n echo \"<!DOCTYPE html><html><head>\";\n echo \\html_writer::empty_tag('meta', ['charset' => 'UTF-8']);\n echo \\html_writer::tag('title', $this->filename);\n echo \"<style>\nhtml, body {\n margin: 0;\n padding: 0;\n font-family: sans-serif;\n font-size: 13px;\n background: #eee;\n}\nth {\n border: solid 1px #999;\n background: #eee;\n}\ntd {\n border: solid 1px #999;\n background: #fff;\n}\ntr:hover td {\n background: #eef;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0pt;\n width: 80%;\n margin: auto;\n}\n</style>\n</head>\n<body>\";\n }", "public function html()\n {\n return $this->builder()\n ->parameters([\n 'language' => ['url' => asset('languageDataTable.json')],\n ])\n ->setTableId('raffle-table')\n ->columns($this->getColumns())\n ->minifiedAjax();\n }", "public function visualizar() {\n echo $this->getTabuleiro();\n }", "function rlip_log_table_html($table) {\n global $OUTPUT;\n\n if (empty($table->data)) {\n //no table data, so instead return message\n return $OUTPUT->heading(get_string('nologmessage', 'block_rlip'));\n }\n\n //obtain table html\n return html_writer::table($table);\n}", "public function asHtml(){\n $html = \"<table class='timer'>\\n<tr><th>ID</th><th>time [s]</th></tr>\\n\";\n foreach($this->times as $id => $time)\n $html .= \"<tr><td>$id</td><td>\" . number_format($time,$this->decimals) . \"</td></tr>\\n\";\n return $html . '</table>';\n }", "public function html()\n {\n return\n $this->builder()\n ->columns($this->getColumns())\n ->parameters([\n 'dom' => \"<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>\",\n 'buttons' => [\n ['extend' => 'print', 'className' => 'btn xs default'],\n ['extend' => 'excel', 'className' => 'btn xs default'],\n ['extend' => 'pdf', 'className' => 'btn xs default'],\n ],\n 'language' => config('datatables.language_trans')\n ])->setTableAttribute(['class' => 'table dataTable no-footer table-bordered table-condensed']);\n }", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cdiscount.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "function EventsHtmlTable()\n {\n return \n $this->Html_Table\n (\n \"\",\n $this->EventsTable()\n );\n }", "function outputting()\n {\n $highlightMagnitudeClasses = $this->earthquakeClass($this->magnitude);\n echo '\n <tr>\n <td>' . $this->datetime . '</td>\n <td>' . $this->description . '</td>\n <td class=\"' . $highlightMagnitudeClasses . '\">' . $this->magnitude . '</td>\n <td>' . strval(\"($this->longitude, $this->latitude)\") . '</td>\n <td>' . $this->depth . '</td>\n <td style=\"width: 100px;\">\n <div style=\"text-align: center;\">\n <button type=\"button\" \n class=\"btn btn-primary\" \n style=\"width: 40px;\" \n data-toggle=\"modal\" \n data-target=\"#myModal\" \n data-lat=' . $this->latitude . ' \n data-lng=' . $this->longitude . ' \n title=\"open map ' . $this->description . '\">\n <i class=\"fas fa-map-marked-alt\"></i>\n </button>\n <button type=\"button\" \n class=\"btn btn-primary\" \n style=\"width: 40px;\" \n title=\"Open details\" \n onclick=\"location.href = \\'' . $this->url . '\\';\">\n <i class=\"fa fa-external-link-square-alt\"></i>\n </button>\n </div>\n </td>\n </tr>\n ';\n }", "protected function RenderFormattedTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $dispmode = $this->GetDisplayMode();\n $hasSub = $this->m_SubForms ? 1 : 0;\n //$this->SetDisplayMode($dispmode->GetMode());\n $cls_tbl = strlen($dispmode->m_FormatStyle[0])>0 ? \"class='\".$dispmode->m_FormatStyle[0].\"'\" : \"\";\n $sHTML_tbl = \"<table width=100% border=0 cellspacing=0 cellpadding=3 $cls_tbl>\\n\";\n //$sHTML_tby = \"<tbody id='\".$this->m_Name.\"_tbody' Highlighted='\".$this->m_Name.\"_data_\".($this->m_CursorIndex+1).\"' SelectedRow='\".($this->m_CursorIndex+1).\"'>\\n\";\n\n // print column header\n $columns = $this->m_RecordRow->RenderColumn();\n $sHTML = \"\";\n foreach($columns as $colname)\n $sHTML .= \"<th class=head>$colname</th>\\n\";\n\n // print column data table\n $name = $this->m_Name;\n $counter = 0;\n $sHTML_rows = \"\";\n $selectedRecId = null;\n $selectedIndex = 0;\n while (true) {\n if ($this->m_Range != null && $this->m_Range > 0 && $counter >= $this->m_Range)\n break;\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n else\n $arr = null;\n if (!$arr && $this->m_FullPage == \"N\")\n break;\n if (!$arr)\n $sHTML_rows .= \"<tr><td colspan=99>&nbsp;</td></tr>\\n\";\n else {\n $recId = $arr[\"Id\"];\n\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $rowHTML = \"\";\n foreach($tblRow as $cell) {\n $cell_html = $cell==\"\" ? \"&nbsp;\" : $cell;\n $rowHTML .= \"<td valign=top class=cell>$cell_html</td>\\n\";\n }\n $rownum = $counter+1;\n $rowid = $name.\"_data_\".$rownum;\n $attr = $rownum % 2 == 0 ? \"normal=roweven select=rowsel\" : \"normal=rowodd select=rowsel\";\n\n if ($this->m_HistRecordId != null)\n $this->m_RecordId = $this->m_HistRecordId;\n if ($this->m_RecordId == null)\n $this->m_RecordId = $recId;\n \n if ($this->m_RecordId == $recId) {\n $style_class = \"class=rowsel\";\n $selectedRecId = $recId;\n $selectedIndex = $counter;\n }\n else if ($rownum % 2 == 0)\n $style_class = \"class=roweven\";\n else\n $style_class = \"class=rowodd\";\n\n $onclick = \"ondblclick=\\\"CallFunction('$name.EditRecord($recId)');\\\"\" . \n \" onclick=\\\"CallFunction('$name.SelectRecord($recId,$hasSub)');\\\"\";\n if ($rownum == 1) {\n $sHTML_row1 = \"<tr id='$recId' $style_class $attr $onclick>\\n$rowHTML</tr>\\n\";\n $row1_id = $recId;\n }\n else\n $sHTML_rows .= \"<tr id='$recId' $style_class $attr $onclick>\\n$rowHTML</tr>\\n\";\n }\n $counter++;\n } // while\n if ($selectedRecId == null) {\n $selectedRecId = $row1_id;\n $this->m_RecordId = $selectedRecId;\n $sHTML_row1 = str_replace(\"class=rowodd\", \"class=rowsel\", $sHTML_row1);\n }\n $sHTML .= $sHTML_row1 . $sHTML_rows;\n $this->GetDataObj()->SetActiveRecord($resultRecords[$selectedIndex]);\n\n $sHTML_pre = \"\\n<input type='hidden' id='\".$this->m_Name.\"_selectedId' name='_selectedId' value='$selectedRecId'/>\\n\";\n $sHTML_tby = \"<tbody id='\".$this->m_Name.\"_tbody'>\\n\";\n $sHTML = $sHTML_pre . $sHTML_tbl . $sHTML_tby . $sHTML . \"</tbody></table>\";\n\n return $sHTML;\n }", "public function dump() {\n var_dump ($this->tblAttr, $this->theadAttr, $this->tbodyAttr, $this->thData, $this->tdData);\n }", "public function html()\n {\n return data_tables_settings($this,$this->getColumns(),'bloodtypes-table');\n }", "public function render()\n\t{\n\t\tinclude_once __DIR__ . '/templates/go-profiler-mustache-template.php';\n\t\t?>\n\t\t<table id='debug-aggregate-table'>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\"> Filter: <input type='text' class='go-profiler-search'/></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>hook</th>\n\t\t\t\t<th>calls</th>\n\t\t\t\t<th>memory usage</th>\n\t\t\t\t<th>time</th>\n\t\t\t</tr>\n\t\t</table>\n\t\t<?php\n\t}", "function buildTable($array){\n // start table\n $html = '<table class=\"table\">';\n // data rows\n foreach( $array as $key=>$value){\n $html .= '<tr>';\n foreach($value as $key2=>$value2){\n $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n }\n $html .= '</tr>';\n }\n\n // finish table and return it\n\n $html .= '</table>';\n return $html;\n}", "function SQL2HTML($query, $title=\"Table Summary\")\n{\n \n if (!$result = pp_run_query($query)) {\n $sRetVal = mysql_error();\n } else {\n $sRetVal = \"<table border='1'>\\n\";\n $sRetVal .= \"<tr><th colspan='\" . count($result[0]) . \"'>\";\n $sRetVal .= $title . \"</th></tr>\";\n $sRetVal .= \"<tr>\";\n $i=0;\n //while ($i < count($result[0])) {\n foreach(array_keys($result[0]) as $key){\n $sRetVal .= \"<th>\" . $key . \"</th>\";\n $i++;\n }\n $sRetVal .= \"</tr>\";\n foreach($result as $line){\n $sRetVal .= \"\\t<tr>\\n\";\n foreach($line as $col_value) {\n $sRetVal .= \"\\t\\t<td>$col_value</td>\\n\";\n }\n $sRetVal .= \"\\t</tr>\\n\";\n }\n $sRetVal .= \"</table>\\n\";\n }\n \n return($sRetVal);\n}", "function _showTables() {\n print \"<pre>\";\n print_r($this->_tables);\n print \"</pre>\";\n }", "public function getHTML()\r\n\t{\t\t\r\n\t\tglobal $tpl, $lng;\r\n\t\t\r\n\t\t$lng->loadLanguageModule(\"crs\");\r\n\t\t\r\n\t\tinclude_once \"Services/Container/classes/class.ilContainerStartObjectsContentTableGUI.php\";\r\n\t\t$tbl = new ilContainerStartObjectsContentTableGUI(\r\n\t\t\t\t$this->parent_gui, \r\n\t\t\t\t\"\", \r\n\t\t\t\t$this->start_object, \r\n\t\t\t\t$this->enable_desktop\r\n\t\t);\r\n\t\t$tpl->setContent(\r\n\t\t\t$this->getPageHTML().\r\n\t\t\t$tbl->getHTML()\r\n\t\t);\t\t\r\n\t}", "public function html()\n {\n return $this->builder()\n ->setTableId('company-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom('frtip')\n ->orderBy(1);\n }", "function tabelKoppenGebruikers(){\n\tprint(\"<table class='ui celled fixed basic table' border='1px'> \n\t <tr>\n\t\t <td>Gebruikers ID</td> \n\t\t <td>Gebruikersnaam</td>\n\t\t <td>Voornaam</td>\n\t\t <td>Achternaam</td>\n\t\t <td>emailadres</td>\n\t\t <td></td>\n\t\t <td></td>\n\t </tr>\"); \n}", "function showtable()\r\n {\r\n $c=$this->connector();\r\n $r='';\r\n $r.=$this->logout();\r\n $r.=\"<div id='isi'>\r\n <center><a href='?act=mysql'>Show Database</a></center><br />\r\n <table width=50% align='center' class='xpltab' cellspacing=0 ><tr><th style='border-left:thin solid #f00;'>Table</th><th>Column count</th><th>Dump</th><th>Drop</th></tr>\";\r\n $db=$_GET['db'];\r\n $query=$this->qe(\"SHOW TABLES FROM $db\");\r\n while($data=mysql_fetch_array($query))\r\n {\r\n\r\n $iml=$this->qe(\"SHOW COLUMNS FROM $db.$data[0]\");\r\n $h=(mysql_num_rows($iml))?mysql_num_rows($iml):0;\r\n $r.= \"<tr><td><a href='?act=showcon&db=$db&table=$data[0]'>$data[0]</td><td>$h</td><td><a href='?act=downdb&db=$db&table=$data[0]'>Dump</a></td><td><a href='?act=dropdb&db=$db&tbl=$data[0]'>Drop</a></td></tr>\";\r\n \r\n }\r\n \r\n $r.= \"</table>\".$this->sqlcommand().\"</div>\";\r\n return $r;\r\n $this->free($query);\r\n $this->free($iml);\r\n mysql_close($c);\r\n }", "protected function getTableStructure($table)\r\n\t{\r\n\t\treturn \"\\t<create><![CDATA[\".parent::getTableStructure($table).\"]]></create>\\n\";\r\n\t}", "function build_html_table_bottom(){\n\t\t\n\t\t$output = '';\n\t\t\n\t\t$output .= '\n\t\t\t\t\t</table>';\n\t\t\n\t\treturn $output;\n\t\t\n\t}", "public function test_table()\n {\n $this->CT->execute('utility:table');\n\n $this->assertContains('Header1', $this->CT->getOutput());\n $this->assertContains('Header2', $this->CT->getOutput());\n }", "public static function build_table( $db_array ) {\n\n $display = self::formhead();\n \tforeach ( $db_array[0] as $column => $field ) {\n \t\t$display .= \"<th class='cell100 column1'>$column</th>\\n\";\n \t}\n \t$display .= \"</tr></thead></table></div>\\n\";\n $display .= \"<div class='table100-body '><table><tbody>\" ;\n \tforeach ( $db_array as $record ) {\n \t\t$display .= \"<tr class='row100 body'>\\n\";\n \t\tforeach ( $record as $field ) {\n \t\t\t$display .= \"<td class='cell100 column1'>$field</td>\\n\";\n \t\t}\n \t\t$display .= \"</tr>\\n\";\n \t}\n\n \t$display .= \"</tbody></table>\\n\";\n $display .= \"</div></div>\\n\";\n \t\n \treturn $display;\n }", "public function generaHtml(){\n\t\t$diaSetmana = DateTime::createFromFormat('d/m/Y', $this->date)->format('l');\n\t\t$this->table = \"<table id='sessions'><thead><tr><th>\" . $diaSetmana . \" \" . $this->date . \"</th></tr></thead>\";\n\t\t\n\t\tforeach($this->sessionsArray as $session):\n\t\t\t$dataHoraInici = $session->getDataHoraInici();\n\t\t\t\n\t\t\t$session_date = date('d/m/Y', strtotime($dataHoraInici));\n\t\t\t\n\t\t\tif($session_date == $this->date) {\n\t\t\t\t$this->haveClassesToday = true;\n\t\t\t\t$hora = explode(\" \", $dataHoraInici);\n\t\t\t\t$this->table .= \"<tr><td>\".$hora[1].\"</td><td>\".$session->getAssignatura()->getNom().\"<br />\".$session->getTipus().\"<br />\".$session->getAula().\"</td></tr>\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->logger->debug('Wrong day for session');\n\t\t\t\t$this->logger->debug('session_date is: ' . $session_date . ' specified date is: ' . $this->date);\n\t\t\t}\n\t\tendforeach;\n\t\t\n\t\t$this->table .= \"</table>\";\n\t\t$this->logger->debug(\"Html generated is: \" . $this->table);\n\t}", "function printTable ($rows, $cols) {\n echo \"<table border=1>\";\n\n for ($i=0; $i<$rows; $i++) {\n echo \"<tr>\";\n for ($j=0; $j<$cols; $j++) {\n echo \"<td> Content </td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function build_html_table_top(){\n\t\t\n\t\t$output = '';\n\t\t\n\t\t$output .= '\n\t\t\t\t\t<table style=\"border: 1px solid #FFFFFF; width:100%; table-layout: fixed;\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 11%;\"><font color=\"ffd700\">Date Visited</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 11%;\"><font color=\"ffd700\">IP Address</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 7%;\"><font color=\"ffd700\">OS</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 7%;\"><font color=\"ffd700\">Browser Name</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 8%;\"><font color=\"ffd700\">Browser Version</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 15%;\"><font color=\"ffd700\">Referer Page</font></th>\n\t\t\t\t\t\t\t<th style=\"border: 1px solid #FFFFFF; width: 15%;\"><font color=\"ffd700\">Request Page</font></th>\n\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\n\t\treturn $output;\n\t\t\n\t}", "public function toHTML() {\n\n\n\t\t# Get backtrace\n\t\t$backtrace = array_reverse(debug_backtrace());\n\n\t\t$text = @date(\"d.m.Y H:i\") . \"<h3>\" . ucfirst($this->type) . \": $this->message</h3>\";\n\t\t$text .= \"<table>\";\n\n\t\t# Format backtrace\n\t\tforeach($backtrace as $trace) {\n\t\t\tif(isset($trace[\"file\"]) && $trace[\"file\"] == $this->file && ($trace[\"line\"] == $this->line || $trace[\"line\"] == ($this->line + 1))) {\n\t\t\t\t$trace[\"line\"] = \"<b>{$trace[\"line\"]}</b>\";\n\t\t\t\t$trace[\"file\"] = \"<b>{$trace[\"file\"]}</b>\";\n\t\t\t}\n\n\t\t\tif(!empty($trace[\"line\"]))\n\t\t\t\t$text .= \"<tr><td style='padding: 5px;'>{$trace[\"line\"]}</td><td style='padding: 5px;'>{$trace[\"file\"]}</td></tr>\";\n\t\t}\n\n\t\treturn $text . \"</table>\";\n\t}", "function render_subscriber_table($table) {\n $s = '<table>';\n $s .= '<tr><th>Id</th><th>Name</th><th>Email</th></tr>';\n foreach($table as $row) {\n $id = \"$row[id]\";\n $name = \"<b>$row[name]</b>\";\n $email = \"$row[email]\";\n $s .= \"<tr><td>$id</td><td>$name</td><td>$email</td></tr>\";\n }\n $s .= '</table>';\n return $s;\n }", "function html_table($data) {\r\n\r\n $row = mysqli_fetch_assoc($data);\r\n $rows = array();\r\n array_push($rows, $row);\r\n $attributes = array_keys($row);\r\n\r\n if(mysqli_num_rows($data) > 0) {\r\n while($row = mysqli_fetch_assoc($data)) {\r\n array_push($rows, $row);\r\n }\r\n }\r\n\r\n print(\"<table>\\n\");\r\n print(\"<tr>\\n\");\r\n for($i = 0; $i < count($attributes); $i++) {\r\n print(\"<th>{$attributes[$i]}</th>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n for($j = 0; $j < count($rows); $j++) {\r\n print(\"<tr>\\n\");\r\n foreach($attributes as $attribute) {\r\n print(\"<td>{$rows[$j][$attribute]}</td>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n }\r\n\r\n print(\"</table>\\n\");\r\n\r\n}", "public function showTable() {\n\t\t$tableName = $this->request->getVariable('id');\n\t\t$this->smarty->assign('dbTableObject',new $tableName());\n\t\t$this->pageDisplay('tools');\n\t}", "public function html()\n {\n return $this->builder()\n ->setTableId('votelogs-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom(\"<'row mx-1'<'col-sm-12 col-md-6 px-3'l><'col-sm-12 col-md-6 px-3'f>><'table-responsive'tr><'row mx-1 align-items-center justify-content-center justify-content-md-between'<'col-auto mb-2 mb-sm-0'i><'col-auto'p>>\")\n ->responsive(true)\n ->parameters([\n 'drawCallback' => \"function() { $('.pagination').addClass('pagination-sm'); $('.data-table thead').addClass('bg-200 text-900'); $('.data-table tbody').addClass('bg-white'); $('.data-table tfoot').addClass('bg-200'); }\",\n ])\n ->lengthMenu([10, 25, 50, 100, 250, 500])\n ->orders([['4', 'asc'], ['2', 'asc'], ['3', 'asc']])\n ->rowGroupDataSrc(['voteProvider', 'rewardgroup']);\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('users-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom(\"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'table-responsive'rt>ip\") // Bfrtip\n ->orderBy(1)\n ->parameters([\n 'buttons' => [/*'export', 'print'*/],\n /*'language' => [\n 'url' => asset('lang/pt/datatable.json')\n ]*/\n ]);\n /* ->buttons(\n Button::make('create'),\n /*Button::make('export'),\n Button::make('print'),\n Button::make('reset'),\n Button::make('reload')*//*\n );*/\n }", "function table_display($table)\n{\n $out = '';\n $out = '<style> td,th{border: solid 2px black;}</style>';\n if (count($table) == 0) {\n //table is empty\n return 'table is empty';\n }\n $out .= '<table>';\n\n //table header\n $col_names = array_keys($table[0]);\n $out .= '<tr>';\n foreach ($col_names as $col_name) {\n $out .= '<th>'.$col_name.'</th>';\n }\n $out .= '</tr>';\n //table data\n $out .= '</tr>';\n foreach ($table as $one_row) {\n $out .= '<tr>';\n foreach ($one_row as $key => $col_name) {\n if ($key == 'price' and gettype($key) != 'integer') {\n $out .= '<td> $'.$col_name.' </td>';\n } else {\n $out .= '<td>'.$col_name.' </td>';\n }\n }\n $out .= '</tr>';\n }\n $out .= '</table>';\n\n return $out;\n}" ]
[ "0.7358608", "0.70420533", "0.67346656", "0.67163277", "0.66922754", "0.6687639", "0.66730154", "0.6631432", "0.66164434", "0.6595557", "0.65946513", "0.6589802", "0.6536361", "0.64886546", "0.6474763", "0.64702487", "0.6459952", "0.6457293", "0.6446224", "0.6444255", "0.64358574", "0.6429167", "0.64249796", "0.6383425", "0.63594365", "0.6352009", "0.63427675", "0.6338402", "0.6330364", "0.63210326", "0.6319684", "0.6317916", "0.62934977", "0.62838006", "0.62833273", "0.6275477", "0.6270777", "0.6266704", "0.6266499", "0.6257114", "0.62544584", "0.62486035", "0.624774", "0.6213301", "0.6207226", "0.61673975", "0.61553174", "0.6154944", "0.61547303", "0.6148798", "0.61434245", "0.61210465", "0.6117342", "0.61083364", "0.61063874", "0.61051697", "0.6105133", "0.61044073", "0.6102623", "0.60946023", "0.60928535", "0.6084219", "0.6084205", "0.6081641", "0.6079007", "0.60746384", "0.60705316", "0.60538584", "0.6037903", "0.6031253", "0.60263187", "0.6022", "0.6013275", "0.60054797", "0.6002274", "0.59983206", "0.5988512", "0.5983214", "0.59744185", "0.59695125", "0.59677136", "0.5962471", "0.5958483", "0.59507763", "0.59430575", "0.593542", "0.59249467", "0.59196866", "0.5915864", "0.5911454", "0.5908229", "0.59079707", "0.5907584", "0.59060323", "0.59058505", "0.5905318", "0.5905085", "0.5904616", "0.5893674", "0.58896726" ]
0.6217882
43
Sets content for passed container names
public function setContainerContent($containerName, $content = null) { $filter = $containerName; if (is_array($containerName)) { $filter = array_keys($containerName); } $containers = $this->getContentContainers($filter); foreach ($containers as $container) { /** @var ContentContainer $container */ if (is_array($containerName)) { $content = $containerName[$container->getName()]; } $container->html($content); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function setContent();", "protected function setContent() {}", "public function modifyTextContainer($oldName, $newName, $content, $language);", "public function addTextContainer($name, $content, $language);", "public function set($name, $content)\n {\n $this->slots[$name] = $content;\n }", "static function set($name,$content){\n\t\tif(! self::$enable )\n\t\t\treturn $content;\n\t\tself::init();\n\t\t$i = cacheItem::getInstance($name);\n\t\t$i->content = $content;\n\t\tself::$backend->saveItem($i);\n\t\treturn $content;\n\t}", "function setContent($c) {\n\t\t$this->set(\"content\",$c);\n\t}", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent( string $content );", "public function setContent($content){\n $this->_content = $content;\n }", "public function setContainer($container);", "public function setContent()\n {\n }", "private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }", "abstract public function setContentFromString($string);", "function container($params,$content,&$smarty,&$repeat) {\n\t\t$smarty->assign('title',$params['title']);\n\t\t$smarty->display('open_container.tpl');\n\t\techo($content);\n\t\t$smarty->display('close_container.tpl');\n\t}", "function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}", "function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}", "public function setContents($contents) {\n $this->_contents = $contents;\n }", "public function add_content($target,$content)\n \t{\n \t\t$this->content[$target][]=$content;\n \t}", "public function set_content() {\n\n\t\t$this->content = get_the_term_list( $this->data, $this->taxonomy, $this->prepend, $this->delimiter, $this->append );\n\t}", "public function setContent( string $content ) : void\n {\n $this->content = $content;\n }", "function set($name, $value) {\n $args = func_get_args();\n $cnt = count($args);\n // we check for odd number of args => missing values...\n if ($cnt % 2 == 0 && $cnt >= 2 ) {\n for ($i=0; $i < $cnt; $i += 2) {\n $name = $args[$i];\n $value = $args[$i + 1];\n $this->vars[$name] = ($value instanceof Template) ? $value->fetch() : $value;\n }\n } \n }", "public function setContent(string $content): void\n {\n $this->_content = $content;\n }", "protected function setContent($content = null)\n {\n if (!is_null($content)) {\n if (is_array($content)) {\n $this->innerContent = [];\n foreach ($content as $key => $cnt) {\n if (is_a($cnt, self::class) || is_string($cnt) || is_numeric($cnt)) {\n $this->innerContent[] = $cnt;\n }\n }\n } else {\n $this->innerContent = [$content];\n }\n }\n }", "public function setContent(string $content): void\n {\n $this->content = $content;\n }", "public function setSlot($name, $content)\n {\n $this->slots[$name] = $content;\n }", "public function setMeta($strName, $strContent) {\n\t\t\t$this->arMeta[$strName] = $strContent; \n\t\t}", "public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}", "public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}", "public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}", "private function setContent( $output_content ) {\n foreach ( $output_content as $oc ) {\n $this->_filename = $oc->output_filename;\n $this->content = $oc->getContent();\n }\n }", "public function setContent($content)\r\n {\r\n $this->content = $content;\r\n }", "function setContent($section, $content) {\n if(!is_array($this->content)) $this->content = array();\n $this->content[$section] = $content;\n }", "public function SetContent(Content $content)\n {\n $this->texts = array();\n $wordings = ContentWording::Schema()->FetchByContent(false, $content);\n foreach($wordings as $wording)\n {\n $prefix = Str::Replace('-', '.', $content->GetType());\n $this->texts[$prefix . '.' . $wording->GetPlaceholder()] = $wording->GetText();\n }\n }", "public function setContent($content)\r\n {\r\n $this->_content = $content;\r\n }", "public function setContent ($content) {\r\n\t\t$this->content = (string)$content;\r\n\t}", "function setContent(string $content_html): void\n {\n $this->data['content'] = $content_html;\n }", "public function setSidebar($name, $content, $view = null)\n\t{\n\t\t$this->_pageData['sidebar'][$name]['content'] = $content;\n\t\tif($view != null)\n\t\t\t$this->_pageData['sidebar'][$name]['view'] = $view;\n\t}", "public function set_content ($content) {\n $this->content = $content;\n }", "public function setContent($content)\n {\n $this->_content = $content;\n }", "public function setContent($subst)\n\t{\n\t\t$this->vars['content'] = $subst;\n\t}", "final public function set($tag, $content) {\n $this->template = str_replace(\"{\".$tag.\"}\", $content, $this->template);\n }", "public function setContent($content)\n {\n $this->content = $content;\n }", "public function setContent($content)\n {\n $this->content = $content;\n }", "public function setContent($content)\n {\n $this->content = $content;\n }", "public function setContent($content, $data=null){\n\n\t\t$this->content = $content;\n\n\t\t$this->page_data = $data;\n\n\t\t$this->index();\n\n\t\t\n\n\t}", "public function setContent($content){\n //asign the content\n $this->contentObject = $content;\n\n //save to disk as serialized\n $json = json_encode($this->contentObject);\n if($this->exists()){\n file_put_contents($this->getPath(), $json);\n }\n\t}", "public function setContent($content) {\n\t\t$this->buffer['content'] = $content;\n\t}", "public function setContents($contents, $encoding = 'UTF-8') {}", "public function setContent($content) {\n $this->content = $content;\n }", "public function setContainer(Container $container);", "protected function setResourceContents( $path, $content )\n {\n $this->content[$path] = $content;\n }", "public function setContent($content) {\n\n $this->content = $content;\n }", "public function setContent($content) {\n\n $this->content = $content;\n }", "public function set_content(string $content) {\n $this->content = $content;\n }", "function set($name, $value){\n if($this->_HTML AND $this->_HTML_load_view) $this->_template->set($name, $value);\n elseif($this->_JSON){\n if($name == null){\n array_push($this->_JSON_contents, $value);\n }else{\n $this->_JSON_contents[$name] = $value;\n }\n }\n }", "public function Init(string $name, array $content)\r\n {\r\n $this->Name = $name;\r\n $this->Content = $content;\r\n }", "public function setDataContent($content)\n {\n if (is_array($content)) {\n $this->headers->set('Content-Type', 'application/json');\n $content = json_encode($content);\n }\n\n $this->setContent($content);\n }", "public function setContent($content){\n $this->_content = $this->checkFormat($content);\n }", "protected function setHtmlContent() {}", "public function containers()\n {\n }", "public function set_content( $content )\r\n\t {\r\n\t \t$this->_content_to_load = $con;\r\n\t }", "public function containerSet($name, $value)\n {\n return $this->container->set($name, $value);\n }", "function content($content, $data, $select, $from, $tag, $k){\n\n\n\n\t//move \n\t$attributes = array();\n\tif($tag == 'figure'){ \t\n\t\t\t\t\t\t\tif(isset($data[$from][$select])){ if(!is_array($data[$from][$select])){ $attributes = array(\"class\"=> $data[$from][$select] ); $select = ''; } }\n\t\t\t\t\t\t\t//else { } place content for multiple images with class (tag div)\n\t\t\t\t\t\t}\n\n\tif(!is_array($select)){ \t\n\t\t\t\t\t\t\t\t\t\t\n\t\tif(isset($data[$from][$select])){\n\t\t\t\tif(!is_array($data[$from][$select])){ $content .= $data[$from][$select]; } //string data comes here\n\t\t\t\telse { //if(isset($data['prefix'])){ $content .= 'prefix'; }\n\t\t\t\t\t\tif(isset($_SESSION['list'][$select])) { foreach ($data[$from][$select] as $k2 => $val) {\n\t\t\t\t\t\t\t\t\t\tif(isset($_SESSION['list'][$select][$k2]['image'])){ $content .= '<img src=\"gallery/'.$_SESSION['list'][$select][$val]['image'].'\" >'; }\n\t\t\t\t\t\t\t\t\t\telse {\t$content .= '<span>'.$_SESSION['list'][$select][$val]['name'].'</span>';\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse { foreach ($data[$from][$select] as $k2 => $val) { $content .= '<span>'.$val.'</span>'; } }\n\t\t\t\t }\n\t\t\t\t}\n\t\telse{ if(empty($from)){$content .= $select; } /*$select.'uio';*/ }\n\t}\n\n\telse{ $content .=disher('', $select, $data, $k); }\n\n\t$output = array('content' =>$content , 'attributes'=> $attributes);\n\treturn $output;\n}", "function hook_kiosque_actor_content(&$content, &$title, $type, $configuration, &$params, &$storage) {}", "abstract public function setContentFromFile($file);", "public function Populate() {\r\n\t\t$form_instance = $this->form_instance;\r\n\t\t// Retrieve the field data\r\n\t\t$_els = vcff_parse_container_data($form_instance->form_content);\r\n\t\t// If an error has been detected, return out\r\n\t\tif (!$_els || !is_array($_els)) { return; }\r\n\t\t// Retrieve the form instance\r\n\t\t$form_instance = $this->form_instance; \r\n\t\t// Loop through each of the containers\r\n\t\tforeach ($_els as $k => $_el) {\r\n\t\t\t// Retrieve the container instance\r\n\t\t\t$container_instance = $this->_Get_Container_Instance($_el);\r\n\t\t\t// Add the container to the form instance\r\n\t\t\t$form_instance->Add_Container($container_instance);\r\n\t\t}\r\n\t}", "public function setNames($names) {}", "function content( $metavalues ) {\n\t\t}", "public function extendSection(string $name, string $content): void\n {\n\n if (isset(static::$sectionContents[$name])) {\n $content = str_replace('@parent', $content, static::$sectionContents[$name]);\n\n //$content = str_replace('##__PARENT_SECTION_CONTENT__##', $content, static::$sectionStack[$name]);\n }\n\n static::$sectionContents[$name] = $content;\n\n //dump(static::$sectionContents);\n }", "protected function generic_container($text, $name, $visible)\n\t{\n\t\tif($visible == true)\n\t\t\t$this->container($text, 'ccms_'.$name.'_vis', \"ccms_visible\");\n\t\telse\n\t\t\t$this->container($text, 'ccms_'.$name.'_edit', \"ccms_invisible\");\n\t}", "function setTextContent(&$content) {\n\t\t$this->lobSub->lobText =& $content;\n\t\t$this->repoObj->lobSubType = 'text';\n\t\t$this->repoObj->lobBytes = strlen($content);\n\t\t$this->lobSub->lobBinary = null;\n\t}", "public function setContent(?string $value): void {\n $this->getBackingStore()->set('content', $value);\n }", "public function addContent($content);", "public function Set( $key, $content )\r\n\t{\r\n\t\t$this->_snippets[$key] = $content;\r\n\t}", "protected function setPlainContent() {}", "function setContentAttribute(array $value) {\n\t\t$xml = new \\DOMDocument('1.0', 'UTF-8');\n\t\t$rootElement = $xml->createElement('content');\n\t\t$xml->appendChild($rootElement);\n\n\t\tforeach ($value['block'] as $block) {\n\t\t\t$cmsBlock = CmsBlock::create($block['type']);\n\n\t\t\t$blockToSeed = $block instanceof CmsBlock ? $block->toArray() : $block;\n\n\t\t\t$cmsBlock->seed($blockToSeed);\n\t\t\t$blockNode = $cmsBlock->toXml();\n\n\t\t\t$rootElement->appendChild($xml->importNode($blockNode, true));\n\t\t}\n\n\t\t$this->attributes['content'] = $xml->saveXML();\n\t}", "public function container(string $name);", "public function addContentItems($items = [])\n {\n //Loop on each item\n collect($items)->each(function ($item) {\n //Add each content to the Container\n $this->addSingleContentItem($item);\n });\n //Return object\n return $this;\n }", "public function registerContent( $content ) {\n\t\tforeach ( $this->menus as $key => $name ) {\n\t\t\t$content[ $this->transformName( $key ) ] = new Menu( $key );\n\t\t}\n\t\treturn $content;\n\t}", "public function set_channel_element($elementName, $content){\n\t\t$this->channels[$elementName] = $content ;\n\t}", "public function modify(Container $container): void\n {\n }", "public function setContainerId($id)\n\t{\n\t\t$this->_containerId = $id;\n\t}", "public function addContent( string $content );", "public function setContent($content)\n {\n $this->original = $content;\n\n // If the content is \"JSONable\" we will set the appropriate header and convert the content to JSON, This is\n // useful when returning something like models from routes that will be automatically transformed to their\n // JSON form.\n if ($this->shouldBeJson($content)) {\n $this->header('Content-Type', 'application/json');\n\n $content = $this->morphToJson($content);\n }\n // If this content implements the \"Renderable\" interface then we will call the render method on the object so\n // we will avoid any \"__toString\" exceptions that might be thrown and have their errors obscured(使模糊,费解)\n // by PHP's handling.\n elseif ($content instanceof Renderable) {\n $content = $content->render();\n }\n\n parent::setContent($content);\n\n return $this;\n }", "protected function setBladeControlStructuresPlaceholder($contents, PlaceholderContainer $placeholderContainer)\n {\n return preg_replace_callback('/@\\w*(\\s*\\(.*\\))?/', function ($match) use ($placeholderContainer) {\n return $placeholderContainer->addPlaceholder($match[0]);\n }, $contents);\n }", "function ZervWizard(&$container, $name)\r\n {\r\n if (!is_array($container)) {\r\n $this->addError('container', 'Container not valid');\r\n return;\r\n }\r\n\r\n $containerKey = $this->_containerPrefix . $name;\r\n if (!array_key_exists($containerKey, $container))\r\n $container[$containerKey] = array();\r\n\r\n $this->container = &$container[$containerKey];\r\n\r\n if (!array_key_exists('_errors', $this->container))\r\n $this->container['_errors'] = array();\r\n $this->_errors = &$this->container['_errors'];\r\n }", "public function store($name, $content);", "public function setContainer(Container $container)\n {\n $this->container = $container;\n }", "public function setContainer(Container $container)\n {\n $this->container = $container;\n }", "public function setContainer(Container $container)\n {\n $this->container = $container;\n }" ]
[ "0.67093754", "0.6180445", "0.6101917", "0.5911395", "0.58794975", "0.5862074", "0.58462167", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.57720333", "0.5686377", "0.564637", "0.5643341", "0.559326", "0.5543601", "0.5522536", "0.5521415", "0.5521415", "0.55144536", "0.5466379", "0.54655606", "0.5440816", "0.54332715", "0.5408676", "0.5400152", "0.53967416", "0.5390518", "0.53863406", "0.53626484", "0.53626484", "0.53626484", "0.5359917", "0.53578347", "0.5351677", "0.53428096", "0.5333736", "0.53006315", "0.52973473", "0.52900773", "0.52809733", "0.5273351", "0.52726614", "0.52383643", "0.523771", "0.523771", "0.523771", "0.5227601", "0.52141297", "0.5207864", "0.52013904", "0.5198125", "0.51975554", "0.5161362", "0.51610446", "0.51610446", "0.5157024", "0.51536715", "0.5144793", "0.5138358", "0.51344997", "0.51281166", "0.50983435", "0.50954604", "0.5083836", "0.50828534", "0.5078901", "0.5063005", "0.5039561", "0.5039284", "0.5038415", "0.50274915", "0.50252336", "0.5008405", "0.49909174", "0.49814442", "0.49677947", "0.49673072", "0.49665368", "0.49106145", "0.49090254", "0.4906172", "0.48951855", "0.48907664", "0.48882195", "0.4885394", "0.48825672", "0.48817497", "0.48784673", "0.48754832", "0.48721954", "0.48721954", "0.48721954" ]
0.70741147
0
Returns a list of container names contained in page.
public function containerNames() { return $this->contentManager->listContainerNames(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContainers()\n\t\t{\n\t\t\treturn $this->getTab( '_options_tab' )->getContainers();\n\t\t}", "public function getContainers()\n {\n }", "public function getContainers()\n {\n return $this->containers;\n }", "public function getContainers()\n {\n return $this->containers;\n }", "public function getContainers()\n\t\t{\n\t\t\treturn $this->_containers;\n\t\t}", "protected function findAll()\n {\n return ContainerPage::find()->contentContainer($this->contentContainer)->all();\n }", "public function getContainers()\n {\n $cmdResult = explode(\n \" \",\n $this->execute(\"docker ps -aq --filter 'name=cache-'\")\n );\n\n return array_map(\n 'trim',\n $cmdResult\n );\n }", "protected function getPageClassName()\n {\n return ContainerPage::className();\n }", "public function getContainerName();", "public function getContainerIDsAndTitles()\n {\n $retval = array();\n if (isset($this->fields['container_ids_and_titles']) && !empty($this->fields['container_ids_and_titles'])) {\n foreach ($this->fields['container_ids_and_titles'] as $id_and_title) {\n $a = explode(chr(0x1F), str_replace(\"#31;\", chr(0x1F), $id_and_title), 3);\n if (count($a) == 3) {\n $retval[$a[0]] = array($a[1], $a[2]);\n }\n }\n }\n return $retval;\n }", "protected function _getCollectionNames()\n {\n return array();\n }", "function getRunningContainers() {\n\tglobal $communitySettings, $DockerClient, $DockerTemplates;\n\n\tif ( $communitySettings['dockerRunning'] ) {\n\t\t$info = $DockerTemplates->getAllInfo();\n# workaround for incorrect caching in dockerMan\n\t\t$containers = $DockerClient->getDockerContainers();\n\t\tforeach ($containers as $container) {\n\t\t\t$info[$container['Name']]['running'] = $container['Running'];\n\t\t\t$info[$container['Name']]['repository'] = $container['Image'];\n\t\t\t$info[$container['Name']]['ImageId'] = $container['ImageId'];\n\t\t\t$info[$container['Name']]['Id'] = $container['Id'];\n\t\t\t$info[$container['Name']]['Name'] = $container['Name'];\n\t\t\t$infoTmp[$container['Name']] = $info[$container['Name']];\n\t\t}\n\t}\n\treturn $infoTmp ?: array();\n}", "public function getCmsElementNames();", "public function getTabPageNames()\n {\n return $this->getChildren()->getTypedControlNames(true, \"TabPage\");\n }", "private function get_node_children(midgard_page $node)\n {\n $children = array();\n $mc = midgard_page::new_collector('up', $node->id);\n $mc->set_key_property('name');\n $mc->add_value_property('title');\n $mc->execute(); \n $pages = $mc->list_keys();\n foreach ($pages as $name => $array)\n {\n if (empty($name))\n {\n continue;\n }\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}{$name}/\", // FIXME: dispatcher::generate_url\n 'title' => $mc->get_subkey($name, 'title'),\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n }\n \n if ($_MIDCOM->context->page->id == $_MIDCOM->context->host->root)\n {\n // Additional \"special\" URLs\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}__snippets/\", // FIXME: dispatcher::generate_url\n 'title' => 'Code Snippets',\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n $children[] = array\n (\n 'uri' => \"{$_MIDCOM->context->prefix}__styles/\", // FIXME: dispatcher::generate_url\n 'title' => 'Style Templates',\n 'mimetype' => 'httpd/unix-directory',\n 'resource' => 'collection',\n );\n }\n\n return $children;\n }", "public function GetSystemPageNames()\n {\n $aSystemPages = $this->GetSystemPageLinkList(false);\n\n return array_keys($aSystemPages);\n }", "public function getClassNamesForContainer()\n {\n $classes = ['container'];\n \n if ($this->owner->isEdgeToEdge()) {\n $classes[] = $this->style('row.edge-to-edge');\n }\n \n return $classes;\n }", "public function containers()\n {\n }", "public function getDefinitions()\n {\n return $this->containers;\n }", "private function getContainers(array $names)\n {\n $this->logger->debug('Getting container details');\n $process = new Process(['docker', 'ps', '--no-trunc', '--format', '\\'{{json .}}\\'']);\n $process->mustRun();\n $result = $process->getOutput();\n $containers = array_column(\n array_map(static function ($line) {\n $json = trim($line, \"'\");\n\n return json_decode($json, true, 512, JSON_THROW_ON_ERROR);\n }, array_filter(explode(PHP_EOL, $result))),\n null,\n 'ID'\n );\n\n $containers = array_filter($containers, static function ($id) use ($names) {\n return isset($names[$id]);\n }, ARRAY_FILTER_USE_KEY);\n\n // Add names\n foreach ($containers as $id => &$container) {\n $container['Name'] = $names[$id];\n }\n\n return $containers;\n }", "public function getNames() {}", "public function getNames() {}", "public function getNames() {}", "private function getPages()\n {\n $directory = __DIR__.'/Page/';\n // remove .. and . folder in unix\n $pageFolders = array_diff(scandir($directory), array('..', '.'));\n\n return $pageFolders;\n }", "function getNavs() {\n\t$pageData = getPageData();\n\t$li = '';\n\tforeach($pageData as $k => $v) {\n\t\t$li .= '<li><a href=\"' . COVER_PAGE . '?show=' . $k .'\">' . $k . '</a></li>' . \"\\n\";\n\t}\n\treturn $li;\n}", "public function getTagCloud()\n {\n $tagCloud = [];\n \n $pages = $this->entityManager->getRepository(Page::class)\n ->findPagesHavingAnyTag();\n $totalPageCount = count($pages);\n \n $tags = $this->entityManager->getRepository(Tag::class)\n ->findAll();\n foreach ($tags as $tag) {\n \n $pagesByTag = $this->entityManager->getRepository(Page::class)\n ->findPagesByTag($tag->getName());\n \n $pageCount = count($pagesByTag);\n if ($pageCount > 0) {\n $tagCloud[$tag->getName()] = $pageCount;\n }\n }\n \n $normalizedTagCloud = [];\n \n // Normalize\n foreach ($tagCloud as $name=>$pageCount) {\n $normalizedTagCloud[$name] = $pageCount/$totalPageCount;\n }\n \n return $normalizedTagCloud;\n }", "protected function get_container_name(): string {\n\t\t$parse = \\wp_parse_url( get_site_url() );\n\t\t$domain = $parse['host'];\n\n\t\t// Naming conventions, only letters\n\t\t// Container names must start or end with a letter or number, and can contain only letters, numbers, and the dash (-) character.\n\t\t// https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata.\n\t\t$container_name = strtolower( preg_replace( '/[^a-zA-Z0-9-]/', '-', $domain ) );\n\n\t\treturn $container_name;\n\t}", "public function getNames();", "private static function getParents(SiteTree $page)\n {\n $parents = array();\n\n $parent = $page->parent();\n\n while ($parent && $parent->exists()) {\n array_push($parents, $parent);\n // Keep looping\n $parent = $parent->parent();\n }\n\n return $parents;\n }", "public function container(): string;", "function getSpecies($page){\n\n global $speciesList;\n\n\t$html = new simple_html_dom();\n\t$html -> load_file($page);\n\t$items = $html -> find(\"i\");\n\n\tforeach($items as $species){\n\t$speciesList[] = $species ->innertext;\n\t}\n\n}", "function getPageNames()\n{\n $all = array_merge(getSinglepageNames(), getMultipageNames());\n uasort($all,'cmpByName');\n return $all;\n}", "public function dependencies_names(): Collection;", "public function getPageLabels() {}", "public function getControlNames();", "public static function getPageList($name) {\r\n\t$links = array();\r\n\tforeach ($this->getPages() AS $page) {\r\n\t $links[$page->getURL()] = $page->getTitle();\r\n\t}\r\n\treturn $links;\r\n }", "public function findAll()\n {\n $deploymentNodes = array();\n foreach ($this->getSystemConfiguration()->getContainers() as $container) {\n $deploymentNode = $container->getDeployment();\n $deploymentNodes[$deploymentNode->getUuid()] = $deploymentNode;\n }\n return $deploymentNodes;\n }", "public function getList($page);", "public function get_pages()\n\t{\n\t\treturn $this->_EE->db->select(array('heading', 'short_name'))\n\t\t\t ->get('exp_dd_doc_sections')\n\t\t\t ->result_array();\n\t}", "public function all() : array\n {\n return $this->container();\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 }", "public function getContainer() {}", "public function names() {\n $maps = $this->classRegistry->getClassMapping();\n \n $result = [];\n foreach($maps as $map) {\n $key = str_replace('\\\\','__',$map->getCurrentName());\n $result[$key] = $map->getCurrentName();\n }\n \n return $result;\n }", "public function getSingletonNames ();", "public function getContainer()\n {\n //Return container\n return $this->contentListContainer;\n }", "public function getNames(): Collection\n {\n return $this->names;\n }", "public function getChildrenNames()\n {\n if (null === $this->inheritanceField\n || !$this->inheritanceField->isEnumeratedClasses()\n ) {\n return null;\n }\n\n $names = [];\n foreach ($this->inheritanceField->getChildren() as $child) {\n $names[] = get_class($child);\n }\n\n return $names;\n }", "public function getContentContainers($filter = null)\n {\n return $this->contentManager->listContentContainers($filter);\n }", "public function containers(): ContainersInterface;", "public function getAllNames() {}", "static public function allNames()\n\t{\t\n\t\t$categories = PhotoCategory::all();\n\t\t\n\t\t$names = array();\n\t\t\n\t\t$categories->map(function($value) use (&$names)\n\t\t{\n\t\t\t$id = $value['id'];\n\t\t\t$names[$id] = $value['name'];\n\t\t});\n\t\t\n\t\treturn $names;\n\t}", "public function getChildPagesTags()\n {\n /** @var PageInterface $current */\n $current = Grav::instance()['page'];\n $taxonomies = [];\n foreach ($current->children()->published() as $child) {\n if (!$child->isPage()) {\n continue;\n }\n foreach($this->build($child->taxonomy()) as $taxonomyName => $taxonomyValue) {\n if (!isset($taxonomies[$taxonomyName])) {\n $taxonomies[$taxonomyName] = $taxonomyValue;\n } else {\n foreach ($taxonomyValue as $value => $count) {\n if (!isset($taxonomies[$taxonomyName][$value])) {\n $taxonomies[$taxonomyName][$value] = $count;\n } else {\n $taxonomies[$taxonomyName][$value] += $count;\n }\n }\n }\n }\n }\n\n return $taxonomies;\n }", "public function testListSiteContainers()\n {\n }", "function opensky_get_collection_tree () {\n $pid = 'opensky:root';\n $tree = array();\n foreach (opensky_get_subcollections_recursive('opensky:root') as $pid) {\n $tree[$pid] = opensky_get_pid_subcollections_pids($pid);\n }\n return $tree;\n}", "public function tagNames()\n\t{\n\t\treturn $this->tags()->get()->lists('tag');\n\t}", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public static function getCategories(ContainerInterface $container)\n {\n $dm = $container->get('doctrine.odm.mongodb.documentManager');\n $qCats = $dm\n ->createQueryBuilder(__CLASS__)\n ->field('published')->equals(true)\n ->sort('title', 'asc');\n $cats = $qCats->getQuery()->execute();\n $categories = array();\n foreach ($cats as $cat) {\n $qColls = $dm\n ->createQueryBuilder(__NAMESPACE__ . '\\\\MapCollection')\n ->field('category.$id')->equals(new \\MongoId($cat->getId()))\n ->field('published')->equals(true)\n ->sort('title', 'asc');\n $it = $qColls->getQuery()->execute();\n $colls = array();\n foreach ($it as $coll) {\n $colls[] = array('id' => $coll->getId(),\n 'title' => $coll->getTitle());\n }\n $categories[] =\n array('id' => $cat->getId(),\n 'title' => $cat->getTitle(),\n 'collections' => $colls);\n }\n return $categories;\n }", "function getStoragePageIds() ;", "function get_categories()\n\t\t{\n\t\t\t$categories = $this->manage_content->getValue('vertical_navbar','menu_name');\n\t\t\treturn $categories;\n\t\t}", "function render_page_container( $pageinfo , $firstClass )\n\t\t{\t\n\t\t\tif(!isset($pageinfo['sortable'])) $pageinfo['sortable'] = \"\";\n\t\t\t\n\t\t\t$output = '<div class=\"ace_subpage_container '.$firstClass.' '.$pageinfo['sortable'].'\" id=\"ace_'.ace_backend_safe_string($pageinfo['title']).'\">';\t\n\t\t\t$output .= '\t<div class=\"ace_section_header\">';\t\n\t\t\t$output .= '\t\t<strong class=\"ace_page_title\" style=\"background-Image:url('.ACE_IMG_URL.\"icons/\".$pageinfo['icon'].');\">'; \n\t\t\t$output .= \t\t\t$pageinfo['title'];\n\t\t\t$output .= '\t\t</strong>'; \n\t\t\t$output .= '\t</div>'; \n\t\t\treturn $output;\n\t\t}", "function theme_haarlem_pages_get_widget_selector(ElggEntity $container, $depth = 0) {\n\n\tif (empty($container) || !elgg_instanceof($container)) {\n\t\treturn false;\n\t}\n\tif ($depth == 0) {\n\t\t$ordered = elgg_get_entities(array(\n\t\t\t'type' => 'object',\n\t\t\t'subtype' => 'page_top',\n\t\t\t'container_guid' => $container->getGUID(),\n\t\t\t'limit' => false,\n\t\t));\n\t} else {\n\t\t$ordered = elgg_get_entities_from_metadata(array(\n\t\t\t'type' => 'object',\n\t\t\t'subtype' => 'page',\n\t\t\t'metadata_name' => 'parent_guid',\n\t\t\t'metadata_value' => $container->getGUID(),\n\t\t\t'limit' => false,\n\t\t));\n\t}\n\n\tif (empty($ordered)) {\n\t\treturn false;\n\t}\n\n\t$result = array();\n\n\tforeach ($ordered as $order => $page) {\n\t\t// add this page\n\t\t$result[$page->getGUID()] = trim(str_repeat('-', $depth) . ' ' . $page->title);\n\t\t// invalidate cache for OOM\n\t\t// @todo find a better way for this\n\t\t_elgg_invalidate_cache_for_entity($page->getGUID());\n\n\t\t// append children\n\t\t$children = theme_haarlem_pages_get_widget_selector($page, $depth + 1);\n\t\tif (!empty($children)) {\n\t\t\t$result += $children;\n\t\t\t\t\n\t\t\tunset($children);\n\t\t}\n\t}\n\n\tunset($ordered);\n\n\treturn $result;\n}", "public function getNameList() {\n return $this->_get(1);\n }", "public function getNamesFromCollection(string $name): array;", "public function getPageTypes() {}", "public function frontpage_categories_list() {\n global $CFG;\n $content = html_writer::start_tag('div', array('class' => 'container'));\n $content .= html_writer::tag('h2', get_string('categories'));\n\n global $CFG;\n $chelper = new coursecat_helper();\n $chelper->set_subcat_depth($CFG->maxcategorydepth)->set_show_courses(\n self::COURSECAT_SHOW_COURSES_COUNT)->set_categories_display_options(\n array(\n 'limit' => $CFG->coursesperpage,\n 'viewmoreurl' => new moodle_url('/course/index.php',\n array('browse' => 'categories', 'page' => 1))\n ))->set_attributes(array('class' => 'frontpage-category-names'));\n $categories = $this->get_categories();\n\n $attributes = $chelper->get_and_erase_attributes('course_category_tree clearfix');\n $content .= html_writer::start_tag('div', $attributes);\n $content .= html_writer::start_tag('div', array('class' => 'content'));\n $content .= html_writer::start_tag('div', array('class' => 'subcategories'));\n foreach ($categories as $key => $value) {\n $content .= $this->enlightlite_coursecat_category($chelper, core_course_category::get($key), 1);\n }\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n return $content;\n }", "public function getStoragePageIds() {}", "public function getNameList() {\n return $this->_get(3);\n }", "public function getNameList() {\n return $this->_get(3);\n }", "public function getNameList() {\n return $this->_get(3);\n }", "public function names(): array;", "public function names(): array;", "function pageList(){\n\t\t$path = ROOT . DS . 'pages';\n\t\t$pagesArray = array_diff(scandir($path), array('..', '.', '.svn','.htaccess'));\n\n\t\tforeach ($pagesArray as $page) {\n\t\t\t$tmp[basename($page)] = filemtime($page);\n\t\t}\n\t\tasort($tmp);\n\t\t$pagesArray = array_keys($tmp);\n\n\t\t// sorting by date can be added but name wise listing pages seems more pleasing.\n\t\t// later add extra sort-by-date option.\n\t\treturn $pagesArray;\n\t}", "public function get_names() {\n return String_util::get_lines(Text_file::read($this->_storage_path));\n }", "public function get_listing($path='', $page = '') {\n if (empty($path)) {\n $path = $this->build_node_path('root', get_string('pluginname', 'repository_googledrive'));\n }\n\n // We analyse the path to extract what to browse.\n $trail = explode('/', $path);\n $uri = array_pop($trail);\n list($id, $name) = $this->explode_node_path($uri);\n\n // Handle the special keyword 'search', which we defined in self::search() so that\n // we could set up a breadcrumb in the search results. In any other case ID would be\n // 'root' which is a special keyword set up by Google, or a parent (folder) ID.\n if ($id === 'search') {\n return $this->search($name);\n }\n\n // Query the Drive.\n $q = \"'\" . str_replace(\"'\", \"\\'\", $id) . \"' in parents\";\n $q .= ' AND trashed = false';\n $results = $this->query($q, $path);\n\n $ret = array();\n $ret['dynload'] = true;\n $ret['path'] = $this->build_breadcrumb($path);\n $ret['list'] = $results;\n return $ret;\n }", "public function names()\n {\n $names = [];\n foreach ($this->items as $item) {\n $names[] = $item->getName();\n }\n\n return $names;\n }", "function getPages() {\n\t\t$sql = 'SELECT * FROM page WHERE vis = 1 ORDER BY psn';\n\t\t$qrh = mysqli_query($this->lnk, $sql);\n\t\t$i = 1;\n\t\t\n\t\t// iterate and extract data to be passed to view\n\t\twhile ( $res = mysqli_fetch_array($qrh)) {\n\t\t\t$results[] = array('id' => $res['id'],'name' => $res['nam']);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $results;\n\t\t\n\t}", "public function getPages()\n {\n $types = Page::all();\n $values = [];\n foreach ($types as $key) {\n $values[] = $key->page;\n }\n return $values;\n }", "public function getSearchRootPageIdList() {}", "public function getSearchRootPageIdList() {}", "public function getAllCategoryNames();", "public function container();", "static function hasCategories($page) {\n\t\tglobal $db;\n\t\t\n\t\t$qry = \"SELECT DISTINCT category FROM textpages\";\n\t\t\n\t\tif (! empty ( $page )) {\n\t\t\t$qry .= \" WHERE page = '$page'\";\n\t\t}\n\t\t\n\t\t// echo $qry;\n\t\tif ($result = $db->query ( $qry )) {\n\t\t\twhile ( $row = $result->fetch_assoc () ) {\n\t\t\t\t$data [] = $row ['category'];\n\t\t\t}\n\t\t} \n\n\t\telse {\n\t\t\techo \"Fehler in hasCategories! \" . $db->error;\n\t\t}\n\t\t// var_dump($data);\n\t\treturn $data;\n\t}", "function _page_traverse_name($page_id, &$children, &$result)\n {\n }", "abstract protected function &container() : array ;", "public function getPageIds()\n {\n $arr = array();\n foreach($this->elements as $displayElement){\n if($displayElement->getType() == 'element'){\n $page = $displayElement->getElement()->getPage();\n while($page != null) { \n $arr[] = $page->getId();\n $page = $page->getParent();\n }\n }\n if($displayElement->getType() == 'page'){\n $page = $displayElement->getPage();\n while($page != null) { \n $arr[] = $page->getId();\n $page = $page->getParent();\n }\n }\n }\n\n return array_unique($arr);\n }", "public function menu_get_names()\n {\n return menu_get_names();\n }", "public function getServiceschemes()\n\t{\n\t\t$arrContests = $this->Database->prepare(\"SELECT id, name FROM tl_addthis_servicescheme\")->execute();\n\n\t\tif ($arrContests->numRows < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$return = array();\n\n\t\twhile ($arrContests->next())\n\t\t{\n\t\t\t$return[$arrContests->id] = $arrContests->name;\n\t\t}\n\n\t\treturn $return;\n\t}", "public function listContainers($assoc = false, $lastContainer = null, $limit = 10000)\n\t{\n\t\t// Re-authenticate if necessary\n\t\t$token = $this->getToken();\n\n\t\t// Get the URL to list containers. It's the container endpoint minus the actual container name.\n\t\t$url = $this->getStorageEndpoint();\n\t\t$lastSlash = strrpos($url, '/');\n\t\t$url = substr($url, 0, $lastSlash);\n\n\t\t// Get the request object\n\t\t$request = new Request('GET', $url);\n\t\t$request->setHeader('X-Auth-Token', $token);\n\t\t$request->setHeader('Accept', 'application/json');\n\t\t$request->setParameter('format', 'json');\n\n\t\tif (!empty($lastContainer))\n\t\t{\n\t\t\t$request->setParameter('marker', $lastContainer);\n\t\t}\n\n\t\tif (!is_numeric($limit))\n\t\t{\n\t\t\t$limit = 10000;\n\t\t}\n\n\t\tif ($limit <= 0)\n\t\t{\n\t\t\t$limit = 10000;\n\t\t}\n\n\t\t$request->setParameter('limit', $limit);\n\n\t\t$response = $request->getResponse();\n\n\t\tif (!$assoc)\n\t\t{\n\t\t\treturn $response->body;\n\t\t}\n\n\t\t$ret = [];\n\n\t\tif (!empty($response->body))\n\t\t{\n\t\t\tforeach ($response->body as $container)\n\t\t\t{\n\t\t\t\t$ret[$container->name] = $container;\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "public function getPageItems() {\r\n\t\treturn $this->__pageItems;\r\n\t}", "static function PageMembergroups(Page $page)\n {\n if (!$page->Exists())\n {\n return array();\n }\n $sql = Access::SqlBuilder();\n $tblPmg = PageMembergroup::Schema()->Table();\n $tblMg = Membergroup::Schema()->Table();\n $join = $sql->Join($tblPmg);\n $joinCondition = $sql->Equals($tblPmg->Field('MemberGroup'), $tblMg->Field('ID'));\n $where = $sql->Equals($tblPmg->Field('Page'), $sql->Value($page->GetID()));\n $orderBy = $sql->OrderList($sql->OrderAsc($tblMg->Field('Name')));\n \n return Membergroup::Schema()->Fetch(false, $where, $orderBy, null, 0, null, $join, JoinType::Inner(), $joinCondition);\n }", "public static function getNames()\n\t{\n\t\t$list = [];\n\t\tforeach (self::getCodes() as $code)\n\t\t{\n\t\t\t$list[$code] = Base::getNameByCode($code);\n\t\t}\n\n\t\treturn $list;\n\t}", "public static function getColoNames()\n\t{\n\t\treturn self::_getSoapClient(array_merge(array(), array('__method' => 'getColoNames')))->getColoNames();\n\t}", "function dir_link_containers_entity_property_info() {\n $info = array();\n $entity_info = entity_get_info('dir_container');\n foreach ($entity_info['bundles'] as $bundle => $bundle_info) {\n $info[$bundle] = array(\n 'label' => $bundle_info['label'],\n 'description' => t('List of @container that include the link.', array('@container' => $bundle_info['label'])),\n 'type' => 'list<dir_container>',\n );\n }\n\n return $info;\n}", "public function container(string $name);", "public function list_kelas($page)\n {\n $response = $this->db->query(\"call group_kelas('list','','','')\");\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }", "public function getCollectionsName(array $params = [])\n {\n $names = [];\n foreach ($this->getCollections($params) as $collection) {\n $names[] = $collection->getName();\n }\n\n return $names;\n }" ]
[ "0.6195086", "0.61684966", "0.60494167", "0.60494167", "0.59551954", "0.58465576", "0.57482284", "0.5691839", "0.56346464", "0.55717766", "0.5406663", "0.54057586", "0.5392516", "0.53511715", "0.53510904", "0.53258145", "0.5305574", "0.52819705", "0.5267462", "0.5257349", "0.52266675", "0.52266675", "0.5226045", "0.5216193", "0.52128226", "0.5156717", "0.513223", "0.51135904", "0.5102982", "0.5091228", "0.50738925", "0.5023445", "0.5017011", "0.50128317", "0.5004369", "0.49827284", "0.49734327", "0.4971822", "0.49665698", "0.49531317", "0.49397102", "0.4929541", "0.49294248", "0.49233526", "0.49203193", "0.4914356", "0.49115753", "0.48865223", "0.4881438", "0.48727804", "0.48704684", "0.48700982", "0.48621243", "0.48620763", "0.4843084", "0.48359537", "0.48359537", "0.48359537", "0.48359537", "0.48359537", "0.48274764", "0.4825762", "0.48256224", "0.48166093", "0.48094594", "0.47937658", "0.47926506", "0.47848088", "0.47740415", "0.4758413", "0.47574317", "0.47574317", "0.47574317", "0.47520927", "0.47520927", "0.47402975", "0.47385296", "0.47350338", "0.47199914", "0.4715722", "0.47155133", "0.47052696", "0.47052696", "0.470223", "0.4694269", "0.46922275", "0.46858442", "0.46795106", "0.46771842", "0.46738803", "0.46706006", "0.46656314", "0.46606427", "0.46561363", "0.46551448", "0.46467093", "0.4630232", "0.46298543", "0.46272826", "0.46261603" ]
0.73039705
0
Returns weather page contains specific container (does it contains .sccontent$container container)
public function hasContainer($container = '') { return in_array($container, $this->containerNames()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function showContainer() {\r\n\t\tif( self::$_bShowContainer ) {\r\n\t\t\techo self::$_smarty->fetch( self::$_smartyContainerFilename );\r\n\t\t}\r\n\t\telse {\r\n\t\t\techo self::$_smarty->getTemplateVars('content');\r\n\t\t}\r\n\t}", "function is_container_not_fluid($control) {\n\tif ($control->manager->get_setting ( 'loungeact[container_class]' )->value () == 'container') {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function container(): string;", "public function getContainer() {}", "function sc_container( $attr, $content='' ) {\n\t$class = isset( $attr['class'] ) ? $attr['class'] : '';\n\tob_start();\n\t?>\n\t<div class=\"container <?php echo $class; ?>\">\n\t\t<?php echo do_shortcode( $content ); ?>\n\t</div>\n\t<?php\n\treturn ob_get_clean();\n}", "function is_visible_container( $container_key, $setting_name = 'access_login_containers' )\n\t{\n\t\t$access = $this->get_setting( $setting_name );\n\n\t\treturn ( ! empty( $access ) && ! empty( $access[ $container_key ] ) );\n\t}", "public function testGetContainer() {\r\n\t\t$this->testObject->setContainer ( 'div' );\r\n\t\t$this->assertTrue ( 'div' == $this->testObject->getContainer (), 'incorrect html container returned' );\r\n\t}", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public function container();", "public function isContainer($in)\n {\n $elt = $this->getElement($in);\n\n return ($elt &&\n (($elt['a'] & self::ELT_NOSELECT) ||\n (((!$this->_showunsub && !$this->isSubscribed($elt)) ||\n $this->isInvisible($elt)) &&\n $this->hasChildren($elt, true))));\n }", "public function getContainers()\n {\n }", "public static function container(){\n\n $container = 'container';\n\n return $container;\n\n }", "public function containerInspect($container)\n {\n return $this->browser->get(\n $this->uri->expand(\n 'containers/{container}/json',\n array(\n 'container' => $container\n )\n )\n )->then(array($this->parser, 'expectJson'));\n }", "public static function container($container = 'default')\n {\n if ( ! isset(static::$containers[$container]))\n {\n static::$containers[$container] = new Asset_Container($container);\n }\n\n return static::$containers[$container];\n }", "public function container_fetch($mainContainerTag,$mcContentType,$scContentType = null) {\n\n if(!empty($scContentType)){\n /*fetch both a main container together with its sub containers*/\n return $this->model->main_sub_fetch($mainContainerTag, $mcContentType, $scContentType, $this->page);\n } else {\n\n return $this->model->singular_fetch($mainContainerTag,$mcContentType,$this->page);\n }\n\n }", "public function getUserContainer()\n {\n\n $url = \"https://ecouncil.burwood.nsw.gov.au/eservice/daEnquiryInit.do?doc_typ=10&nodeNum=219\";\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, !$this->config->dev);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, !$this->config->dev);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_COOKIEFILE, $this->config->directories->cookiesDir . 'cookies.txt');\n curl_setopt($ch, CURLOPT_COOKIEJAR, $this->config->directories->cookiesDir . 'cookies.txt');\n curl_setopt($ch, CURLOPT_USERAGENT, $this->config->useragent);\n\n $output = curl_exec($ch);\n $errno = curl_errno($ch);\n $errmsg = curl_error($ch);\n curl_close($ch);\n\n if ($errno !== 0) {\n\n $logMsg = sprintf(\"cURL error: [%s] (%s)\", $errmsg, $errno);\n $this->logger->info($logMsg);\n return false;\n }\n\n return true;\n\n }", "public function getContainer( $slug )\n\t\t{\n\t\t\tforeach( $this->_containers as $container ) {\n\t\t\t\tif( $container->getSlug() == $slug ) {\n\t\t\t\t\treturn $container;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function container() : ?Container;", "public function getContainer()\n {\n //Return container\n return $this->contentListContainer;\n }", "public function getRackspaceContainer() {\n return @$this->attributes['rackspace_container'];\n }", "function render_page_container( $pageinfo , $firstClass )\n\t\t{\t\n\t\t\tif(!isset($pageinfo['sortable'])) $pageinfo['sortable'] = \"\";\n\t\t\t\n\t\t\t$output = '<div class=\"ace_subpage_container '.$firstClass.' '.$pageinfo['sortable'].'\" id=\"ace_'.ace_backend_safe_string($pageinfo['title']).'\">';\t\n\t\t\t$output .= '\t<div class=\"ace_section_header\">';\t\n\t\t\t$output .= '\t\t<strong class=\"ace_page_title\" style=\"background-Image:url('.ACE_IMG_URL.\"icons/\".$pageinfo['icon'].');\">'; \n\t\t\t$output .= \t\t\t$pageinfo['title'];\n\t\t\t$output .= '\t\t</strong>'; \n\t\t\t$output .= '\t</div>'; \n\t\t\treturn $output;\n\t\t}", "function getRunningContainers() {\n\tglobal $communitySettings, $DockerClient, $DockerTemplates;\n\n\tif ( $communitySettings['dockerRunning'] ) {\n\t\t$info = $DockerTemplates->getAllInfo();\n# workaround for incorrect caching in dockerMan\n\t\t$containers = $DockerClient->getDockerContainers();\n\t\tforeach ($containers as $container) {\n\t\t\t$info[$container['Name']]['running'] = $container['Running'];\n\t\t\t$info[$container['Name']]['repository'] = $container['Image'];\n\t\t\t$info[$container['Name']]['ImageId'] = $container['ImageId'];\n\t\t\t$info[$container['Name']]['Id'] = $container['Id'];\n\t\t\t$info[$container['Name']]['Name'] = $container['Name'];\n\t\t\t$infoTmp[$container['Name']] = $info[$container['Name']];\n\t\t}\n\t}\n\treturn $infoTmp ?: array();\n}", "public function parseContainer($container = null);", "public function getContainerById($id) {\n try {\n $client = new Zend_Soap_Client($this->CONTAINER_WSDL_URI);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findByContainerId';\n $result = $client->findByContainerId($id);\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }", "public function getContainers()\n {\n return $this->containers;\n }", "public function getContainers()\n {\n return $this->containers;\n }", "private function _getCurrentTemplateContent() {\n $page = Application_Model_Mappers_PageMapper::getInstance()->find($this->_toasterData['id']);\n $tempate = Application_Model_Mappers_TemplateMapper::getInstance()->find($page->getTemplateId());\n if(!$tempate instanceof Application_Model_Models_Template) {\n return false;\n }\n return $tempate->getContent();\n }", "public function testStaticContainer()\n {\n $container = \\Rougin\\Slytherin\\Application::container();\n\n $interface = 'Rougin\\Slytherin\\Template\\RendererInterface';\n\n $this->assertTrue($container->has($interface));\n }", "function showCardContainer()\n {\n // instantiate template class\n $tpl = new template;\n $tpl->setCacheLevel($this->cachelevel);\n $tpl->setCacheTtl($this->cachetime);\n $usecache = checkParameters();\n\n $template = $GLOBALS[\"templates_\".$this->language][$this->tmpl][1] . \"/\" . \"module_isic_list2.html\";\n\n $tpl->setInstance($_SERVER[\"PHP_SELF\"] . \"?language=\" . $this->language . \"&module=isic_experimental\");\n $tpl->setTemplateFile($template);\n\n // PAGE CACHED\n if ($tpl->isCached($template) == true && $usecache == true) {\n $GLOBALS[\"caching\"][] = \"isic_experimental\";\n if ($GLOBALS[\"modera_debug\"] == true) {\n return \"<!-- module isic_experimental cached -->\\n\" . $tpl->parse();\n }\n else {\n return $tpl->parse();\n }\n }\n\n $tpl->addDataItem(\"DATA_URL\", \"/?content={$this->vars['content']}\");\n $tpl->addDataItem(\"DATA_MAXROWS\", $this->maxresults);\n $tpl->addDataItem(\"DATA_FIELDS\", $this->getFieldList($this->fieldData['listview'], 'list'));\n $tpl->addDataItem(\"DATA_GRID_COLUMN\", $this->getFieldList($this->fieldData['listview'], 'grid_column'));\n $tpl->addDataItem(\"DATA_FILTERS\", $this->getFieldList($this->fieldData['filterview'], 'filters'));\n\n $tpl->addDataItem(\"DATA_FORM_COLUMNS\", $this->getColumnList());\n $fs_list = $this->getFieldSetList();\n $tpl->addDataItem(\"DATA_FORM_FIELDSETS\", JsonEncoder::encode($fs_list));\n $tpl->addDataItem(\"DATA_FORM_FIELDS\", $this->getFieldList($this->fieldData['detailview'], 'detail', $fs_list));\n $tpl->addDataItem(\"DATA_FORM_FIELDS_MAPPING\", $this->getFieldList($this->fieldData['detailview'], 'list'));\n return $tpl->parse();\n }", "public static function container_exists_in_storage( $container_name ) {\n\t\t_deprecated_function( __FUNCTION__, '4.0', 'Windows_Azure_Helper::get_container_acl()' );\n\t\t$result = \\Windows_Azure_Helper::get_container_acl( $container_name );\n\n\t\treturn ! is_wp_error( $result );\n\t}", "public function getContainerType()\n {\n //return view('administrator.Countries.add');\n $condition = '=';\n $value = 0;\n if(isset($_GET['edit']) && !empty($_GET['edit'])){ $condition = \"=\"; $value = $_GET['edit'];}\n //dd(implode(',', $condition));\n $edit = DB::table('container_type')->where('container_type.container_type_id', $condition, $value)->select('container_type.title')->first();\n $query = DB::table('container_type')->select('container_type.*');\n if(isset($_GET['search']) && !empty($_GET['search'])){\n $query = $query->orwhere('container_type.title','LIKE','%'.$_GET['search'].'%');\n $query = $query->orwhere('container_type.container_type_id','LIKE','%'.$_GET['search'].'%');\n $query = $query->orwhere('container_type.created','LIKE','%'.$_GET['search'].'%');\n }\n $newresult['result'] = $query->paginate(ADMINISTRATOR_PAGENATE);\n $newresult['edit']= $edit;\n return view('administrator.containerType.add')->with('states',$newresult);\n }", "abstract protected function getContainer(): ContainerInterface;", "public function is_container_viewable( $args ) {\n\n\t\t\t// Published, all can see.\n\t\t\tif ( 'published' === $args['status'] || '' === $args['status'] ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// If is author, can also see.\n\t\t\tif ( is_user_logged_in() && current_user_can( 'publish_posts' ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Set to hide.\n\t\t\tif ( 'draft' === $args['status'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Set to show until or after.\n\t\t\t$time_check = strtotime( $args['publish_date'] );\n\t\t\t$wp_local_time = current_time( 'timestamp' );\n\t\t\tif ( '' !== $args['publish_date'] && $time_check ) {\n\t\t\t\tif ( 'published_until' === $args['status'] ) {\n\t\t\t\t\treturn $wp_local_time < $time_check;\n\t\t\t\t}\n\t\t\t\tif ( 'publish_after' === $args['status'] ) {\n\t\t\t\t\treturn $wp_local_time > $time_check;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Any incorrect set-up default to show.\n\t\t\treturn true;\n\t\t}", "abstract public function hasContent();", "function pixelgrade_get_posts_container_id( $location = array() ) {\n\t\treturn apply_filters( 'pixelgrade_posts_container_id', 'posts-container', $location );\n\t}", "protected function findAll()\n {\n return ContainerPage::find()->contentContainer($this->contentContainer)->all();\n }", "public function getBuildingContainer()\r\n {\r\n return $this->buildingContainer;\r\n }", "public function existsOffset($offset, $container = 'default');", "public function getFlexiContainer()\n {\n return isset($this->flexiContainer) ? $this->flexiContainer : null;\n }", "public function containers(): ContainersInterface;", "private static final function getContainerHTMLStatus () {\r\n // Do return ...\r\n return self::$objContainerHTML;\r\n }", "public function getContainers()\n\t\t{\n\t\t\treturn $this->_containers;\n\t\t}", "public function getContainers()\n\t\t{\n\t\t\treturn $this->getTab( '_options_tab' )->getContainers();\n\t\t}", "public function getContainerName();", "public function setContainer($var)\n {\n GPBUtil::checkString($var, True);\n $this->container = $var;\n\n return $this;\n }", "public function getContainer() : ?string\n {\n return $this->container;\n }", "public function hasContent() {}", "public function getContainer()\n {\n if (!$this->_container instanceof Whois_Lookup_Container) {\n /**\n * @see Whois_Lookup_Container\n */\n require_once('Whois/Lookup/Container.php');\n $this->_container = Whois_Lookup_Container();\n }\n\n return $this->_container;\n }", "public function get_container_class() {\n\t\t$class = '';\n\t\tif ( $this->field['label'] == 'inline' ) {\n\t\t\t$class = ' frm_scale_container';\n\t\t}\n\t\treturn $class;\n\t}", "public function containerNames()\n {\n return $this->contentManager->listContainerNames();\n }", "public function show(Container $container)\n {\n return $this->successResponse($container);\n }", "public function container(string $name);", "public function hasContent(){\n return $this->_has(6);\n }", "public function get_container() { return $this->container; }", "public function testListSiteContainers()\n {\n }", "public function setContainer($var)\n {\n GPBUtil::checkString($var, True);\n $this->Container = $var;\n\n return $this;\n }", "function shoestrap_pjax_open_container() { ?>\n\t\t\t<div id=\"pjax-container\">\n\t\t\t<?php\n\t\t}", "public function checkContainer($name, $location)\n {\n ci()->storage->load_driver($location);\n\n $containers = ci()->storage->list_containers();\n\n foreach ($containers as $container) {\n if ($name === $container) {\n return $this->result(true, trans('files.container_exists'), $name);\n }\n }\n return $this->result(false, trans('files.container_not_exists'), $name);\n }", "function container(): Container\n\t{\n\t\tstatic $container;\n\n\t\tif($container === null)\n\t\t{\n\t\t\t$container = Application::instance()->getContainer();\n\t\t}\n\n\t\treturn $container;\n\t}", "protected function getContainerFlag(Dce $dce) : string\n {\n if (!$dce->getEnableContainer()) {\n return false;\n }\n if (ContainerFactory::checkContentElementForBeingRendered($dce->getContentObject())) {\n return static::$lastContainerColor;\n }\n $container = ContainerFactory::makeContainer($dce, true);\n static::$lastContainerColor = $container->getContainerColor();\n return static::$lastContainerColor;\n }", "public function getContainer()\n {\n return $this->container = SMRESTBundle::getContainer();\n\n }", "function container($params,$content,&$smarty,&$repeat) {\n\t\t$smarty->assign('title',$params['title']);\n\t\t$smarty->display('open_container.tpl');\n\t\techo($content);\n\t\t$smarty->display('close_container.tpl');\n\t}", "function container(string $instance = null) {\n\t\tglobal $container;\n\n\t\tif($instance === null)\n\t\t\treturn $container;\n\n\t\treturn $container[$instance];\n\t}", "public function getContainer(): Container {\n return $this->container;\n }", "public function getContainerByCode(string $code): ?PageBlockInterface;", "protected function get_container_name(): string {\n\t\t$parse = \\wp_parse_url( get_site_url() );\n\t\t$domain = $parse['host'];\n\n\t\t// Naming conventions, only letters\n\t\t// Container names must start or end with a letter or number, and can contain only letters, numbers, and the dash (-) character.\n\t\t// https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata.\n\t\t$container_name = strtolower( preg_replace( '/[^a-zA-Z0-9-]/', '-', $domain ) );\n\n\t\treturn $container_name;\n\t}", "public function hasContainer(ContainerInterface $container): bool\n {\n\n if ($this->container === $container) {\n return true;\n }\n return $this->next?->hasContainer($container) ?? false;\n }", "public function containers()\n {\n }", "public function hasContent(){\n return $this->_has(4);\n }", "public static function hasContent(): bool\n {\n return true;\n }", "public function get_containersMasterQuery() {\r\n if(!isset($this->containersMasterQuery))\r\n {\r\n\r\n $view = $this->get_metadataMasterQuery();\r\n $view instanceof THOR_DataView;\r\n $entitytypes = $view->getFromPersistableInputCollectionFriendly('ENTITYTYPES');\r\n\r\n //$entitytypes = $this->get_entitytypes();\r\n $entitytypes->type = \"containers\";\r\n // TODO : check if have to reset entitytypes to datalink here\r\n $view->addToWeb($this->get_containers(), 'CONTAINERS', array($this->get_containers_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n $view->addToWeb($this->get_containermodeltypes(), 'CONTAINERMODELTYPES', array($this->get_containermodeltypes_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n $view->addToWeb($this->get_containerviewtypes(), 'CONTAINERVIEWTYPES', array($this->get_containerviewtypes_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n $view->addToWeb($this->get_containers_paramfields(), 'CONTAINERS_PARAMFIELDS', array($this->get_containers_paramfields_link()), ValidQueryJoinTypes::LEFT, array(), false);\r\n $view->addToWeb($this->get_containerparamfields(), 'CONTAINERPARAMFIELDS', array($this->get_containerparamfields_link()), ValidQueryJoinTypes::LEFT, array(), false);\r\n\r\n /*\r\n $view->startWeb($this->get_entities(), 'ENTITIES', array(), false);\r\n\r\n $view->addToWeb($entitytypes, 'ENTITYTYPES', array($this->get_entitytypes_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n $view->addToWeb($this->get_metadata(), 'METADATA', array($this->get_metadata_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n\r\n $view->addToWeb($this->get_metadatatypes(), 'METADATA', array($this->get_metadata_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n $view->addToWeb($this->get_metadata_fields(), 'METADATA_FIELDS', array($this->get_metadata_fields_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n $view->addToWeb($this->get_metadatafields(), 'METADATAFIELDS', array($this->get_metadatafields_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n $view->addToWeb($this->get_metadatavalues(), 'METADATAVALUES', array($this->get_metadatavalues_link()), ValidQueryJoinTypes::INNER, array(), false);\r\n */\r\n\r\n $this->containersMasterQuery = $view;\r\n }\r\n return clone $this->containersMasterQuery;\r\n }", "function checkIfContentExists($type) {\n $ci = & get_instance();\n $content = $ci->crud->get(CMS_CONTENT, array('page_type' => $type));\n if (count($content) > 0) {\n return 1;\n } else {\n return 0;\n }\n}", "public function getContainerPortletById($id) {\n try {\n $client = new Zend_Soap_Client($this->LAYOUT_PORTLET_WSDL);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findByContainerId';\n $result = $client->findByContainerId($id);\n return $result;\n } catch (Exception $e) {\n //return false;\n }\n }", "public function processContainer()\n {\n $class = \"container\";\n if ($this->hasFluid()) $class .= \"-fluid\";\n $this->add($this->createWrapper('div', ['class' => $class], $this->stringifyHeader() . $this->stringifyCollapse()));\n }", "function hasEventContent($var){\n$hasContent=false;\n\tif ($this->calEventContent){\n\t\t$checkTime=$this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear);\n\t\tfor ($x=0;$x<count($this->calEventContent);$x++){\n\t\t\t$eventContent=$this->calEventContent[$x];\n\t\t\t$eventContentUrl=$this->calEventContentUrl[$x];\n\t\t\t$eventContentId=$this->calEventContentId[$x];\n\t\t\tforeach($eventContent as $eventTime => $eventContent){\n\t\t\t\tif ($eventTime==$checkTime) $hasContent[][$eventContentId][$eventContentUrl]=$eventContent;\n\t\t\t}\n\t\t}\n\t}\nreturn $hasContent;\n}", "public function hasContent()\n {\n return false;\n }", "public static function getContainer()\n {\n return static::$container ?? (static::$container = new Container(false));\n }", "function ninja_has_shortcode($shortcode = '', $content) {\r\n\t\t$found = false;\r\n\t\tif ( stripos($content, '[' . $shortcode) !== false ) {\r\n\t\t\t$found = true;\r\n\t\t}\r\n\t\treturn $found;\r\n\t}", "public function getContainer($name=NULL)\r\n\t{\r\n\t\tif ($this->_container != NULL)\r\n\t\t\treturn $this->_container;\r\n\r\n\t\tif ($name == NULL)\r\n\t\t\treturn $this->_container = false;\r\n\r\n $this->_container = $this->getService()->getContainer($name);\r\n\r\n // Enforce the quote if one is defined in our override control\r\n if (($container_max_size = Cii::get($this->_overrideControl, 'max_container_size', 0)) != 0)\r\n \t$this->_container->setBytesQuota($container_max_size);\r\n\r\n return $this->_container;\r\n\t}", "public function getContainer()\n {\n if ($this->_container != null) {\n return $this->_container;\n }\n\n if ($this->space_id != null) {\n $container = $this->space;\n } elseif ($this->user_id != null) {\n $container = $this->user;\n } else {\n throw new Exception(\"Could not determine container type!\");\n }\n\n $this->_container = $container;\n\n return $this->_container;\n }", "function getTemplateVariableContainer() ;", "public function container( MyMetaContainer $container = null ) {\n\t\tif( $container !== null ) {\n\t\t\t$this->container = $container;\n\t\t}\n\n\t\treturn $this->container;\n\t}", "public function get_by_container_id($id, $owner) {\n if ($owner == 'cartao') {\n $tabela = 'cartao_papel';\n $coluna = 'cartao';\n } else if ($owner == 'envelope') {\n $tabela = 'envelope_papel';\n $coluna = 'envelope';\n } else if ($owner == 'personalizado') {\n $tabela = 'personalizado_papel';\n $coluna = 'personalizado';\n } else {\n return false;\n }\n $this->db->where($coluna, $id);\n $result = $this->db->get($tabela);\n if (!empty($result->num_rows())) {\n $containers = $this->get_posicao_papel_parent_grouped($tabela, $coluna, $id);\n $result_container = array();\n foreach ($containers as $value) {\n $result_container[$value['posicao_papel_parent']] = $this->get_container_papel($tabela, $coluna,$id,$value['posicao_papel_parent'], $owner);\n }\n return $result_container;\n }\n return array();\n }", "function region_has_content($region='default' /*...*/) {\n return CAsdf::Instance()->views->RegionHasView(func_get_args());\n}", "function has_shortcode($content, $tag)\n {\n }", "private function extractCompositeTag()\n\t{\n\t\t// in this class as meaning \"composite page\"\n\t\t$pattern = \"/<\".self::$composite_tag.\"*.\\>/\";\n\t\t$result = ( (preg_match($pattern, $this->raw) == 1) ? true: false);\n\t\t\n\t\t// Now that we know we are dealing with a composite page,\n\t\t// we have 2 options on are hands:\n\t\t// a) page with <composite [options]>wikitext</composite>\n\t\t// b) page with <composite/> i.e. rest of the page is wikitext\n\n\t\tif ($result == true)\n\t\t{\n\t\t\t$pattern = \"/<\".self::$composite_tag.\"(?:.*)\\>(.*)(?:\\<.?\".self::$composite_tag.\">)/siU\";\n\t\t\tpreg_match($pattern,$this->raw,$m);\n\t\t\t$this->content = $m[1];\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function hasContent()\n {\n $c = $this->_getParentContentData();\n if (!$c) return false;\n return $c->hasContent();\n }", "function accouk_is_photography_page() {\n if( is_category('photography') || \n (isset($GLOBALS['main_category']) && \n $GLOBALS['main_category']['slug'] === \"photography\")\n ) {\n return true;\n }\n\n return false;\n}", "protected function isContentToBeParsed() {\n\t\t$result = FALSE;\n\t\t$currentPageUid = $GLOBALS['TSFE']->id;\n\t\t// get rootline of the current page\n\t\t$rootline = $GLOBALS['TSFE']->sys_page->getRootline($currentPageUid);\n\t\t// build an array of uids of pages the rootline\n\t\tfor ($i=count($rootline)-1; $i>=0; $i--) {\n\t\t\t$pageUidsInRootline[] = $rootline[\"$i\"]['uid'];\n\t\t}\n\t\t// check if the root page is in the rootline of the current page\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['includeRootPages'],1) as $includeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$includeRootPageUid))\n\t\t\t\t$result = TRUE;\n\t\t}\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['excludeRootPages'],1) as $excludeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$excludeRootPageUid))\n\t\t\t\t$result = FALSE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['includePages'],$currentPageUid)) {\n\t\t\t$result = TRUE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['excludePages'],$currentPageUid)) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\tif ( $GLOBALS['TSFE']->page['f3_contentparser_dont_parse'] == 1) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\t// if ( $this->cObj->getFieldVal('f3_contentparser_dont_parse') == 1) {\n\t\t// \t$result = FALSE;\n\t\t// }\n\n\t\treturn $result;\n\t}", "public static function getContainer()\n {\n return static::$container;\n }", "function devlyContentNotFound() {\n\t\n\t?>\n\t\n\t<article class=\" articleContainer clearfix\">\n\t\t<hgroup class=\"contentNotFound\">\n\t\t\t<h3>You appear to be lost...</h3>\n\t\t\t<h5>It's probably on us, so you can bet we're working on it.</h5>\n\t\t</hgroup>\n\t</article>\n\t\n\t<?php\n\t\n}", "function pageNotFound($content,$conf){\n if(empty($content))return false;\n $GLOBALS['TSFE']->pageNotFoundAndExit($content);\n return $content;\n }", "public function hasContent(){ return !empty($this->content); }", "public function getTemplateVariableContainer() {}", "public function getContainer()\r\n {\r\n return $this->container;\r\n }", "public function hasContentElement(): bool\n {\n return $this->isChildElementSet(1);\n }" ]
[ "0.58931136", "0.55294085", "0.5410436", "0.5401567", "0.54000497", "0.53779864", "0.53713953", "0.536143", "0.536143", "0.536143", "0.536143", "0.536143", "0.5269339", "0.52486885", "0.5233294", "0.5213143", "0.51920515", "0.5165071", "0.51642174", "0.51351863", "0.5118334", "0.51053464", "0.50972056", "0.50919807", "0.4974507", "0.49582514", "0.4923934", "0.49132022", "0.4908898", "0.4908898", "0.4901203", "0.48911512", "0.48866513", "0.48641515", "0.48351943", "0.48291257", "0.48137107", "0.48071885", "0.47969937", "0.47908184", "0.4788098", "0.4775241", "0.47605512", "0.47588164", "0.47527224", "0.47524238", "0.475036", "0.47502556", "0.47456357", "0.47395527", "0.47375646", "0.4734792", "0.47312394", "0.47229952", "0.47149223", "0.47000763", "0.46903402", "0.4689277", "0.4680775", "0.46739107", "0.4633864", "0.46337762", "0.46333128", "0.46178114", "0.46116602", "0.4610027", "0.4609616", "0.46039018", "0.45836315", "0.45717797", "0.4570658", "0.45680854", "0.45680028", "0.4563883", "0.4558498", "0.45566002", "0.4547536", "0.4545353", "0.4545085", "0.45412564", "0.4540604", "0.4537452", "0.45368603", "0.45343176", "0.45282757", "0.4523605", "0.4521998", "0.45192334", "0.45149472", "0.4506894", "0.449324", "0.44900528", "0.4489394", "0.44833538", "0.44708288", "0.4466391", "0.4459573", "0.44594002", "0.44542375", "0.44523683" ]
0.5556834
1